vacp2p / staking-reward-streamer

MIT License
0 stars 0 forks source link

refactor(RewardStreamerMP): keep track of `maxMP` instead of `potentialMP` #45

Closed 0x-r4bbit closed 1 month ago

0x-r4bbit commented 1 month ago

This commit changes the mechanics to ensure there are no more MP generated that what's allowed as per max limiting.

Previously we've kept track of potentialMP which would decrease as more MP are generated.

This made verifying certain rules on certora hard and/or impossible. So we decided to track maxMP instead, which only decreases when users unstake.

This commit also introduces a rule that ensures any accounts MP never exceed their max mp.

Closes #44

Checklist

Ensure you completed all of the steps below before submitting your pull request:

0x-r4bbit commented 1 month ago

Pinging @gravityblast