-
Notifications
You must be signed in to change notification settings - Fork 7
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
chore: handle withdrawable and withdrawn staking events #189
base: main
Are you sure you want to change the base?
Conversation
b91d9da
to
20960c9
Compare
} | ||
|
||
// HandleWithdrawntakerStats decrements the withdrawable delegations count and | ||
// increments the withdrawn delegations count for the given staking tx hash |
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.
i can't think of a case where we need to know the withdrawn
tvl or delegation as this number will always incrementing. more like a historical number.
If we remove this particular stat, will it make the solution a bit easier?
StakerPkHex string `bson:"_id"` | ||
ActiveTvl int64 `bson:"active_tvl"` | ||
ActiveDelegations int64 `bson:"active_delegations"` | ||
WithdrawableTvl int64 `bson:"withdrawable_tvl"` |
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.
I think there is a gap for the unbonding
here.
If a delegation is unbonding, we deduce it from the activeTvl directly, right? but only add to the withdrawableTvl
once the unbonding timelock expired.
Fixes - #188