vacp2p / staking-reward-streamer

MIT License
0 stars 0 forks source link

Review MP bonus formula #54

Open 0x-r4bbit opened 6 days ago

0x-r4bbit commented 6 days ago

This was raised by @3esmit in https://github.com/vacp2p/staking-reward-streamer/pull/48#issuecomment-2409912237.

Also, I didnt understand yet why the $MP_{bonus}$ is being calculated as it is. Currently RewardsStreamerMP uses:

$$ MP{bonus} = A{balance} * \frac{\left(\frac{t{locked} \times M{MAX} \times {SCALE{FACTOR}}} {t{MAX}} \right)}{SCALE_{FACTOR}} $$

Why not use the normal formula?

$$ MP{\text{bonus}} = A{balance} + \left( \frac{A{balance} \times t{locked}}{t_{year}} \right) $$

Goal of this issue to analyze the impact of these two versions and making the changes if necessary. There's also a chance we can stick with what we have, but right now it seems unclear.

3esmit commented 6 days ago

Just to help clear-up this formula, removing the $SCALE_{FACTOR}$:

$$
MP_{bonus} = A_{balance} + \left(A_{balance} \times \left(\frac{t_{locked} \times M_{MAX}}{t_{MAX}}\right)\right)  
$$

I found this simplification:

$$
MP_{bonus} = A_{balance} \times  \left(1 + \frac{t_{locked} \times M_{MAX}}{t_{MAX}} \right)
$$

However, I need to check if this simplification is doable in solidity.