Same Swap, Less Pool: How CoW Matching Differs from Uniswap Routing

5 min readMarkets & ExecutionDeFiEthereumDEXUniswap
Contents
  1. Routing through pools
  2. What matching changes
  3. How much it saves
  4. Closing
  5. Appendix

The same swap can push very different amounts through a pool, depending on which app you press it in.

One USDC-to-WETH request going through a Uniswap router or a CoW solver; the matched part of the CoW settlement skips the pool

Overview. One USDC-to-WETH request through a Uniswap router or a CoW solver. The matched part of a CoW settlement skips the pool; the rest can use the same Uniswap v3 liquidity.


Enter 1,000 USDC, pick WETH, press Swap. What happens next depends on which app you pressed it in.

On Uniswap, you send a transaction. A router picks one or more pools, your 1,000 USDC goes into them, WETH comes out, and you pay the gas. The trade fills within your slippage limit or reverts.

On CoW Swap, you sign an order instead. The order joins a batch, and solvers compete to settle the whole batch. If another trader in the batch wants the opposite side, part of your order is swapped with theirs directly; otherwise the whole order goes to outside liquidity. Solvers can route that part through Uniswap, other DEXs, aggregators, or their own inventory. You do not send a transaction or hold ETH for gas; network costs come out of the trade instead. In exchange, the order waits for a batch and can expire unfilled.

The difference that matters for price is how much of your 1,000 USDC actually goes through a pool. Every USDC that enters a pool pushes its price against you; how far depends on how much liquidity sits near the current price.

The Uniswap app can also send some swaps through UniswapX, where outside fillers compete for a signed order, much like CoW. This post covers the pool route.


Routing through pools

The simplest route uses one USDC/WETH pool. A two-hop route goes through USDT: USDC enters a USDC/USDT pool, comes out as USDT, and the USDT enters a USDT/WETH pool.

A router can split one order across both. In Figure 1, 700 USDC takes the direct pool and 300 USDC takes the two-hop route.

A 1,000 USDC request split between a direct USDC-WETH pool and a two-hop route through USDT

Fig. 1. One 1,000 USDC request split across two Uniswap v3 paths. The 700/300 split is an example, not a live quote.

Uniswap's Smart Order Router weighs price against gas when it chooses paths and splits. Splitting spreads the order across pools, but all 1,000 USDC still goes through some pool.


What matching changes

CoW can do one thing a pool router cannot: match part of an order against an opposite order in the same batch, and send only the rest to the pools. How CoW Protocol Uses Auctions to Execute Onchain Trades covers how solvers build and compete on those settlements. The question here is narrower: how much less does the pool move?

Suppose Trader A sells 1,000 USDC for WETH and Trader B sells WETH for 600 USDC. A settlement can match 600 USDC directly, so only 400 USDC reaches the Uniswap v3 pools from Figure 1.

Fig. 2. 600 USDC is matched with Trader B and only 400 USDC enters the pool. Pool prices come from the example below, with the match priced at the pool's starting price of 2,000.

Matching does not make the pool deeper. It means less of the order needs the pool.

How much it saves

Take a simple pool with 200,000 USDC and 100 WETH, so WETH starts at 2,000 USDC, and no fees. Assume Trader B trades at that same 2,000, which is the best case for matching.

USDC into the poolPool price for the next tradeTrader A receivesTrader A's average price
Pool only1,0002,020.050.4975 WETH2,010.0
With a match4002,008.010.4996 WETH2,001.6

Trader B gives A 0.3 WETH for the 600 USDC at 2,000. The other 400 USDC buys 0.1996 WETH from the pool, for 0.4996 in total. Without B, the first 600 USDC would also have gone through the pool, and every dollar after it would have bought at a worse price.

With the match, Trader A gets about 4.2 USDC more WETH on a 1,000 USDC order, roughly 0.4% before fees and gas. All of it comes from the 600 USDC that never moved the pool. The saving grows with order size and shrinks in a deeper pool. If B wants a worse price than 2,000, it can disappear.

For why order size and pool depth matter more than headline volume, see Why High Volume/TVL Doesn't Guarantee a Good Swap Price.


Closing

Uniswap and CoW often end up in the same pools. CoW's solver rules list Uniswap v2 and v3 among the default liquidity sources on Ethereum. More apps and solvers do not make those pools deeper. Solvers can bring other sources, such as their own inventory, but when an order needs AMM liquidity, they often reach the same pools as the router. What differs is how much of each order has to go through them.

A router takes one order and looks for the cheapest path through pools. A solver looks at a whole batch at once and can settle orders against each other before touching any pool. That is why the same pools can give different results.

When I compare a swap across apps, I look at two numbers: what I receive after all costs, and how much of the order hit a pool. Matching can cut the second. Whether it also wins on the first depends on the price of the match.

Appendix