Skip to content

Commit 062a07f

Browse files
authored
fix: updating the docs related to validator exit (#318)
1 parent c52200b commit 062a07f

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy

‎pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,34 @@ Rewards automatically increase the stake-per-share ratio without requiring user
214214
Both validators and delegators face a **7-epoch unbonding period** when withdrawing:
215215

216216
- Prevents rapid stake movements that could destabilize the network
217-
- Tokens stop earning rewards immediately upon exit
217+
- Exit is not processed immediately - validator remains active until next `validatorPrime()` call at next epoch
218+
- Exited tokens stop earning rewards only after the exit is processed in the next epoch
218219
- Countdown starts from the exit epoch
219220
- Funds become claimable when: `current_epoch >= exit_epoch + 7`
220221

222+
**Detailed Exit Flow**:
223+
224+
```
225+
Epoch N: validatorExit(all_shares) called
226+
→ Exit scheduled in contract state
227+
→ Validator STILL ACTIVE and earning rewards
228+
→ Can still be selected for consensus participation
229+
230+
Epoch N+1: validatorPrime() called (by anyone)
231+
→ Exit processed: stake reduced to 0
232+
→ Removed from validator tree
233+
→ No longer active or earning rewards
234+
→ Cannot be selected for new transactions
235+
236+
Epoch N+2: epochAdvance() called
237+
→ Validator officially not in active validator set
238+
→ Fully excluded from consensus operations
239+
240+
Epoch N+7: validatorClaim() callable
241+
→ 7 epochs have passed since exit call (epoch N)
242+
→ Tokens released to validator owner
243+
```
244+
221245
## Validator Priming
222246

223247
`validatorPrime(address validator)` is a critical function that:

0 commit comments

Comments
 (0)