What is a liquidity pool? In plain words

By Cleave Protocol

On most DEXs, the price comes from a pot of two tokens and one rule. How a liquidity pool sets a price, with a worked example, and why pool size matters.

Watch on YouTube

A swap app shows you a price within a second. No trader offered it, and nobody at a desk typed it in. On most DEXs, that price comes from a pot of tokens and one simple rule.

Two linked tanks

A DEX is a market run by a program, and that pot is what the program trades from. It is called a liquidity pool. Liquidity just means tokens ready to trade.

Most pools hold two kinds of token, like USDC, a dollar token, and ETH, Ethereum's main coin. Think of two tanks joined together, one for each token. To swap, you pour one token in and take the other out. One level rises, and the other falls.

Here is the rule: the price comes from the mix inside. The token that is running low costs more. The token that is piling up costs less. Nobody decides this. A program that sets prices by itself like this is called an automated market maker.

The rule, with numbers

A classic version of the rule fits in one line: multiply the two amounts, and the answer stays the same after every swap. Many newer pools use more involved versions, but the idea holds.

Here is a made-up pool, leaving its small swap fee aside:

  • It holds 200,000 USDC and 100 ETH.
  • Divide one by the other, and one ETH costs 2,000 USDC in this pool.
  • Someone swaps 2,000 USDC for ETH and gets about 0.99 ETH.
  • The pool now holds 202,000 USDC and about 99 ETH.
  • The next ETH costs about 2,040 USDC.

One swap moved the price by about 2 percent. ETH got a bit rarer in the pool, so the next ETH costs a bit more.

Now run the same swap in a pool ten times the size, with 2 million USDC and 1,000 ETH. The price only moves to about 2,004 USDC, or about 0.2 percent. The tanks are bigger, so the same pour barely changes the levels.

That is the thing to remember about pools. In a simple pool like this one, the more tokens it holds, the less each trade moves its price. In many newer pools, what counts is how many tokens sit near the current price.

What people get wrong

The pool does not know the market price. It only knows its own mix. It cannot look up what ETH costs anywhere else. Traders are what keep it in line. If ETH gets cheaper in the pool than elsewhere, traders buy it there until prices match. If it gets more expensive, they sell it there. So a pool's price tends to follow the wider market, but only because people keep trading against it.

There is no single pool. The same two tokens can sit in many pools, on many DEXs and on different chains. Each one has its own mix, so their prices can differ a little at any moment.

A pool's price is only for the next small bit. A larger swap keeps changing the mix as it goes, so it pays more and more along the way. That effect is called price impact, and a later part covers it.

Some pools hold more than two tokens. Most hold two, which is why two tanks is a fair picture. The rule that the mix sets the price still applies.

What to check

A pool's size is a rough guide to how easily its price moves. A token with a small pool can swing hard on a trade that does not feel large. Most swap apps show price impact as a percent before you sign: how much less you get than at the starting price. In the first example that is about 1 percent, even though the pool's price ended about 2 percent higher. If that number looks high for the amount you typed, the pool is small compared with your trade.

In short

  • A liquidity pool is a pot of tokens, usually two, that a DEX trades from.
  • The mix inside the pool sets the price, and every swap changes the mix.
  • Traders keep a pool's price close to prices elsewhere.
  • The more tokens a pool has near the current price, the less each trade moves its price.

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