Rewards Distribution

The farming contract allows users to stake their LP tokens and earn rewards based on their proportionate share in the total staked amount. Rewards are calculated daily, taking into account the number of stakers and their individual contributions. Stakers receive a portion of the daily rewards based on their stake, creating a fair distribution mechanism.

Assumption:

  • Total deposited LP tokens: 10,000 tokens

  • Total rewards for the entire farming period: 1,000 reward tokens

  • Duration of the farming period: 10 days

Distribution Example

Day 1:

  • Staker 1 deposits 10,000 LP tokens.

  • Staker 1 is the only staker on this day and receives the entire reward of 1,000 tokens.

Day 2:

  • Staker 1 continues to hold 10,000 LP tokens.

  • Staker 2 deposits 5,000 LP tokens.

  • Staker 1 receives 66.67% of the rewards (666.67 tokens).

  • Staker 2 receives 33.33% of the rewards (333.33 tokens).

Day 3:

  • Staker 1 continues to hold 10,000 LP tokens.

  • Staker 2 continues to hold 5,000 LP tokens.

  • Staker 3 deposits 7,500 LP tokens.

  • Staker 1 receives 40% of the rewards (400 tokens).

  • Staker 2 receives 20% of the rewards (200 tokens).

  • Staker 3 receives 40% of the rewards (400 tokens).

Day 4:

  • All stakers withdraw their LP tokens.

  • Staker 1's total rewards at the end of Day 4: 1,400 tokens (1,000 tokens from Day 1 + 666.67 tokens from Day 2 + 400 tokens from Day 3).

  • Staker 2's total rewards at the end of Day 4: 533.33 tokens (333.33 tokens from Day 2 + 200 tokens from Day 3).

  • Staker 3's total rewards at the end of Day 4: 400 tokens (all from Day 3).

Last updated