Who fills the pools? In plain words

By Cleave Protocol

Liquidity providers fill the pools and earn a share of swap fees. What they earn, why their mix of tokens shifts, and what impermanent loss really means.

Watch on YouTube

Swapping one token for another on a DEX, a market run by a program, usually takes tokens out of a pool. The program did not make them, so somebody had to put them there. Who did, and why would anyone leave tokens in a pot for strangers to trade against?

A shared pot with receipts

A liquidity pool is a shared pot, usually of two tokens, and its mix sets the price. The people who fill it are called liquidity providers.

Say Dana joins a USDC and ETH pool on Base. USDC is a digital dollar, and ETH is Ethereum's main coin. In this pool, one ETH costs 2,000 USDC, and all the numbers here are made up. A simple pool takes both tokens in equal value, so she adds 1,000 USDC and 0.5 ETH.

In return she gets a receipt for her share. The receipt is her claim on the pot. When she wants out, she hands it back and takes her share of whatever the pot holds by then.

Why bother? Every swap pays the pool a small fee. Most of it goes to providers, split by share. Picture small drips falling into the pot with each trade. If Dana owns 1 percent of the pool, she gets 1 percent of what the providers earn.

Why the mix shifts

Fees are only half of the story. The other half starts when prices move.

Say ETH doubles to 4,000 dollars elsewhere. The pool cannot see that. It still offers ETH at the old price, so traders buy ETH from it until its price catches up. Each of those trades takes ETH out and puts USDC in.

So Dana's share changes. In a simple pool, she started with 1,000 USDC and 0.5 ETH. She now has about 1,414 USDC and 0.354 ETH. At the new price, that is worth about 2,830 dollars.

If she had just held her tokens, she would have 1,000 USDC and 0.5 ETH worth 2,000 dollars, or 3,000 dollars in all. That gap of about 170 dollars, before fees, is called impermanent loss.

What people get wrong

It is not always a loss on what she put in. Dana started with 2,000 dollars and ended with about 2,830. The gap is measured against just holding. If ETH had fallen instead, she would have ended with more ETH as it dropped, and a gap would open that way too. Then her share is worth less than she put in, and a bit less than the tokens she could have kept.

Impermanent does not mean harmless. The name comes from the fact that the gap can shrink if prices come back. If ETH returned to 2,000 dollars, it would close. But if she takes her share out while prices are apart, the gap is locked in.

Fees are not a promise. They may or may not make up for the gap. Yearly rates shown next to a pool are usually worked out from recent fees, and they do not count the gap at all.

What moves the result

Three things decide how this plays out for a provider:

  • How far the two tokens drift apart. Two tokens that both track the dollar usually barely move against each other, so the mix shifts little. A pair that swings a lot shifts more.
  • How much trading the pool sees. More swaps mean more fees, split among everyone with a share.
  • What happens to each token. If one token collapses, traders hand it to the pool and take out the other, so providers end up holding mostly the one that fell.

The pool's program can also have flaws, like any program.

In short

  • Pools are filled by liquidity providers, who get a receipt for their share.
  • Providers earn most of the swap fees, split by share.
  • When prices move, traders shift the mix, so a share ends up with less of the token that rose.
  • If prices move a lot, the share can be worth less than just holding, and fees may or may not cover that gap.

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