Summary
The SundaeSwap Protocol launched with an initial yield farming program which offered 500,000 SUNDAE tokens a day for 6 months to liquidity providers from key pools who locked up their tokens. Given that a governance structure had not yet been implemented pre-launch, the Labs team didn’t feel comfortable unilaterally committing more of the community supply. When this initial yield farming program ended in July we stuck to that commitment and fortunately did not see any sort of bank run on the liquidity. But since July, liquidity has been gradually decreasing so now we feel it is time to develop a new yield farming program.
SundaeSwap Labs has been thinking deeply about what features make the most sense for a yield farming incentive program for the SundaeSwap Protocol. But before putting any specific proposal to a vote by the DAO, in the spirit of decentralization, we wanted to start a collaborative dialog on its design.
At a high level we propose offering a small, sustainable SUNDAE token incentive emissions targeting a fixed APR which is intended to offset impermanent loss, and to pair this with a liquidity buyback program for more attractive returns. Additionally, we propose implementing a similar emission of SUNDAE tokens for other projects in the ecosystem, provided they emit tokens to liquidity providers of their own pool and the SUNDAE/ADA pool.
What we had before
To frame the discussion of these new proposals, I’m going to outline exactly how the Protocol’s yield farming program worked before, why it was designed that way, and highlight some positive and negative aspects of it.
- First, it has an incredibly simple smart contract that allowed users to lock their liquidity tokens, and then unlock them at any time.
- Every day, it would distribute 500,000 SUNDAE tokens, allocated proportionately among any LP tokens that were locked in this smart contract.
- These tokens were said to have been “earned”, but not yet “matured”.
- On any multiple of 30 days from the initial lockup of the tokens, any “earned” tokens became “matured”.
- At any time, a user could unlock their tokens, withdrawing both the LP tokens, and any matured rewards. They would forfeit any rewards that had been earned but had not yet matured.
- Incidentally, during the initial phases of yield farming, the program would send these tokens along with 1.3 ADA to cover the minimum ADA requirement, paid for by Labs. We spent several thousand ADA to meet the commitment we had made.
- Later, the program implemented a dual-signature scheme to enable instantaneous/atomic delivery of rewards.
This system was designed with a number of goals in mind, some of which it achieved very well:
- It had to built fast. We did not initially plan to launch with yield farming, but after making the difficult decision to cut the Taste Test, we felt that the community needed something enticing to replace it.
- A large number of LP tokens would be held by this smart contract, and so it had to be absolutely obviously correct and dead simple.
- For legal reasons, at no point could Labs take custody of anyone’s funds, even temporarily.
- To create stability and longevity within the liquidity in the pool, the program included the 30 day lockup period.
- The flat daily emission made it dead simple to calculate each day, and made for a predictable emission schedule.
However, the initial system also had a number of downsides:
- The thirty day lockup was unpopular, especially without the ability to claim partial rewards
- Iterating on the system was difficult, because the yield farming code was all architected around the lock and unlock events on-chain
- Overall it did not sufficiently incentivize truly long-term stability of the liquidity in the protocol
Armed with these insights, we set out to design a new yield farming program which we are now happy to share with the community.
Proposed Yield Farming program
We propose a new yield farming program that operates as follows:
- All yield farming rewards for inactive v1 yield farming programs are assigned an expiration
- If they’re not claimed within 1 year of the last assignment of rewards, those tokens are reclaimed and returned to the appropriate treasury for that token.
- Users lock their liquidity tokens into a smart contract
- This smart contract would be identical to the one used for v1 farming, but recompiled to produce a new hash, to differentiate v1 from v2
- At any given time, there will be a set of active rewards programs
- Each reward program has a target budget; after it has emitted this many tokens, it will become inactive until renewed.
- Each reward program has a token that it emits, which may be SUNDAE or another community token
- Each reward program has a target percentage APR that is used to calculate the daily emissions
- Each reward program can also emit an additional APR to the SUNDAE/ADA pool
- Each day, effective midnight UTC, for each active reward program, Labs will compute the daily incentive token emissions for the day before
- First, we compute the total impermanent loss experienced by liquidity providers over the last 30 days
- If the pool held X of token A and Y of token B, it held a total value in token A of X + (Y * X/Y)
- Then, today the pool holds holds X’ of token A and Y’ of token B, and a total value in token A of X’+(Y’ * X’/Y’)
- The difference in these two values is the impermanent loss
- We convert that value into the equivalent token value, according to the SUNDAE/ADA pool ratio
- We divide that by 30, to identify the average impermanent loss over each those thirty days
- We then add a fixed percentage yield on top of this
- Finally, we cap this value, to mitigate risk to the protocol
- The daily emissions for any rewards program are capped at the lesser of:
- The value calculated above
- A daily emission cap
- The remaining budget for the reward program
- The daily emissions for any rewards program are capped at the lesser of:
- Overall, this offsets the risk of impermanent loss, and provides a reliable, sustainable emission
- If the pool is emitting to the SUNDAE/ADA pool in addition, this process is repeated
- First, we compute the total impermanent loss experienced by liquidity providers over the last 30 days
- Then, we assign these daily emissions proportionately across locked LP tokens for the appropriate pool
- For example, if a particular locked position represents 10% of the locked LP tokens, it receives 10% of that days emissions
- Note that there is a breakage factor here: not all LP tokens will be locked, so the actual APR experienced will likely be higher than the target percentage, in proportion to this breakage
- We then decrement the relevant budget for the reward program appropriately
- Rewards can be claimed immediately, without a 30 day lockup
- This can be done either by unlocking the liquidity tokens and returning them to your wallet, or by spending the locked liquidity tokens back into the same contract
- When doing this, all rewards earned by this pot of LP tokens will be paid to the users’ wallet
- The user can similarly add or remove LP tokens from this pot
- A single pot can hold multiple types of LP tokens, which all earn rewards collectively
- The UI will seek to create only one pot per user, but in the case that multiple get created, they can also be merged with no consequence to the user
- Other projects in the ecosystem can apply for SUNDAE token emission for their community
- Approval is subject to a SUNDAE governance vote
- Projects will be required to match the SUNDAE token emissions with their own; so for example, if the SUNDAE token emissions are targeting 4% APR, the project token must target the same emission
- Additionally, projects will be required to meet a minimum additional emission for SUNDAE/ADA liquidity providers; for example, an additional 1% APR
- SundaeSwap labs will collect a 0.75 ADA service fee from the user claiming rewards each time rewards from a community project are collected
- Note: this fee will not apply to claiming SUNDAE rewards
- Community tokens that apply for the program may, at the discretion of the DAO, be subjected to an insurance program
- That is, a project that wishes to receive some budget of SUNDAE tokens may be required by the DAO to provide SUNDAE tokens as collateral
- These tokens are returned to the project 3 months after the end of the yield farm program
- However, if the DAO deems this project as malicious or extractive (the project experiences a “rugpull”, for example), the DAO can vote to reclaim this collateral deposit for the treasury
- In this way, the emissions from the yield farm program will have been nullified, returning a greater amount of SUNDAE tokens to the DAO treasury and avoiding dilution of the circulating supply
- Additionally, a separate budget from the community supply of SUNDAE will be set aside for a liquidity buyback program
- LP tokens that have been locked up for a minimum of 30 days can be “sold” to the DAO
- The goal of the 30 day lockup here is to help control the rate at which we deplete this budget
- The DAO will pay a premium on top of the value for these LP tokens, using a 30 day volume weighted average of the SUNDAE token price
- These tokens will be considered owned and controlled by the DAO through the Sundae governance system
- The motivation is to build a moat of locked value that the DAO controls, and is not subject to the changing whims of the community
Open Questions
- What exact values should we use for the following variables:
- Target APR
- IL Cap
- Liquidity buyback percentage
- Quorum for Community Tokens
- Suggested Sundae Collateral Percentages
- Initial budget for the SUNDAE/ADA reward program
- Initial budget of the SUNDAE/ADA liquidity buyback program
Conclusion
This is a very important discussion, and deserves significant discussion within the community. We’d like to allow discussion for two weeks before elevating this to a temperature check and then on-chain vote, but if discussion is particularly active, we’re happy to extend that deadline.