vacp2p / staking-reward-streamer

MIT License
0 stars 0 forks source link

Implement new XP yield function in XP token `balanceOf` #65

Open 0x-r4bbit opened 4 weeks ago

0x-r4bbit commented 4 weeks ago

As initial version, we've implemented #53 to determine the XP amount any user has, which also includes the MPs accrued via staking. This inherently follows an 1 MP == 1 XP relation which is ultimately not what is exactly desired.

After recent discussions, we're now aiming to implement a formula in which the XP yield that is generated by staked SNT decreases, as the amount of SNT staked increases.

Here's what it currently looks like:

Yield per SNT_i = BaseXPperSNT x MP_i / (P x SNT_i)

with:

This yield is still added to the actual balance that the account has in the ERC20 contract