Step 1: Notify Delegators
Before making any changes, inform your delegators that the pool is shutting down. Give them enough time to unstake and withdraw their tokens. They need to:- Call
unstake_allon the pool. - Wait for the 4-epoch unbonding period.
- Call
withdraw_allto retrieve their tokens.
Step 2: Pause Staking
Callpause_staking from the pool owner account. This causes the contract to unstake everything (stake 0) and stop restaking, without affecting share balances or reward calculations.
The contract will unstake all tokens at the next epoch boundary. Delegators will still see their shares and can unstake and withdraw normally.
Step 3: Withdraw Owner Balance
Once your own staked tokens are unstaked and the unbonding period has passed, withdraw them:- Staking CLI
- Function Call