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

Respect minimum active+inactive stake when unstaking #230

Open
sisou opened this issue Nov 24, 2024 · 0 comments
Open

Respect minimum active+inactive stake when unstaking #230

sisou opened this issue Nov 24, 2024 · 0 comments

Comments

@sisou
Copy link
Member

sisou commented Nov 24, 2024

We are observing a high number of retire-stake transactions that fail to execute because of a coinvalue error.

Together with @paberr we think that that happens because users have deactivated their stake, waited until the end of the next epoch and then clicked the enabled unstake button. However, the reason these txs fail is that in the meantime, their pool has issued a restaking payout, adding a small balance to their active stake again.

If that added active stake is less than the minimum stake (which it usually is), the retire tx fails because the combined active+inactive stake must be 0 or >= MIN_STAKE, which it would not be after the tx.

To not block users from unstaking though, we should automatically adjust the unstaked balance to let MIN_STAKE remain on the staker (as combined active and inactive balance) and let them unstake the rest, which is usually much more than that minimum.

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