Treasury contract

A basic treasury contract where fees can be redirected.

Fees from all contracts will stream to TreasuryVault contract. Anyone can call toVoters() which sends the funds to the governance contract. toVoters() calls notifyRewards() which takes the rewards given and distributes it slowly over 7 days.

To get rewards you don’t have to do anything except be in the governance contract. To claim rewards you have to have voted. You can claim rewards in your “I voted” window (which is 3 days). If you are in your “I voted” window, you can’t unstake till the 3 days are over.

There is also a convert() feature that allows a whitelisted bot to recycle different tokens into yCRV.

To enable:

  • ygov.setRewardDistribution(treasury)
  • controller.setRewards(treasury)
16 Likes

controller.setRewards(treasury) executed, rewards will flow to the TreasuryVault from now on. https://ethtx.info/mainnet/0x243e3a35f9bc4733c01ad2590de77a738fa00cb94620d1aac9b1e8e76ed41a2e

3 Likes

amazing! my only thought was since rewards are distributed slowly over 7 days with only a 3 day vote window to claim. for now it seems theres enough to vote on where this isn’t a problem but may pose one in the future. does it have to be a 7 day drip?

2 Likes

Only being able to claim within a lockup period seems arbitrary. Could this be explained? My thought is that if someone wants to claim their rewards they could vote without bothering to read the YIP they’re voting on just to enable them to claim their rewards.

1 Like

I may be wrong here but from my understanding if there is no drip period, a large yfi holder could periodically stake call the toVoters() function, suck up the rewards, and unstake while pursuing other YFI yield opportunities in between. One would only have to vote when they wanted to withdraw their accumulated rewards. Obviously, a large balance is needed for this to be gas efficient but would take rewards from people committed to staking in the governance pool for voting reasons.

1 Like

Any idiot’s guide on how to make this claim? Or if we do nothing will it be added to UI soon?

Had voted and claimed, but rewards don’t seem to be flowing at the expected rate.