-
Notifications
You must be signed in to change notification settings - Fork 689
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
[Pools] Build a pool slashing monitoring bot to apply pending slashes to the affected pool members. #4630
Comments
@Ank4n We are also very interested in running |
Wait. What happens otherwise if the slash is not applied? Would they be able to withdraw their funds without a slash? Would they be able to continue voting with their full balance? |
The members of the slashed pools should not be able to withdraw their funds before the slashes were applied, thus there's no risk that funds that should have been slashed are used elsewhere outside the pools/staking context. A pool member will be able to withdraw funds from a pool IIF the pool does not have pending slashes. When calling
With the new lazy slashing mechanism is pools, that will be the case yes. It's one of the downsides of this delegated staking approach (that allows using pool funds in governance) but since now the slash needs to be applied for each account of the member in the slashed pool (as opposed to 1 slash per pool account as before), it may be too expensive to apply all the pool slashes in one go. So yes, the pool members are able to vote with yet-to-be slashed funds in a pool. This is a tradeoff we discussed about/decided when designing the new delegated pools system. So this bot would be used for convenience and to reduce the downside of letting pool members to vote with more power than the expected, in case the deferred slash was not applied yet. The security assurances that you expect wrt to withdrawing, etc, should hold true. |
Related to: #454 | #4537
Nomination Pools currently work with a
Transfer
andStake
strategy, i.e. members transfer their funds to a pool account, and pool stakes. With #4537, we are moving to aDelegate
andStake
strategy where funds remain in member account, delegated to pool account, and pool account can use these delegated funds to it to stake.Since number of pool members are unbounded, eager slashing as before becomes unfeasible. Therefore, along with this change, we are also moving to a lazy slashing mechanism. When there is a slash, it is book kept in a register of the
Agent
(pool) account. There is a permissionless extrinsicPools::apply_slash()
to apply pending slash to a member by calculating how much balance the member is expected to have and what they actually have, slashing the difference. The reporter also gets a cut from the slashed funds.We need a bot that monitors slashing events for pool accounts, and when there is a slash, it applies slash to all affected members. There are runtime apis that can help with determining which members need slash.
In future, there will hopefully be multiple bots from community monitoring this (since there is an incentive to apply pending slash).
The text was updated successfully, but these errors were encountered: