CIP-Draft: Balancer and CoW jointly creating CoWAMM pools

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:

  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.

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.
12 Likes

Thanks for this CIP @AndreaC, @felixhenneke and harisang.

I fully support this endeavor!

While there are lots of theoretical designs being proposed and worked on to fight LVR, CoWAMMs have the potential to be the first live LVR mitigating AMM to hit the market. This is huge.

Both CoW and Balancer have the unique strengths necessary to make this project thrive. I’m super excited to see how this CIP intends to further cement the long-term alignment between our DAOs with the token swap and equal revenue share agreements.

Looking forward to seeing this happening :rocket:

5 Likes

Let me also share an evaluation of CoW AMM so far, which shows the advantages of this new type of AMM and the value that the collaboration between Balancer DAO and CoW DAO can be: 4 months of CoW AMM: what we have learned and the next steps

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.

2 Likes

Thanks @karpatkey for the response and offer to take the lead on the proposal. Regarding the suggested changes:

  1. Doing a token swap instead of providing LP to the pool is surely possible and makes sense as well (both align incentives, although you are right that LP tokens grow slightly less in value if one project outperforms the other). The point about limited retail demand for COW<>BAL liquidity is also true, however we believe solvers will start tapping into this liquidity for CoW/ETH and BAL/ETH related routes as well. Also, CoW AMMs are designed to function well as purely balancing portfolios (ETFs) without noise traders. Moreover, there may be an advantage in narrative and adoption by committing significant capital into this newly created contract (“eating our own dogfood”) instead of having it locked idly. That being said, with the right go to market strategy it’s true that $1M extra TVL will likely be irrelevant.
  2. The size/conditions of the swap where chosen in consideration of the remaining treasury and in order to create an incentive for both DAOs to not only launch the project, but also work towards its success (measured as a proxy of TVL). I’d personally prefer to keep the milestone based swaps for that reason (but are open to ideas for future milestones and other strategies to increase the chances of success for this endeavour).
  3. CoW DAO already manages a COW/ETH CoW AMM (the SAFE contract based pilot) with $1M TVL. I’d suggest migrating this to CoW AMM Balancer pool as soon as they are launched instead of creating a new pool.

Are there any other ideas from on how we can bootstrap liquidity for Balancer CoW AMMs?

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

Strongly agree with Karpatkey’s suggestion to seed a USDC/WETH pool as this is almost always the highest volume pair on any DEX and best used to show as a benchmark on how much CoW AMM improves upon the current designs.


On the BAL incentives, is there a rough understanding of what is achievable with $250k (how much TVL over what timeframe)?

CoW treasury has already deployed such liquidity with earlier versions of CoW AMM and is intending to migrate the liquidity to the new deployment once it is ready :tada:

Probably no scientific answer to this, but I’m sure Balancer peeps should have some intuition based on their experience with liquidity incentives