Why split a trade over several pools?

By Cleave Protocol

A big trade pushes one pool's price against you. Splitting it over several pools often returns more, unless the trade is small.

Watch on YouTube

A trade of 50,000 USDC is like one big coin. You could drop it whole into one pool, or cut it into three parts and drop one part into each of three pools. The second way often gets you more ETH.

Why the last part costs the most

A liquidity pool is a shared pot of two tokens, like USDC, a digital dollar, and ETH, Ethereum's main coin. Its price comes from the mix inside. Each bit of USDC you pour in makes the ETH inside a little rarer. So the next bit of ETH costs more. That push against your own trade is called price impact.

This means a big trade does not get one price. It gets a slide of prices, and its last part pays the most.

Take a made-up pool, with fees left out to keep the sums simple. It holds 2 million USDC and 2,000 ETH, so ETH starts at 1,000 USDC. Now swap 50,000 USDC into it:

  • The first 10,000 USDC buys about 9.95 ETH.
  • The last 10,000 USDC buys about 9.56 ETH.
  • The whole trade buys about 48.8 ETH.

At the starting price, 50,000 USDC would have bought 50 ETH. The gap is your own price impact.

Cut the coin

Now say there are three pools of that same size. Cut the trade into three equal parts, one per pool. Each pool sees a smaller trade, so each price moves less. Together, the parts buy about 49.6 ETH. That is about 0.8 ETH more from the same 50,000 USDC.

Real pools are not equal. A deep pool, one that holds a lot of tokens, can take a bigger part than a shallow one. Some parts can also take a detour through another token, like USDC to USDT, another dollar token, to ETH, when that pays more.

So real splits are rarely neat thirds. But the idea holds: together, the parts often get more ETH than any single pool would give.

When splitting does not help

Splitting has a cost. Every extra pool adds work to the transaction. That uses a little more gas, the fee for running a transaction on a chain.

Run the same three made-up pools with a swap of 500 USDC. Splitting saves about 8 cents' worth of ETH. The extra gas can cost more than that. So small swaps often stay in one pool.

People get two more things wrong:

  • Splitting lowers price impact. It does not remove it. In the example, 49.6 ETH is still under 50 ETH.
  • Three swaps by hand are not the same thing. Each one is its own transaction with its own gas, and the price can move between them.

The trade size that matters is the size compared with the pools. A trade that is big for a small pool can barely register in a deep one.

How Cleave does it

Cleave splits trades like this over several pools and paths, and rejoins the parts in one transaction. You see each part's share before you swap. In the route view, a wider path means a bigger share of your input.

Say the route shows 60 percent through one pool and 40 percent through another. That tells you how your trade is cut. A quote is the price offered for a trade, and the quoting guide explains how one is put together.

In short

  • A big trade in one pool pays a little more for each part, so its last part costs more than its first.
  • Split over several pools, each pool sees a smaller trade, so each price moves less.
  • Splitting uses a little more gas, so small swaps often stay in one pool.
  • One trade, split apart.

More one-minute DeFi explainers: cleave.fi/blog