PURSE Staking Rewards

Rewards Algorithm

PURSE Staking uses a new algorithm to distribute a fixed reward pool among stakers according to their time-weighted contributions to the PURSE Staking pool. It integrates two new contracts: Distributor and Treasury, to facilitate this new rewards mechanism.

The Distributor periodically sends the accrued staking rewards to the Treasury. And this distribution is accomplished whenever a user interacts with the PURSE Staking ecosystem through state changing functions like staking/withdrawing PURSE and claiming rewards. Transactions initiated by these functions will update the last distribution time to the current block time, ensuring precise computation of rewards for the staking pool.

To accurately calculate the rewards owed to each user who has staked in the pool, every user now has a previousCumulatedRewardPerToken variable which keeps track of the value of the cumulativeRewardPerToken at the point of a user's last interaction with the staking ecosystem - such as the time they stake, unstake, or claim rewards.

Rewards are not automatically distributed to users whenever a state chainging function occurs. This would be gas heavy and highly impractical; imagine having to send rewards to every single user who has staked in the pool whenever someone executes a state changing transaction, this person would also have to bear the gas cost for sending rewards to everyone else!

Instead, each user's rewards remain in the ecosystem and accumulate continuously until the user decides to claim them at their discretion. Upon claiming, the user receives all accumulated rewards up to that point, and their claimable reward balance is reset to zero. If the user maintains their PURSE stake in the pool, rewards will continue to accumulate based on that staked amount. Without an active stake, no further rewards will accrue. Likewise, if a user exits the staking pool completely and have claimable rewards remaining in the ecosystem, that amount will not continue to accrue.

Last updated