πŸ”Staking & Unstaking Process

The above diagram illustrates the journey of EAI tokens through the staking lifecycle in the contract:

  1. Staking During Epoch N

    • A user stakes EAI tokens.

    • If staking occurs mid-epoch, tokens are placed in the Pending Stake pool.

  2. Pending Stake

    • These tokens are not eligible for rewards during the current epoch.

    • They remain here until the epoch rolls over.

  3. 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.

  4. Locked Stake

    • Tokens moved here become eligible for rewards in EAI and/or USDC.

    • Rewards are calculated proportionally based on each user's lockedStake.

  5. Claim Rewards

    • Users can claim their rewards via Rewards section of TradeDividends

  6. 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).

Last updated