MEV Capturing AMM (cow.fi at EthCC)

Source: https://ethcc.io/archive/MEV-capturing-AMM-from-theory-FM-AMM-to-practice-CoWAMM

MEV Capturing AMM (cow.fi at EthCC)

Introduction

The goal of DeFi is to rebuild the entire financial system on blockchain rails so that we can have a more fair, efficient, and accessible financial system.

In reality, blockchain-based assets are traded more off-chain than on-chain (about 10 times more), so current DeFi technology is insufficient for large-scale on-chain trading

The main challenge is that providing liquidity on-chain generates low returns, because of Loss Versus Rebalancing (LVR).

Loss-vs-Rebalancing (2:10)

When a price change occurs outside an AMM (e.g. centralized exchanges like Binance), the AMM price becomes stale and traders (arbitrageurs) can profit from the price discrepancy

While arbitrageurs make money, liquidity providers incur losses equal to the arbitrageur's profit.

Andrea (the speaker) estimates the impact of LVR on liquidity providers:

  • Loss of 5% to 7% of capital per year for standard constant product AMMs
  • Higher losses for concentrated liquidity positions (e.g., Uniswap V3)
  • Even greater losses for more volatile token pairs

In the end, LVP is a "yearly tax" on Liquidity Providers.

How to protect LPs (4:50)

To solve the LVR problem, we can batch trades. So there is a possibility to design AMMs that don't suffer from LVR

It will improve returns for on-chain liquidity providers, attract more liquidity, and make on-chain trading the primary venue for blockchain-based assets.

Theory: the Function Maximizing AMM (6:45)

As an AMM designer, we should worry about "path independence": if someone wants to trade 100 with us, this someone must have no incentive to instead send 10 trades of 10 or 100 trades of 1.

So constant function AMM satisfies path independence, but they're known to suffer from LVR.

A research paper explains that instead of processing trades sequentially, trades are batched before execution. This is called "Function Maximizing AMM"

It eliminates the need for path independence in AMM design, and forces competition between arbitrageurs within the batch.

If the price is off, an arbitrageur can come in, add another trade, and move the price for everybody. If the price remains off, another arbitrageur can add another trade and move the price on the batch again for everybody

Current implementation: CoW AMM (11:20)

CoW AMM was launched in February 2024, and has $2 million TVL. It's integrated with CoW Swap's existing batch mechanism

How CoW AMM works :

  • Collects trades over a few seconds to form batches
  • Runs an auction every 30 seconds
  • 22-23 solvers compete to propose prices for trades in the batch
  • Uses uniform clearing prices for multiple trades on the same token pair

Solver competition ensures the AMM trades at the correct prices and prevents significant LVR extraction by individual solvers. Some minimal profit potential remains for the best solver on a token pair

However, CoW AMM has limitations:

  • Restricted to one LP per pool (suitable for DAOs or whales)
  • Limited trading frequency with other CoW Swap users, reducing fee earnings

Despite those limitations, CoW AMM performance is at least as good as traditional AMMs. For the best-case scenario, we have 3% more yield after one month compared to traditional AMMs (report)

Current implementation focused heavily on LVR protection. There is a need to balance LVR protection with fee generation for optimal LP profitability

Coming soon: CoW AMM Balancer Pools (17:00)

End of July:

  • First AMM pools to be created on Balancer
  • Removal of single LP limitation: Multiple LPs can contribute to the same AMM pool

Before the end of the year:

  • Permissionless access to CoWAMM pools, but with a fee (fee ensures arbitrageurs don't rebalance the pool directly)
  • Multi-token pools, where users can specify token allocations (e.g., 5% in one token, 10% in another) and the pool automatically rebalances to maintain specified allocations

There is potential to bring more liquidity to AMMs by offering ETF-like functionality with fee-earning potential.