-
Notifications
You must be signed in to change notification settings - Fork 43
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
Staking #107
Conversation
known issue: can unstake when tokens are delegated |
also missing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole structure looks good to me as well as the code (I may need another look to make sure I got it all).
A few questions : atm the staking curve is set only for points 1M, 3M, 6M, 1Y with pre-defined conversion rates. I assume it's for testing purposes only and a true staking curve logic is to be implemented ?
In the staking_tests file, when you verify the balance of the staker is correct (stake of 937 for 3 months => 2342 with the 2,5X conversion rate) why is it rounded to the lowest int?
Maybe a quick test add of unstaking before the unlock_date
Why the line "start_warp(CheatTarget::One(gov.contract_address), get_block_timestamp() + ONE_MONTH * 4 + 1);" remains alone at the end of the test_multiple_overlapping_stake_unstake() after stop_warp ?
The production curve will still be discrete. It's rounded to the lowest int, because, let's assume we rounded up and not down: let's say you want to lock 1000 KONOHA for a duration that gives you a 1.6x multiplier. If you lock 1000 directly, you get 1600 veKONOHA. But if you lock 1000x1 KONOHA (call the function stake() 1000 times), you get 2000 veKONOHA. (1000 KONOHA means 1000*10**-18 KONOHA actually if you account for decimals) Adding a test of unstaking before expiry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.