A liquidity pool is two tokens locked together in a smart contract, and a formula that sets the price between them. When you swap on a decentralised exchange you're not matched with another person. You trade against the pool. The formula is called an automated market maker, or AMM, and once you've seen it work with real numbers it stops being mysterious.

The pool

Picture a pool holding 10 ETH and 30,000 USDC. Anyone can add to it by depositing both tokens in equal value. They become a liquidity provider, or LP, and get LP tokens back as a receipt for their share.

The price of ETH in this pool is simply the ratio: 30,000 ÷ 10 = 3,000 USDC per ETH.

Prefer to watch? The short version in 43 seconds.

AI presenter. Written by Robert Stone. More in our DeFi Explained for Beginners playlist.

The formula

Uniswap made the simplest version famous in 2018: x × y = k. Multiply the two reserves and the answer has to stay the same after every trade. Here that's 10 × 30,000 = 300,000.

Now buy 1 ETH. The pool drops to 9 ETH, so the USDC side has to rise until 9 × y still equals 300,000. That's 33,333 USDC. You pay the difference, about 3,333 USDC plus a small fee, for one ETH that was "priced" at 3,000. That 11% gap is price impact. Your own trade moved the price against you.

11%price impact buying 1 ETH from a 10 ETH pool (worked example)
0.3%swap fee on Uniswap's classic pools, shared by LPs
5.7%impermanent loss if the price doubles or halves, before fees
The constant product curve for a pool of 10 ETH and 30,000 USDC ETH left in the pool USDC in the pool 5681012 60k40k30k Start: 10 ETH, 30k USDC price 3,000 After buying 1 ETH: 9 ETH, 33.3k USDC you paid about 3,333 for it Drain the ETH side and the price climbs steeply
Every trade slides along this curve. The further you push, the worse the price gets, which is why deep pools matter.

Put the same trade through a pool a hundred times bigger and the impact almost disappears. That's why pool depth is the first number to check before a big swap.

Why anyone provides liquidity: fees

Every swap pays a fee, 0.3% on Uniswap's classic pools, and it's split among LPs by their share. On a busy pool that adds up. It's the only reason to lend your tokens to a formula.

The cost nobody explains well: impermanent loss

When the price moves, the pool rebalances you automatically. It sells the token that's rising and buys the one that's falling. So if ETH doubles, you end up holding less ETH than you put in. Compared with just holding the two tokens in your wallet, you're behind.

ETH price moves byPool position vs just holding
+25% or -20%about 0.6% behind
2x or halfabout 5.7% behind
4x or a quarter20% behind
5x or a fifthabout 25.5% behind

Before fees, for a standard 50/50 pool. It's called "impermanent" because it shrinks again if the price comes back. If you withdraw while it hasn't, the loss is real. Fees have to beat this number for providing liquidity to have been worth it.

That's why stablecoin pairs, USDC with USDT say, suit cautious LPs. The price barely moves, so impermanent loss barely exists. A volatile token against a stablecoin is where it bites.

Should you do it?

It makes sense if you already plan to hold both tokens and the pool has steady volume. It's a poor fit if you expect one side to run hard, because the pool will sell your winner on the way up. Check the fee tier, the pool's depth and daily volume, and the protocol's audit history before depositing. For where pools fit in the wider picture, start with what DeFi actually is. To see how LP tokens get stacked for extra rewards, read yield farming explained.