Staking & Unstaking Process
Last updated
Last updated
The above diagram illustrates the journey of EAI tokens through the staking lifecycle in the contract:
Staking During Epoch N
A user stakes EAI tokens.
If staking occurs mid-epoch, tokens are placed in the Pending Stake pool.
Pending Stake
These tokens are not eligible for rewards during the current epoch.
They remain here until the epoch rolls over.
Epoch Transition
At the start of a new epoch (Epoch N+1), the epoch number and end time are updated. The tokens are migrated from pendingStake β lockedStake
.
Locked Stake
Tokens moved here become eligible for rewards in EAI and/or USDC.
Rewards are calculated proportionally based on each user's lockedStake
.
Claim Rewards
Users can claim their rewards via Rewards
section of TradeDividends
Unstaking
When users unstake:
It removes from pending stake first (no impact on rewards).
Then from locked stake if necessary (reduces eligible reward amount if done before claiming).