Understanding Staking and Rewards

Key Concepts

  • Promoter: The entity that creates a staking offer.

  • Staker: A user who deposits tokens to participate in the staking offer.

  • Epoch: A unit of time used in the system.

  • Staking Offer: A proposal created by a promoter specifying the details of the staking opportunity, like the duration, reward amount, minimum and maximum deposit, and the type of token to be staked.

  • Staking Period: The duration of the staking offer, defined by a start epoch and an end epoch.

  • Reward Amount: The total amount of tokens the promoter offers as rewards for the entire staking period.

  • Shares: Represents the portion of the total rewards that a staker is entitled to, calculated based on their deposit amount and the timing of their deposits and withdrawals.

  • Claimable Reward: The amount of reward a staker can withdraw at any given time.

How Staking Works

  1. Offer Creation: A promoter creates a staking offer, specifying the staking period (start and end epochs), the reward amount each epoch, the token to be staked, and other parameters like minimum and maximum deposit limits.

  2. Staking: Users (stakers) can deposit tokens into the staking offer during the staking period, but can stake before the staking period.

  3. Reward Calculation: The system calculates each staker's share of the reward based on their deposit amount and the timing of their deposits and withdrawals.

  4. Claiming Rewards: Stakers can claim their accumulated rewards after the staking period ends or during the staking period if they unstake the token.

Reward Calculation Details

The reward calculation is based on the concept of "shares." Here's how it works:

  1. Share Calculation :

    • Initial Shares: When a staker deposits tokens, they receive an initial number of shares proportional to their deposit amount and the time remaining until the end of the staking period, but the share will be counted after the staking period has started.

    • Share Adjustment: Shares are adjusted at the end of each epoch based on the staker's deposit amount and the total deposit amount at that time.

  2. Reward per Epoch Calculation :

    • Each epoch within the staking period has a designated reward amount, as defined in the staking offer. To determine a staker's reward for a specific epoch, the program looks at the proportion of their shares relative to the total shares held by all stakers in that epoch.

    • Essentially, the reward for an epoch is divided among all stakers based on their share "weight" at that point in time. A staker with a larger share of the total naturally receives a larger portion of the epoch's reward.

    • The calculation can be visualized as follows : 'Staker Reward for Epoch = (Staker's Shares in Epoch / Total Shares of All Stakers in Epoch) * Reward Amount for Epoch'

    • Example: If a staker holds 100 shares in epoch 775, and the total shares of all stakers in that same epoch is 1000, and if epoch 775 has a reward amount of 200 RESO, then the staker would receive (100 / 1000) * 200 RESO = 20 RESO for that epoch.

    • This ensures that rewards are distributed in direct proportion to each staker's contribution, as measured by their share of the total stake.

  3. Cumulative Reward :

    • A staker's cumulative reward is the sum of their rewards earned in each epoch.

  4. Claimable Reward Calculation : 'Claimable Reward = Total Reward Earned - Total Reward Claimed'

Example Scenario

Let's say a promoter create an staking offer from 770th epoch to 780th epoch, with reward of 200 RESO each epoch. The following events occur :

  • At 770th epoch, Staker 1 deposit stake of value 50 RESO

  • At 770th epoch, Staker 2 deposit stake of value 50 RESO

  • At 772th epoch, Staker 1 unstake 25 RESO

  • At 773th epoch, Staker 2 deposit stake of value 50 RESO

  • At 774th epoch, Staker 3 deposit stake of value 25 RESO

Here's how the staking and reward calculation might play out :

Epoch
Staker 1
Reward 1
Staker 2
Reward 2
Staker 3
Reward 3

770

50

0

50

0

0

0

771

50

200

50

200

0

0

772

50

200

50

200

0

0

773

25

66.667

50

133.333

0

0

774

25

40

100

160

0

0

775

25

33.33

100

133.33

25

33.33

776

25

33.33

100

133.33

25

33.33

777

25

33.33

100

133.33

25

33.33

778

25

33.33

100

133.33

25

33.33

779

25

33.33

100

133.33

25

33.33

780

25

33.33

100

133.33

25

33.33

Important Notes :

  • The actual reward calculation might involve rounding and other minor adjustments.

  • This is a simplified example to illustrate the basic principles. The specific rules and parameters might vary depending on the staking offer.

Last updated