15 major breaking releases
new 19.0.0 | Mar 26, 2023 |
---|---|
18.0.0 | Mar 5, 2023 |
17.0.0 | Feb 26, 2023 |
16.0.0 | Feb 19, 2023 |
0.0.0 |
|
#293 in Magic Beans
80 downloads per month
2MB
38K
SLoC
pallet-fast-unstake
Auto-generated README.md for publishing to crates.io
lib.rs
:
A pallet that's designed to JUST do the following:
If a nominator is not exposed in any ErasStakers
(i.e. "has not actively backed any
validators in the last BondingDuration
days"), then they can register themselves in this
pallet, unstake faster than having to wait an entire bonding duration.
Appearing in the exposure of a validator means being exposed equal to that validator from the point of view of the staking system. This usually means earning rewards with the validator, and also being at the risk of slashing with the validator. This is equivalent to the "Active Nominator" role explained in the February Staking Update.
This pallet works off the basis of on_idle
, meaning that it provides no guarantee about when
it will succeed, if at all. Moreover, the queue implementation is unordered. In case of
congestion, no FIFO ordering is provided.
Stakers who are certain about NOT being exposed can register themselves with
[Call::register_fast_unstake
]. This will chill, and fully unbond the staker, and place them in
the queue to be checked.
Once queued, but not being actively processed, stakers can withdraw their request via
[Call::deregister
].
Once queued, a staker wishing to unbond can perform no further action in pallet-staking. This is to prevent them from accidentally exposing themselves behind a validator etc.
Once processed, if successful, no additional fee for the checking process is taken, and the staker is instantly unbonded.
If unsuccessful, meaning that the staker was exposed sometime in the last BondingDuration
eras
they will end up being slashed for the amount of wasted work they have inflicted on the chian.
Dependencies
~9–45MB
~765K SLoC