-
Notifications
You must be signed in to change notification settings - Fork 5
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
Revisit tvl subtraction upon unexepected spent of staking output #71
Comments
There is no slashing in phase 1, why would it be a concern |
It is actually any spend from staking output which does not conform to protocol rules. There multiple ways it could happen:
And probably many more which are much more creative. That why in my mind the definition of
|
@KonradStaniec Does timelock expire on tx count as "spends"? If I'm interpreting this correctly, you are suggesting the in the normal flow, we shall use withdraw to subtract the tvl? |
I was operating under the assumption that there will be not timelock expirations during the phase-1 stage ie. our global parameter for staking time will be large enough that the only expected way to spend from staking output will be unbodning transaction. If we want to include expirations to
My position is simpler (I think 😅 ) and can be reduced to, tvl should be reduced any time the staking output is spent. Whether it is spent by unbonding transaction or by transaction which we do not expect. If there would be expirations during system operation, tvl would also need to be reduced when staking timelock is about to expire. (as then stake cannot be converted to voting power in phase-2) |
(context)
The current implementation considers three events that could affect tvl of the system (staking, unbonding, staking expiry). However, this does not include all the events that could subtract the locked value, e.g. slashing and unexpected withdrawal. We should revisit this issue later and make sure confirmed/unconfired tvl calculation as well as the calculation in the api side aligned.
Related issue #55
The text was updated successfully, but these errors were encountered: