Yield Farming v2 Proposal

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
    • 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
  • 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.

14 Likes

Can we add staking the ADA in the LP pool to an ADA pool to also help with impermanent loss, or should this be a separate proposal?

1 Like

I think that’s a great proposal; unfortunately with the current smart contracts, it’s not possible. We had planned to do that, but couldn’t get it set up in time for our launch; We thought we’d be able to get it set up after launch, as well, given the way we wrote the smart contracts, but because of an quirk in Plutus, we can’t change the staking credential either.

As we look towards the next version of the smart contracts, this is something that we definitely want to build in natively, for sure.

2 Likes

Ok. Definitely need to take into account the technical capabilities.

I like the V2 proposals and the idea of limiting IL. If you could avoid capping IL for the liquidity pool ADA/SUN, it will be great for the token. For the other open questions, please could you share your proposals ?

1 Like

The idea behind capping the daily emissions is to put an upper bound on the risk the DAO takes, and on how quickly the treasury could be drained, so that the DAO can vote to renew the program if they wished with plenty of warning.

2 Likes

I really like this proposal, for now, I only have one suggestion on the “Open Questions” section:

The target APR for a new yield farming program should be based on a number of factors, including:

  • The current market conditions
  • The risk profile of the project
  • The amount of liquidity that is being provided

In general, a good target APR for a new yield farming program is between 5% and 10%. This is a high enough APR to attract liquidity providers, but it is not so high that it is unsustainable.

Of course, the specific target APR will vary depending on the specific factors involved. For example, a project that is in a high-growth market may be able to offer a higher APR than a project in a more mature market. Additionally, a project with a higher risk profile may need to offer a higher APR to attract liquidity providers.

Ultimately, the decision of what target APR to offer is up to the project team. However, by considering the factors above, they can make an informed decision that is in the best interests of the project and the community.

In the case of your proposal, I would recommend a target APR of 7%. This is a high enough APR to attract liquidity providers, but it is not so high that it is unsustainable. Additionally, it is a competitive APR that is in line with the current market conditions. I know huge APR would be welcome by some, but again , this has to be sustainable over the long haul.

1 Like

Impressive proposal and one that I would hope to see move forward to remain competitive amongst the other DEXs!

Do you have a draft of the project application or is it a bit early for that?

In the case of the Indigo DAO, the application would need to be filled by representatives of the DAO, such as the Protocol Working Group, that’s been recently elected for ideating and spearheading strategic initiatives on behalf of the Indigo DAO. The PWG has recently put a proposal forward for the Indigo DAO to consider boosting INDY/ADA farms to deepen INDY liquidity on 1 or 2 DEXs. I would imagine this Yield Farming proposal, should it eventually move forward and pass by the Sundae DAO, would at least be considered in that plan among other options.

@Quantumplation if you have a draft application please feel free to share in the Indigo discord channel #indigo-dao-governance

Once again, fabulous proposal and all the best to you guys!

6 Likes

Thanks for the feedback Eric, and for engaging with our governance process :slight_smile:!

I’ll start working on an application form, and share with the Indigo DAO when I have a draft.

4 Likes

My pleasure; looking forward to it :handshake:

3 Likes

I think ada should be staking by itself and staking fees should be distributed to ada/sundae holders like as minswap or wingriders.

I think that’s a great idea; We discussed it further up in the thread, though, and it’s not currently supported by the current smart contracts. It’s something we plan to add in the next iteration.

3 Likes

Hi all!

Over the last week or so, we’ve had several really fascinating conversations with members from the community, and developed a richer and more nuanced perspective on yield farming. Thank you to everyone who shared your feedback publicly and privately.

I thought I would distill those thoughts down into an understandable summary, and see if anyone has additional thoughts on that; If the reception is positive, I’ll rewrite the yield farming proposal to include both options.

The key insight that several people highlighted was that providing liquidity can be understood through an analogy to selling naked puts on both sides of a market in classical finance. In classical finance, a naked put is an agreement to, in return for an upfront premium, buy an asset at a price above market value. Similarly, as a liquidity provider, you are agreeing to buy either side of the pair, typically the one that is valued less. This is what fundamentally underpins impermanent loss: after a price shift, you’ve bought the less valuable token by selling off your more valuable token.

(Note: it’s important to emphasize that this is an analogy only, and providing liquidity and selling PUTs will not behave identically)

The current proposal suggests emitting enough SUNDAE tokens to cover the impermanent loss of liquidity providers. However, the analogy highlights that market risk is dynamic, unpredictable, and based on volatility. Typically, this risk is covered by a market negotiation rather than a flat out insurance. By purely offsetting the impermanent loss, the existing proposal takes away the open market negotiation and shifts the risk entirely to the protocol, with SUNDAE token holders bearing the entire brunt of the risk.

This analogy was eye-opening for me and helped me develop a more nuanced proposal:

The basic idea is to allow users to stake their SUNDAE tokens to increase token emissions and un-stake them to decrease emissions. Additionally, users would stake those tokens towards a set of pools which they wanted to attract liquidity to. SUNDAE tokens are then emitted to liquidity providers of the pools that receive a stake.

If the SUNDAE token holders felt that we should be preserving the treasury for future emissions, they can unstake their SUNDAE. Conversely, if they felt the market opportunity was right to attract liquidity, they can stake their SUNDAE to increase emissions. As they do so, they can pick which community projects are strategically important to attract liquidity and in what proportion those pools should receive rewards.

To determine the proportion of rewards for different pools based on the amount of staked SUNDAE tokens, we could either have a minimum cutoff (a pool must have at least X SUNDAE staked to it) or take the top N pools. Note that staking SUNDAE tokens itself doesn’t generate yield directly; this ensures that the protocol avoids unhealthy ponzinomics and keeps the focus on attracting useful liquidity to the DEX.

The risks with this approach are that unsophisticated token holders may simply stake their SUNDAE for maximum rewards, burning through the treasury too quickly and leaving the protocol unable to incentivize future liquidity. The impacts of this proposal on smaller liquidity providers compared to larger ones are not yet clear.

I’ll be working on coming up with a fully fleshed-out proposal for this in the coming days, but if you have thoughts, I’d love to hear from you!

5 Likes

(I forgot to mention, but I’d also love to highlight how much of a success story it is that this proposal is going through this open revision and discussion with our community; We’re really committed to folding the community into the road mapping process directly, and so thank you to everyone who reached out to hop on a call about this!)

3 Likes

Now this sounds innovative, would love to see a full fleshed out proposal!

2 Likes

This is a great update and makes a lot of sense. I’m trying to figure out if the protocol risk isn’t entirely shifted away from the Sundae token holders but rather towards the Sundae token holders who are liquidity providers in the Sundae/ADA pool. The yield farming program isn’t going to work in a vacuum and will be joined by a liquidity buyback program paid out in Sundae (at a premium). I’m wondering if there’s a scenario where the Sundae/ADA pool would see an acceleration in impermanent loss as yield farmers and LP sellers both move in concert. If so, it would be a good idea to give the Sundae/ADA liquidity providers a reason to stay, as they are taking on additional risks in providing liquidity for the two new programs. That would mean giving the Sundae/ADA LPs additional Sundae rewards on top of the YF rewards, described in your update, to keep them around.

I’ve been thinking big picture and trying to answer the question, how do you turn this treasury of tokens into a diversified pool of sustainable LP positions? In order to do that, you need to position the Sundae/ADA pool to be a sort of exchange vehicle, where liquidity providers of other projects trade their liquidity for Sundae/Ada liquidity.

Following your original post, you do this by having a buyback program to attract the liquidity of other projects and a yield farming program that treats the Sundae/Ada pool extra special to keep the liquidity. You would have the Sundae/ADA LP receive YF rewards but also have an option of diverting their rewards to a staking program with a multiplier set to a 30/60/90/etc. day program. This also has the benefit that users who sell their liquidity to the DAO will also be incentivized to become Sundae/Ada liquidity providers (especially if the DAO has built a robust and diversified pool of liquidity). Personally, I think that more of the DAO treasury should be allocated to buyback liquidity than yield farming in order to ramp up the DAO-owned liquidity. Both should be run simultaneously to accommodate user preference and risk appetite.

Let’s use the INDY/ADA pool as an example.

Sundae token holders stake their Sundae to the INDY/ADA pool, and the DAO approves a 1 million Sundae token YF allocation towards it. The DAO also approves 3 million sundae tokens to be used as compensation for purchasing INDY/ADA liquidity provider tokens at a 10% premium. If you are an INDY/ADA liquidity provider, you have two options:

  1. Keep your LP position as is and earn Sundae token rewards as part of the yield farming program

  2. Sell your LP position to the DAO for Sundae tokens at a price 10% greater than the current value of the position.

Now let’s say the DAO also approved the Sundae/ADA pool for Yield Farming rewards with 1 million Sundae to go to that pool. I suggest adding a staking reward multiplier for the Sundae/ADA pool on top of the yield farming rewards ONLY for Sundae/ADA liquidity providers.

What this will do is incentivize the INDY/ADA liquidity providers, who just sold their LP tokens to the DAO in exchange for Sundae, to now become a Sundae/Ada liquidity provider instead of selling all their Sundae, while still maintaining a reduced, yet meaningful, exposure to the INDY/ADA pool.

To answer my big picture question, you have three initiatives going. One to attract the liquidity, one to buy the liquidity and one to keep the liquidity (image below).

Pi has already suggested the YF and buyback initiative. I’m suggesting we add an additional reward specifically for the Sundae/ADA liquidity pool providers to right size the impacts the new programs will have on them. We can figure out the specific emission numbers in a future post.

Thoughts on this?

6 Likes

I think, said more succinctly, you’re pointing out that SUNDAE token holders are at a unique disadvantage over other tokens, because a user must choose whether to provide them as liquidity, or stake them to the pools they want to incentivize; no other token has this dual purpose. And so it would make sense to allow SUNDAE tokens to be staked even if they’re currently in the liquidity pool. Note that this would effectively provide an additional boost to that pool (should the SUNDAE/ADA liquidity providers choose to stake with that pool; they very well could stake it to a different pool instead, if they wanted.)

This makes sense to me, though I’m not sure if there are any dangerous compounding effects; You may need to impose a fractional scalar, so they only count for 0.75 of their weight or something.

One lesson I think we can learn from the recent INDY and Liqwid launches is that “No incentive program survives first contact with the degens”, or whatever Helmuth von Moltke said; We shouldn’t paralyze ourselves trying to design the perfect system; instead we (the DAO) should design a system, see how it’s used in practice, and be ready to adjust as needed.

4 Likes

Yes, you articulated it way better than I could and totally agree with your fractional scalar point. Thanks, Pi!

It’s a great idea and definitely should be considered for the yield farm proposal. We need to find the right balance between emissions and token value and I think this proposal goes in that direction.

1 Like

I’m really liking the direction this is heading. I feel like this can really align the interests of liquidity providers by providing enough incentives and options and at the same time, protect the DAO from excessive emissions and token dumping. If we can manage to make it worthwhile to stick around in the Sundae/Ada pool while also building the DAO reserves with the buyback program then we can build a very healthy Dex with deep liquidity and reasonable incentives for everyone.

I think we just need to iron out the numbers, what makes the most sense and present it in a way that is as simple as possible to understand, so we leave no room for confusion. I really like Viddie’s proposal to break it down for LP’s into a simple and clear 3 options that they can use at anytime. If we can present these clearly and they are tempting enough, then we will attract much deeper liquidity and this will benefit the Lp’s, the DAO, and the users of the Dex overall.

Going back to Viddie’s suggestion, it’s imperative if we implement such a program that we add a yield reward/multiplier or some sort of extra incentive to keep that liquidity and prevent constant dumping. In my opinion, This will only work if we can make the Sundae/Ada pool the superstar pool on the Dex and entice Lp’s to keep adding liquidity to that pool.