mstable/mStable-contracts

Add a StakingRewards contract that wraps existing

alsco77 opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
It would be good to be able to have double incentives on mStable. Consider the scenario in which Protocol X is incentivising liquidity of a given token Y (through a contract like StakingRewards.sol), and mStable also wish to incentivise this token Y. It would be good to wrap X's rewards contract with a contract Z, to offer both tokens in one.

Describe the solution you'd like
A contract written that forks from the existing StakingRewards.sol, and facilitates the ability to wrap another rewards contract. Each time a user deposits or withdraws (i.e. in updateReward) all tokens that were accrued in the underlying contract would be collected and then factored into the reward distribution.

For example, if 100 tokens were received from X, you would need to then distribute this amount between the participants in Z between now and the time of the previous collection. This would introduce a second layer of accounting in the contract.