What Is a Liquidity Pool?
A liquidity pool is a smart-contract reserve of two tokens that lets people trade on a DEX without an order book. Learn how liquidity pools work.
A liquidity pool is a smart contract that holds a reserve of two (or more) tokens so people can trade against that reserve instead of against another human placing an order. On a decentralized exchange (DEX), the pool is the market: an algorithm called an automated market maker (AMM) sets the price from the ratio of tokens sitting in the pool, and every swap is settled directly against those reserves. People who deposit tokens into the pool are called liquidity providers (LPs), and in return they typically earn a share of the trading fees.
This article explains what a liquidity pool is, how the underlying math works, why prices move when you trade, and the real risks LPs take on. It is educational and not financial advice.
Why liquidity pools exist
Traditional exchanges match a buyer with a seller through an order book. That works well when many people are actively quoting prices, but it struggles for thousands of niche tokens that have few active traders. Liquidity pools solve this differently: instead of waiting for a counterparty, you trade against a shared reserve that is always available. If you want to understand the alternative model, see our explainer on order books and how they compare in CEX vs DEX.
Because anyone can supply tokens and anyone can trade, pools make markets permissionless. This is one of the foundations of decentralized finance (DeFi).
How the constant product formula works
The most common AMM design uses the constant product formula, written as x * y = k. Here x and y are the quantities of the two tokens held in the pool, and k is a value that the formula keeps constant during a trade (fees aside). The current price is simply the ratio between the two reserves.
Suppose a pool holds token A and token B. When someone buys token A, they remove A from the pool and add B. To keep x * y = k constant, the price of A rises as its reserve shrinks. The next buyer pays slightly more. When someone sells A back, the reserve refills and the price falls again. The pool never runs out of a token entirely, because the price approaches infinity as a reserve approaches zero.
What liquidity providers actually do
To join a pool, an LP usually deposits equal value of both tokens. In exchange, they receive LP tokens that represent their share of the pool. Those LP tokens are a claim: burn them later to withdraw your proportional slice of the reserves plus any fees the pool has accumulated.
- Fees: Every swap charges a small fee that is added to the pool, growing each LP’s share.
- Proportional exposure: Your share reflects a percentage of the pool, not a fixed number of tokens. The token mix shifts as people trade.
- Composability: LP tokens can often be used elsewhere in DeFi, which is the basis of yield farming.
Price impact and slippage
Because price is set by the reserve ratio, a trade that is large relative to the pool moves the price against the trader. This is slippage. A small trade in a deep pool executes close to the quoted price; a large trade in a shallow pool can execute far worse. Deeper pools (more total value locked) generally mean less price impact for the same trade size.
| Concept | What it means for the pool |
|---|---|
| Reserves | The token balances that set the price |
| Constant product | x * y = k holds through each swap |
| Depth | More reserves means lower price impact per trade |
| LP token | A claim on your share of reserves and fees |
The main risks of providing liquidity
Supplying liquidity is not free yield. The two risks every LP should understand are:
- Impermanent loss: When the two tokens’ relative price diverges from where you deposited, the pool automatically rebalances by selling the rising asset and buying the falling one. The result can be worth less than if you had simply held both tokens in a wallet. The loss becomes permanent only if you withdraw while prices are diverged; fees earned may or may not offset it.
- Smart-contract risk: The pool is code. Bugs, exploits, or malicious upgrades can drain funds, and audits reduce but never eliminate this risk.
Other considerations include volatile or low-quality token pairs and the possibility of a rug pull when a new token’s team controls the pool. There is also a subtler point: fees are earned in proportion to trading volume, so a pool with lots of deposited value but little actual trading may pay very little, while a busy pool can reward providers well. Because of this, a high total value locked does not by itself signal a good place to provide liquidity.
How pool prices stay in line with the market
A pool does not know the outside market price on its own; it only knows its reserve ratio. So how does a pool track the global price of an asset? The answer is arbitrage. If a pool’s price drifts below the price elsewhere, traders buy the cheaper asset from the pool until the ratio, and therefore the price, moves back into line. If it drifts above, they sell into the pool. These arbitrageurs are chasing profit, but the side effect is that they continuously pull the pool’s price toward the broader market. Their trades also generate fees for LPs, though the price correction is what causes much of the impermanent loss described above. In other words, the same mechanism that keeps a pool fairly priced is tied to the main cost LPs bear.
This is why deep, high-volume pools tend to price closely to centralized venues: arbitrage is fast and cheap when spreads are small. Thin pools can drift further before it becomes worthwhile for anyone to correct them, which is one more reason pool depth matters.
Concentrated liquidity and newer designs
Newer AMMs let LPs concentrate their capital within a chosen price range rather than spreading it across all possible prices. This can improve fee efficiency but increases the chance that price moves outside your range, at which point your position stops earning fees and sits entirely in one token. Different pools also use different formulas: stablecoin-focused pools use curves designed to minimize slippage between assets meant to trade near parity, such as a stablecoin pair. Some designs support pools with more than two assets, and others adjust weightings so the two sides do not have to be an even split. The common thread is that a formula, not a human market maker, prices every trade.
How to think about pool depth and total value locked
You will often see pools ranked by total value locked (TVL), the combined value of all assets deposited. TVL is a rough proxy for depth: higher TVL usually means smaller price impact per trade and more fee volume to share, but it also means your deposit represents a smaller slice of the pool and therefore a smaller share of the fees. TVL alone does not tell you whether a pool is safe or whether its trading volume is real; a large pool with little volume earns little in fees, while a smaller pool with heavy volume can earn more per dollar deposited. Considering fees relative to TVL, rather than TVL by itself, gives a clearer picture. None of this is a recommendation to provide liquidity; it is background for understanding how pools behave.
Frequently asked questions
What is a liquidity pool in simple terms?
It is a shared pot of two tokens held in a smart contract. Traders swap against the pot, and the people who filled the pot earn a share of the trading fees.
How do liquidity providers earn money?
They earn a portion of the fee charged on every swap, proportional to their share of the pool. Some protocols add extra token rewards on top, which is part of yield farming.
What is impermanent loss?
It is the shortfall between holding tokens in a pool versus holding them in a wallet when the tokens’ relative price changes. It becomes a realized loss only when you withdraw while prices are diverged.
Do liquidity pools use an order book?
No. They use an automated market maker that prices trades from the reserve ratio, which is a different model from the order books used on most centralized exchanges.
Are liquidity pools safe?
They carry smart-contract risk, impermanent loss, and token-quality risk. No pool is risk-free, and audits reduce but do not remove the danger of bugs or exploits.
What are LP tokens?
LP tokens are receipts that represent your share of a pool. You redeem them to withdraw your portion of the reserves plus accumulated fees.