# Variable Rate Rewards

This is the simpler of the two - X amount is spread over Y duration over all farmers

Visually, it looks exactly like what you'd expect it to: a simple straight line going up into the right:

The longer a farmer stakes, the more they get (up to the specified duration of the reward)

Example:

You deposit 10,000 tokens into reward A with a duration of 100 sec

The rate is 100 tokens/sec, split across ALL gems staked

If 1 farmer stakes 1 gem - he gets the entire batch of 100 tokens/sec

If 9 more join, each staking 1 gem (grand total 10 gems) - they each get 10 token/sec

If another farmer joins staking a whopping 90 gems (grand total 100 gems) - he gets 90% of the rewards (90 tokens/sec), while the remaining farmers now only get 1 token/sec each

The math gets a little more involved if you decide to configure rarities, but not that much harder

If you have 2 farmers, one stakes a gem with 1 "rarity point" and another stakes a gem with 9 "raritiy points", the rewards would be split 1/10 to farmer1, 9/10 to farmer2

If the first farmer adds another gem with say 5 rarity, then rewrds are split (1+5)/15 to farmer1 and 9/15 to farmer2

This was built very much inspired by Step's reward pool program, both in principle and architecture

Last updated