xSushi v2 with Open Accumulator
thanks to @BoringCrypto for throwing out this idea and his time to answer questions about it.
nansen.ai’s research has revealed vulnerabilities in the xSushi implementation. This proposal describes an implementation addressing SIMP #1. It is a more open alternative to the proposal above, which forces users to lock SUSHI for a pre-commited period of time.
The open accumulator is a system where deposited SUSHI slowly grows in earning power (every block) up to full potential in x month or years. This is not just your earning power, but also your voting power. So those who keep their SUSHI locked up get the most rewards and the most voting power. But everyone has the freedom to withdraw anytime.
an improved version of the SushiBar serves to:
- mitigate the initial flaws described in nansen.ai’s research.
- incentives to continue staking Sushi instead of dumping during price downturns.
- encourages SPs to lock their SUSHI into the SushiBar, receiving a boost.
For e.g. a maximum lock time of 24 months the reward and voting power would build up as shown in the figure below. For all users, rewards are distributed as if everything had full voting power and differences are redistributed if users leave earlier. Every block the voting power increases and further rewards may be accessed by the user.
Let’s look at two cases, user A that leaves after 12 months, and user B that leaves after 24 months.
In the case of user A, they get 50% of the rewards distributed over those 12 months. They can either withdraw those rewards in between or at the end of the period.
User B receives 100% of the rewards distributed over the period of 24 months after leaving the SushiBar.
- single lock per user (gas-efficient storage), additional locks lead to an averaged lock time as described here and rewards equal to it
- minimum lock duration of 1 month up to maximum lock duration of 24 months
- claim function to receive rewards without exiting
- locks can be created from by contracts (non-EoA)
- can NOT be used for vesting, as withdrawal possible any time
- ToDo: make separate feature (will need an additional week)
harvesting LPs into xSushi
As xSUSHI creation is not limited to EOAs, an option can be added in the Sushi-Chef contract to directly stake harvested rewards into xSUSHI.
We will commit to delivering well tested (but not yet audited) solidity contracts closely matching the specs above. Slight changes may occur due to technical feasibility, but will be clearly communicated when encountered.
Upon acception of the proposal, the proposed contracts and appropriate unit tests will be delivered within three weeks.
We propose the success fee of (1,250 DAI + 6,250 Sushi) per Person per week, equaling a 1/48 of an example rate.
The implementation of the improved xSushi will be provided by @Keno & @johba, letting the Sushi team focus on their existing tasks.
Funds paid for the implementation of these proposals could be saved by Core developers developing it themselves.