-
Notifications
You must be signed in to change notification settings - Fork 350
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
Fix Claims handling in cw20-staking #110
Comments
This was referenced Oct 8, 2020
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of #59 - pulled out for needed UI
Note: should be done on the v0.2.x branch and released as
v0.2.3
, before merging into master.We currently just store how many tokens the person has unbonded and allow anyone with claims to grab the money. This is unfair as if I start unbonding 3 weeks ago and forget to check right at time, you may have unbonded yesterday and snap up the claims as soon as my unbonding made it to the contract account, making me wait 3 more weeks for your period.
The solution here is to store information on the native staking unbonding period inside the contract as a
Duration
- this contact value should equal the actual unbonding period of the chain for best effect.Further Claims are no longer
Uint128
, but ratherVec<Claim>
These should be stored as one Vec per client. And sorted from first expiration to last expiration. This info must be displayed on a query.
On a handling a claim msg, we remove all mature claims from the list, and take the sum of their totals, releasing these native tokens to the claimee.
The text was updated successfully, but these errors were encountered: