🌾 [Project - LIVE on mainnet] Staking pool to earn 1.6x more APY

Hmm yes, I guess we could get gamed like that. Fortunately, the harvest() call is not open to everyone at any time, so the time of harvest is not deterministic, it’s hard to play this game. If anything, that confirms to me that this call should be protected. Nevertheless, it is not impossible to game, and it should be prevented. Some Yearn vaults charge a 0.5% withdraw fee that prevent that kind of behavior of timing the entry & exit. But I don’t like it, I’d rather reduce the fees than add more. Maybe we could have a lockup perdiod, for instance, you can call withdraw() only several days after calling deposit(). Staking in the,contract does not make sense if you’re just here for one day anyway, and that would leave some time for multiple harvest() calls between the moment a person enters and exits the pool.

Very interesting analysis :eyes: to see at what price points and what time horizons each strategy is better. Thanks for sharing!

According to @joey, there will be changes to the staking rewards sooner or later.

I really like this idea of pooling together to more efficiently farm the protocol’s liquidity incentives, so I think we should continue to exchange ideas on that topic and start thinking of a “version 2”.

Some ideas I see so far for the “compounding staker v2” :

  • Add a cooldown between deposit() and withdraw(). This would mitigate the problem of someone timing their entry/exit in the pool.
  • Allow more people than just myself to call the harvest(). This would mitigate the “never claiming” trust issue. Maybe we could have a whitelist of some people from the community (mods?) that can call it if I’m unresponsive. Maybe a whale could ask harvest rights, too, before staking, because they’d represent a significant share of the rewards anyway.
  • Refactor the code to make it more generic. If there are multiple incentivized liquidity pools later, there will be multiple “compounding stakers”.
  • Add migration functions to bring on-board people that are currently staking on the official Fei contract or in the Pickle jar, or older versions of the CompoundingStaker.
  • Leave the dust on the contract. They can be compounded on the next harvest().
  • Decreasing fees if more people are in the pool. I think it’s important to keep the fees, because that is what allows to pay for audits etc eventually, but if we have 10M$ staked in the pool, the 5% cut is a lot. Eventually, TRIBE rewards will decrease and gas prices will go up, so that needs some careful thinking.
5 Likes