Skip to content
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

Calculate post-slashing amount to show it in the bond table #2

Closed
Ivshti opened this issue Dec 26, 2019 · 0 comments
Closed

Calculate post-slashing amount to show it in the bond table #2

Ivshti opened this issue Dec 26, 2019 · 0 comments

Comments

@Ivshti
Copy link
Member

Ivshti commented Dec 26, 2019

Instead of Amount, show "Initial amount" and "Amount"

The initial amount is the original bond.amount

The current amount should be the amount we can withdraw. We can calculate it by getting all LogSlash, keeping the last slash points for each pool, and using bond.slashedAtStart and the final slash pts for each pool.

@Ivshti Ivshti closed this as completed in 411d030 Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant