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