CIP: <to be assigned when moved to phase 2>
title: Balancer and CoW jointly creating CoWAMM pools
author: Haris Angelidakis, Andrea Canidio, Felix Henneke
status: Draft
created:
replaces (*optional):
Executive summary
We propose that CoW DAO and Balancer DAO enter a strategic partnership to collaborate on the development of CoW AMM. In practice, the CoW Protocol settlement contract will gain privileged access to some Balancer pools. At the same time, these pools will be treated as “CoW AMMs” in the sense of earning surplus in CoW Protocol’s solver competition (see here). The solver competition, therefore, guarantees that these CoW AMM Balancer pools always trade at the correct price, eliminating a form of MEV called LVR (for a theoretical argument, see the research paper).
Thanks to the proposed collaboration, liquidity providers will be able to deploy liquidity to CoW AMMs directly on Balancer, benefiting, for example, from its UI and analytics tools. At the same time, CoW Protocol traders gain privileged access to the liquidity in those pools. As part of this partnership, we propose to align the incentives of the two DAOs via a milestone-contingent token swap.
Motivation
Balancer is one of the leading AMM providers, with a total TVL close to USD 1B and extensive experience bringing innovative AMMs to market. Its mission is to drive innovation in the AMM space and streamline integrations and access to new AMM models. Balancer pioneered innovations such as multi-token pools and boosted pools while also incubating other innovative passive AMM primitives such as TWAMMs and E-CLPs.
CoW Protocol is the leading intent-based trade aggregator, both by trading volume (USD 2.4 B in April 2024) and by the number of active solvers (more than 20). Its mission is to protect traders from the dangers of DeFi, including sandwich attacks and other forms of MEV. It recently expanded its product line to include CoWAMM, a new AMM design that protects liquidity providers from LVR, and has currently USD 4.8M in TVL (see here).
Balancer and CoW DAO share the same vision: making DeFi accessible safely to anyone. In light of this shared vision, they successfully collaborated in the past (see here and here). We propose to strengthen the collaboration further by jointly building CoWAMM / Balancer pools.
CoWAMM is the first MEV and LVR-resistant AMM design currently in production. It leverages CoW Protocol’s solver competition to ensure the AMM is always rebalanced at the correct price and is never exploited by arbitrageurs (i.e., it never suffers LVR). However, the current implementation of CoWAMM lacks several features now standard in most AMMs, for example, the ability to pool funds from multiple LPs in the same AMM, portfolio monitoring, etc. At the same time, Balancer brings years of experience building world-class AMMs, and can contribute this expertise to the design of CoWAMMs.
We believe the collaboration between Balancer and CoW DAO can establish CoWAMM as the dominant LVR-resistant AMM design. This would bring LVR protections to liquidity providers, increasing their returns and the amount of liquidity provided. Our ultimate goal is to realize the promise of DeFI: making “on-chain” the place with the deepest liquidity, the most efficient trading mechanism, and where blockchain-based assets are exchanged.
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:
- 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.
- 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.
- 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.
In each case, the required COW tokens will come from the CoW DAO safe.
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.