Open Ank4n opened 1 month ago
We could very well use tasks and OCW for this (thanks @mordamax for the suggestion).
@Ank4n We are also very interested in running Tasks
+OffchainWorkers
in combination. What are the plans to stabilize this feature?
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.
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?
Related to: https://github.com/paritytech/polkadot-sdk/issues/454 | https://github.com/paritytech/polkadot-sdk/pull/4537
Nomination Pools currently work with a
Transfer
andStake
strategy, i.e. members transfer their funds to a pool account, and pool stakes. With https://github.com/paritytech/polkadot-sdk/pull/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).