-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cliff does not work as expected #141
Comments
UPDATE: The details below reflect the 3.0.0 version of lockup contract! The currently deploy contracts are not affected by this bug due to a happy coincidence, see detail in a new comment below! Well, simply saying the problem is that the lockup contract does not have a concept of a cliff at all; it just has a linear unlock from the starting date (either phase 2 launch date + @evgenykuzyakov @SkidanovAlex @ilblackdragon @eriktrautman Is this intended? I checked my lockup contract and the unlock schedule there is going to be (according to the 3.0.0 contract implementation):
Ultimately, would we deploy 3.0.0 version of lockup contract team tokens would be locked for 5 years since phase 2 launch and will get linearly unlocked starting 2021-10-13 (no 25% cliff) |
@telezhnaya This problem exists in the current version of the lockup contract. There is also another problem, as I explained here #140 .
@frol It will not affect team-tokens lockup contracts, and they will release properly. Yes, the starting date is calculated wrongly but it's not affecting If you check the lockup contract before version 3.0.0 of core-contracts/lockup/src/getters.rs Line 81 in 890ad50
I added this repo: So team tokens contracts are fine, but the current version of lockup contracts has two problems, please check #140 . |
@SkidanovAlex yes, the situation that @frol described is present in the current version of lockup contract implementation, the contracts before 3.0.0 (before #136) are fine. In the previous version (before 3.0.0) of the lockup contract the release start date is calculated wrongly, but it's not affecting |
CCing @mikedotexe since core contracts are responsibility of DevPlatform. |
Added banner to the readme file #142 |
Added tags to track versions easier, see previous realisation here |
TL;DR: The lockup contracts deployed for the team tokens distribution (4 years lockups) are not affected due to a lucky bug that we "resolved" only recently in #136!
The cliff is there and the total lockup duration matches what was promised! 🎉 P.S. If we have non-4-year lockups with cliffs, those won't be 25% unlocked on the cliff-day, e.g. if there is a 2-year lockup with 1 year "cliff", it will unlock 50% on the "cliff" day. |
@frol correct, as explained in my comment here: |
What's the ETA? We are looking to use this contract. |
We have 2 conflicting definitions for |
@robert-zaremba I am working on it right now. I am afraid to give any time estimate. TLDR: |
OK, so the logic works (i didn't audit it) if |
@robert-zaremba Yes |
In previous version, there was an issue with calculating start date. It means that we have an error for these contracts: (58 lines)
For them, we wanted to start the contract from the date in third column, but the start is actually the moment of enabling transfers. |
What have been done: - Added info about the difference between lockup and vesting, and how do we combine these logic - Added info about lockup fields - Added info about foundation account (it could be trird-party) - Removed `technical details` section. All the info from it is outdated (first point) or written in corresponding sections. Resolves #140, resolves #141
Looks like we have a bug in calculation of unrelease_amount:
Let's suppose that we have classic contract 4-years long in total, with 1-year cliff.
It does not clear, what
release_duration
means. Doc says it'sthe duration when the full lockup amount will be available
. Does it mean 3 or 4 years for our case? Anyway, we will have problems further.release_duration
== 3 years for such case.It means that
unreleased_amount
will not take into account cliff. Ourlockup_amount
will start unlocking after we pass the cliff without unlocking 25% at the early beginning. To fix that, the formula should look like:release_duration
== 4 years for such case.It means that our contract will last 5 years instead of 4 because of this line. To fix that, we should also apply this change:
(code could be simplified, I just tried to explain the idea)
The text was updated successfully, but these errors were encountered: