BTC —ETH —SOL —

Liquidity Pools and Impermanent Loss Explained With Examples

Liquidity pools power decentralised exchanges, and providing liquidity can earn fees but also cause impermanent loss. Here is how both work, with simple numbers.

Liquidity Pools and Impermanent Loss Explained With Examples

A liquidity pool is a smart contract holding two or more tokens that traders swap against, and impermanent loss is the value a liquidity provider can lose compared with simply holding those tokens when their prices move apart. Pools replace the order books used by traditional exchanges.

Anyone can deposit tokens into a pool and earn a share of the trading fees, which sounds like easy income. The catch is that the way pools rebalance can leave you with less value than if you had done nothing. This guide explains the mechanism with round example numbers so you can judge the trade-off yourself.

Key takeaways

  • A liquidity pool is a pot of tokens in a smart contract that lets people trade without a traditional buyer and seller.
  • Liquidity providers deposit equal values of two tokens and earn a share of trading fees.
  • Impermanent loss is the gap between your pool position and simply holding the same tokens. It grows when prices diverge.
  • Fees can offset the loss but do not always do so. Smart contract bugs, scam tokens and withdrawal timing add more risk.
  • Nothing here is financial advice. Never deposit funds you cannot afford to lose.

What is a liquidity pool?

On a traditional exchange, buyers and sellers post orders and the exchange matches them. Many decentralised exchanges work differently. They use an automated market maker (AMM), where a smart contract holds a pool of two tokens, for example ETH and a stablecoin, and lets users swap one for the other at a price set by a formula. See CEX vs DEX for the wider picture.

The pool is funded by ordinary users called liquidity providers (LPs). In return for supplying tokens, they receive LP tokens, which act as a receipt for their share of the pool. When they withdraw, they hand back the LP tokens and receive their portion of whatever the pool then holds.

How prices are set in a pool

The simplest and best known model keeps the product of the two token amounts constant. This is called the constant product formula, usually written x multiplied by y equals k. When a trader buys one token from the pool, the amount of that token falls and the other rises, so the price shifts automatically. Larger trades move the price more, an effect called slippage.

Because the pool reads its price only from its own balances, arbitrage traders step in when the pool price differs from other markets. They buy the cheap side and sell the expensive side until prices line up. This keeps the pool roughly in line with the wider market, but it also drives the effect we call impermanent loss.

How liquidity providers earn

Each swap pays a small fee, often between 0.01% and 1% depending on the pool. The fee is added to the pool and shared among LPs in proportion to their share. Some projects also pay extra rewards in their own token, which is discussed in what is yield farming.

  • Trading volume: more swaps means more fees.
  • Pool size: your share shrinks if many others deposit too.
  • Fee tier: higher fees suit riskier, more volatile pairs.
  • Price stability: pairs that stay close in price, such as two stablecoins, create less impermanent loss.

Impermanent loss with a simple example

Here is a deliberately simple example with round numbers. They are illustrations, not real prices, and fees are ignored.

Suppose you deposit 1 ETH and 1,000 stablecoin units into a pool when 1 ETH is worth 1,000 units. Your deposit is worth 2,000. The pool as a whole holds 10 ETH and 10,000 units, so you own 10% of it.

Now the price of ETH doubles to 2,000 on other markets. Arbitrage traders buy cheap ETH from the pool until the pool matches that price. Because the product stays constant, the pool ends up holding about 7.07 ETH and 14,142 units. Your 10% share is about 0.707 ETH and 1,414 units. At the new price, that is worth about 2,828.

OptionResult at new priceValue
Just held 1 ETH and 1,000 units1 ETH at 2,000 plus 1,0003,000
Provided liquidity0.707 ETH at 2,000 plus 1,414about 2,828
Differenceimpermanent lossabout 172 (roughly 5.7%)

You still made money in absolute terms, but less than holding. The loss is called impermanent because it shrinks if the price returns to where it started. It becomes permanent when you withdraw while prices are apart. For a price change of 4 times, the gap versus holding is about 20%, so the effect grows as prices diverge in either direction.

Other risks to know

  • Smart contract risk: bugs and hacks can drain a pool. Read about smart contracts and their limits.
  • Scam tokens: a pool with a worthless token can be created by anyone. If the project’s creators withdraw their side, the remaining pool can be left with nothing of value, a rug pull. See crypto scams.
  • Token price crash: if one token collapses, you may end up holding mostly that token.
  • Fees and gas costs: on some networks, depositing and withdrawing costs enough to eat small profits. Read gas fees explained.
  • Tax and legal treatment: rules vary by country, and each action can count as a taxable event.

Some newer pools let providers choose a price range for their liquidity (concentrated liquidity). This can earn more fees per deposit, but it needs active management and can increase impermanent loss when the price leaves the range.

A note on fees versus impermanent loss

Whether a pool is worth it depends on how fees compare with the price drift. In the earlier example, a loss of about 172 against holding would be covered if the pool earned fees worth more than about 8.6% of the deposit over the same period. A busy pool of correlated assets may achieve that, while a quiet pool of volatile assets often does not. Fees are earned continuously, while impermanent loss depends on where the price ends up, so the outcome is only clear in hindsight.

How to approach pools sensibly

  1. Understand the pair. Two stablecoins carry little impermanent loss but still have smart contract and stablecoin risk (see stablecoins).
  2. Use well known platforms that have been audited and in operation for a long time. Audits reduce risk but do not remove it.
  3. Test with a very small amount first.
  4. Use an online calculator to model different price changes before depositing.
  5. Only use funds you can afford to lose entirely, and keep track of the dates and amounts for tax records.
What is a liquidity pool in simple terms?

It is a shared pot of two tokens in a smart contract. Traders swap one token for the other against the pot, and the people who funded it earn fees.

Is impermanent loss a real loss?

It is a real difference in value compared with holding, but only becomes realised when you withdraw. If prices return to the starting ratio, the loss disappears. Fees earned may partly or fully offset it.

Can I lose all my money in a liquidity pool?

Yes, in extreme cases. A hacked contract, a rug pull or a collapsed token can wipe out most or all of a deposit.

Which pools have the least impermanent loss?

Pools of assets that move together in price, such as two stablecoins pegged to the same currency, have the least. They are not free of risk, because a stablecoin can lose its peg.

Do I need to understand the formulas to use a pool?

The maths helps, but the key idea is that the pool rebalances automatically as prices change, so you end up with more of the falling token and less of the rising one.

Next step: see how rewards stack on top of fees in what is yield farming, and learn the platform side in what is DeFi.