[RFC] Balancer x CoW Protocol Strategic Partnership (CoWAMM)

Balancer x CoW Protocol Strategic Partnership (CoWAMM)

Note: Much of the text in this proposal is sourced from the CoW proposal here, those interested should take a look.

Executive summary

The team at CoW Protocol have created a novel AMM design known as the Function Maximizing AMM, also known as CoWAMM or FM-AMM. You can read about the academic research this design is based off of here. In this proposal, I propose a strategic partnership between Balancer DAO and CoW DAO to bring this innovative AMM model to market using our tech stack.

LVR reduction is the next frontier of AMM design. Everyone is talking about it, but few have a clear path to market. CowAMM is one of the few designs that works in production today. In this proposal, I outline the means to align with CoW protocol to bring this innovative AMM design into the Balancer ecosystem.

TL;DR CowAMM

CoWAMM, also known as FM-AMM (function maximizing AMM), is a new type of AMM that utilizes competitive nature of CowSwap batches to provide pricing information to the pool. If the batch settlement price of an asset in the CowSwap batch results in invariant growth, then the pool is capable of filling this trade. More practically, it means that pools provide perpetual limit orders to Cowswap and solvers compete to provide surplus to the pools. This solves multiple issues in present in most traditional AMM designs, such as making sandwiching impossible and minimizing LVR since there is no way to “pick off” stale quotes on the AMM since the final settlement price happens with a Cowswap batch which is competitive by nature.

Motivation

Balancer is in a unique position to capitalize on new AMM models. We have the technology, expertise, and userbase to turn ideas into functional products that get used in production by real people who desire liquidity. I believe this aspect alone makes building on Balancer an enticing option, as we have seen products like Gyro’s E-CLP’s find market fit by tapping into our incentive and relationship structure.

CowAMM is currently live in a very primitive form by utilizing gnosis safe’s along with automated Cowswap orders. The current limitations of this implementation is that the entire pool is consolidated into a single gnosis safe and users have no control over their individual positions. In the version of CowAMM we are working on, users will be able to receive receipt tokens for their deposits that can be burned for the underlying through the Balancer UI. This makes the user experience for CowAMM feel like any other Balancer pool.

The Collaboration

Creating a Balancer / CoWAMM pool means giving the CoW Protocol settlement contract (and, by extension, its solvers) exclusive or privileged access to some Balancer pools. In practice, the CoW Protocol settlement contract trades with the pool at zero fee, but the in and out amounts are determined in the solver competition (more below). Initially, the CoW Protocol settlement contract has exclusive access to this liquidity, which is accessible only via a CoW Protocol batch. In the future, we will introduce permissionless access to the AMM for a fee that should be sufficiently large to deter arbitrageurs and toxic flow.

Besides that, Balancer / CoWAMM pools will behave like all other Balancer pools. They will use the same UI (with some elements of co-branding) and the same overall infrastructure. Liquidity deposited in Balancer / CoWAMM pools will also receive the same veBal incentives as all other Balancer pools, plus additional incentives we discuss below.

The terms at which the CoW Protocol settlement contract trades with the Balancer / CoWAMM pools are determined in the solver competition. Traditionally, CoW Protocol solvers compete to settle user orders, with the solver providing the most surplus (i.e., the best prices) winning the right to settle the batch. With the launch of CoWAMMs, solvers now also compete to trade with the various CoWAMM pools. They do so by proposing an “in” and “out” amount for each pool, from which it is possible to compute the “surplus” generated by each proposed trade, that is, by how much the AMM “moves up the curve” if a trade is accepted (see here for more information). No solver is allowed to violate the AMM invariant (i.e., move the AMM “down” the curve), and the solver proposing the trade that generates the highest surplus wins the right to trade with the AMM. If a solver proposes to trade with multiple users and multiple CoWAMMs, then the surplus generated by such a proposal is the sum of the individual surpluses.

Importantly, CoW Protocol rewards solvers for the surplus they generate: using a mechanism akin to a second-price auction, the protocol pays the winning solver the difference between the surplus produced by the winning solution and that produced by the second-highest solution (up to a cap; see the documentation here). Via this mechanism, CoW protocol pays solvers for providing surplus to CoWAMM pools.

Incentive alignments: Token Swap and additional Bal rewards

A key component of a successful collaboration is the correct alignment of incentives. We propose to achieve this alignment by committing to a milestone-contingent token swap:

  1. At launch (expected July 1st), CoW DAO and the Balancer DAO will contribute USD 500k worth of their respective tokens to a COW/BAL Balancer / CoWAMM pool (for a total TVL of USD 1M). Each DAO will lock the resulting LP tokens for two years.
  2. When the TVL of all CoWAMM / Balancer pools reaches USD 50M, CoW DAO and Balancer DAO will swap 1M USD worth of their tokens (for a total value of 2M USD). These tokens are locked for two years.
  3. When the TVL of all CoWAMM / Balancer pools reaches 100M USD, CoW DAO and Balancer DAO will swap 1M USD worth of their tokens (for a total value of 2M USD). These tokens are locked for two years. At this point, CoW DAO and Balancer can have another round of discussion on how to best structure the collaboration.

This ensures that incentive alignment continues to scale up as success metrics are achieved and both parties remain long term aligned.

Additionally, Balancer DAO will allocate $250k worth of discretionary BAL incentives to ensure that we have firepower to drive liquidity to these pools without fragmenting our current discretionary incentives. This will be in the form of BAL added as a secondary reward token and will be discretionarily allocated by the Maxis and BD according to our growth initiatives. As time goes by and this technology becomes lindy, we expect external incentives to drive growth because of its benefits over traditional AMM’s.

CoW DAO and Balancer DAO further agree that:

  • Whenever the Balancer / CoWAMM pools will generate revenues, these revenues will be equally shared between the CoW DAO and the Balancer DAO.

  • Balancer DAO will allocate approx. $250k worth of BAL to strategic CowAMM pools to incentivize liquidity provision.

  • If the launch of the first CoWAMM / Balancer pool is delayed by more than two months (i.e., past September 1st), the agreement will be rediscussed.

Implementation details

From the implementation viewpoint, CoW DAO and Balancer DAO agree that:

  • The amount of tokens to contribute to the initial COW/BAL pool will be calculated using Chainlink prices at the time the pool is created. Furthermore, the pool is created as soon as technically feasible.
  • We say that the TVL of all CoWAMM / Balancer pools reaches a certain threshold whenever it has been continuously above the threshold for at least a week.
  • For the second and third steps of the token swap, the prices used will be the average price during the week before the TVL of all CoWAMM / Balancer pools reaches a certain threshold.
  • All tokens involved in the swap and the LP tokens from the common COW/BAL Balancer / CoWAMM pool, will be stored in a 2/2 safe, jointly owned by CoW DAO’s treasury and the Balancer DAO’s treasury.

Note: the actual on chain implementation of this vote will be finalized at a later date

TL;DR

CowSwap has designed an innovative new AMM. Balancer has experience bringing innovative AMM’s to market. The two protocols, which have worked together in the past, can collaborate to bring this AMM design to the masses and result in benefits to both sides- Balancer gets to hit the market with one of the most innovative AMM designs to date, and CowSwap builds a moat around their settlement architecture. This is an incredible opportunity for both projects to push forward the next generation in AMM design.

13 Likes

I am very excited about this partnership! Balancer and CoW DAO have a long history of great collaboration. One example is the integration of MEV protected swaps routing through Balancer liquidity.

The development of a new dedicated AMM will be an exciting addition to the Balancer landscape.

I am also in support of the KPI based approach for liquidity provision nicely aligning the potential success of this product including the fee split.

3 Likes

LVR mitigation is the creme da le creme of AMM design, and the only live and proven model coming to Balancer is one of the most exciting recent developments within the Balancer ecosystem.

I’m a huge fan of every CoW Protocol product, and combining the expertise of Cow’s MEV mitigation and solver network with Balancer’s expertise in bringing AMMs to market makes complete sense.

This is a great addition to the most diverse and innovative network of AMMs in DeFi. Full support.

4 Likes

We are excited to support the strategic partnership proposal between Balancer and Cow DAOs, as it promises to create a powerful synergy that will enhance both protocols. Given the history of collaboration between these two DAOs, advancing to this next step is both promising and exciting.

As the treasury manager for both DAOs, and having initiated this idea and drafted the first proposal a few months ago, karpatkey is uniquely positioned to act as an impartial third party. We can coordinate efforts around this initiative and play a key execution role on behalf of both DAOs.

We would like to specifically address the section on incentives alignment. The proposed COW/BAL liquidity pool (LP) is likely to generate low organic volume, primarily coming from rebalancing activities. This setup would function more like an ETF, aligning the incentives of the two DAOs but only to a limited extent given the pool’s relatively small size for both tokens. In contrast, a direct token swap would immediately and significantly align the incentives of the two DAOs. We believe this initial swap should be the first of many, with further exchanges planned once a clear strategy is established.

In light of this, we propose that the token swap involving $1M worth of native tokens from each DAO (totaling $2M) be executed at the outset, rather than waiting until the total value locked (TVL) in all CoWAMM/Balancer pools reaches $50M. This early swap would cement a stronger alignment between the DAOs and contribute to diversifying their respective treasuries. Additionally, Cow DAO could lock the received BAL with ETH in the veBAL contract, enabling it to direct incentives to these pools, thus unlocking a positive flywheel.

Secondly, we see significant value in launching CowAMM pools from the beginning. Testing this technology in a live environment signals the serious commitment of both DAOs to this partnership. We propose starting with a pool that is likely to attract more organic volume, such as WETH/USDC. karpatkey is prepared to help seed this initial pool achieving $1M in liquidity, providing $500k from GnosisDAO, while Balancer and Cow DAOs would each contribute $250k.

In addition to the WETH/USDC pool, we suggest creating two more CowAMM pools: COW/WETH and BAL/WETH. Each pool would be seeded with $500k in total, with each DAO providing the initial liquidity for the pool that includes its native token. After these initial pools are launched, we can evaluate further stages of liquidity seeding as needed.

As the treasury manager for both DAOs, karpatkey is ready to assist with executing these actions, allowing both teams to concentrate on the technological integration.

On pool composition: I wanted to go with a bal/weth + cow/weth pool from the beginning but the capital requirements to execute on that would make it a bit more cumbersome from both sides, so I chose to stick with BAL/COW at the suggestion of the CoW team to keep things simple and elegant (since we simply split the lp tokens). I do, however, think that having separate weth paired pools would be much better for testing the mechanisms as they are orders of magnitude more likely to attract trading volume. So all good on that on our front, it just means we have to put up some hard assets, which I’m not against in this instance given the size and potential impact. So all good on that front for me, as long as the CoW protocol community is okay with providing the capital on their side.

On the token swap: I personally prefer to start with a 500k token swap and continuing to size up as the pools grow. This gives both sides something to strive towards as we achieve success together. I’m very cautious about not expending the liquid BAL we have in our treasury as it is one of the few economic bartering chips we have on the incentive alignment front, and given our reliance on partnerships, I believe preserving this capital is quite important. So I would prefer to stick to the same amounts as outlined in the original proposal. If CoWAMM is successful there will be plenty of tokens in each others hands.

On a weth/usdc pool: This seems like a good idea to me too, assuming CoW DAO is also on board with it. A WETH/USDC pool would provide a great benchmark when comparing it to other AMMs.

tl;dr:

  • Good with splitting COW/BAL pool into two WETH paired pools and having each DAO seed their own pool
  • Prefer to keep the token swap milestones and amounts
  • Good with seeding a WETH/USDC pool together

Just as a note to anyone reading this, the above would increase the initial capital requirements to execute this proposal from $500k in BAL, to $750k in BAL + $375k in WETH, and $125k in USDC.
($500k BAL to CoW DAO, $250k BAL + $250k WETH to seed BAL/WETH pool, $125k WETH + $125k USDC to seed WETH/USDC pool)

4 Likes

The following comment is replicated on both Balancer and CoW forums.

After considering the responses and comments from both DAOs, our suggestion to achieve the greatest benefit in the most capital-efficient way is as follows:

Token Swap

Given that both DAOs are comfortable with the original structure, we recommend reverting to it.

CoW AMM Pools on Balancer

  • A USDC/WETH pool will be launched with an initial liquidity of USD 1M. GnosisDAO will provide USD 500k, while Balancer and CoW DAOs will each contribute USD 250k.
  • Two pools featuring the native token of each DAO paired with WETH will be launched with an initial liquidity of at least USD 500k:
    • The BAL/WETH pool will be entirely seeded by Balancer DAO.
    • CoW DAO already manages a COW/WETH CoW AMM (the SAFE contract-based pilot) with USD 1M TVL. CoW DAO commits to migrating this pool to a CoW AMM Balancer pool upon launch.
  • A COW/BAL pool will be launched, with each DAO contributing USD 500k worth of their tokens, as detailed in the token swap section.

Additional Incentives

We also recommend maintaining the original intention for BalancerDAO to allocate USD 250k worth of discretionary BAL incentives to strategic CoW AMM pools to incentivize liquidity provision.

Edit

An additional term not included in the original version is as follows:

  • Both Gnosis DAO and Cow DAO commit to abstaining from farming incentives derived from the initial liquidity seeded into the aforementioned CoW AMM Pools on Balancer.
3 Likes

As stated above, this proposal is replaced by a revised version here which will go to vote June 20th, 2024

1 Like