Skip to content

GLOSSARY · BLOCKCHAIN & WEB3

Liquidity Pool

A pool locks two tokens in a contract so swaps trade against it instead of an order book. You collect a fee and you take on impermanent loss in exchange.

Reviewed on

What is a liquidity pool?

A liquidity pool is a reserve of two or more tokens locked in a smart contract that users trade against directly, without an order book. An algorithm, the automated market maker (AMM), sets the price from the reserves. The people who supply the tokens, the liquidity providers, earn a fee on every swap and in return take on risks of their own, such as impermanent loss. Pools are the building block of decentralized exchanges (DEXs).

How does an AMM work (x · y = k)?

The basic model is the constant product, the one Uniswap v2 uses: if the pool holds x units of one token and y of the other, every swap must leave the product x · y the same as before, fees aside (x · y = k). In Uniswap v2, every swap pays a 0.3% fee. Since December 2025, when Uniswap governance turned on the protocol fee, 0.25% is distributed to liquidity providers, in proportion to their share of the pool, and 0.05% goes to the protocol.

Example. A pool holds 10 ETH and 20,000 USDC: k = 200,000 and the price is 2,000 USDC per ETH. To take out 1 ETH, the pool must be left with 9 ETH and 200,000 / 9 ≈ 22,222.22 USDC, so the buyer pays in about 2,222.22 USDC, before the fee. On average they paid 11.1% more than the starting price, and the pool price rises to about 2,469 USDC per ETH. That gap is slippage: the smaller the pool relative to the trade, the bigger it gets.

Impermanent loss: a worked example

When the price of one token changes against the other, arbitrage brings the pool price in line with the market, and the provider ends up with more of the token that falls and less of the one that rises. Compared with holding the tokens separately, their stake is worth less: that is impermanent loss. It is called impermanent because it disappears if the price returns to the original ratio; if you withdraw before that, it becomes permanent. Uniswap's documentation calculates it as 2 · √r / (1 + r) − 1, where r is the price change.

Example. You deposit 1 ETH and 2,000 USDC (4,000 USDC in total) into a constant product pool. ETH rises to 4,000 USDC. After arbitrage, your share is about 0.7071 ETH and 2,828.43 USDC, worth 5,656.85 USDC. Had you held the tokens, you would have 6,000 USDC: the difference, 343.15 USDC, is a 5.7% loss, before adding the fees earned. With the same formula, a 1.5x price change costs 2.0%; a 3x change, 13.4%; and a 5x change, 25.5%.

Types of liquidity pools

  • Constant product (x · y = k): works for any token pair; it is the Uniswap v2 design (March 2020).
  • Stableswap: built for assets that should trade close to 1:1, such as two stablecoins. The design Michael Egorov of Curve published on November 10, 2019 starts from a constant-sum curve and blends it with the constant product so that slippage stays minimal near the peg.
  • Concentrated liquidity: each provider chooses the price range where their capital works, which makes the pool more capital efficient. If the price leaves that range, their liquidity is no longer active, stops earning fees and ends up entirely in one of the two tokens. It is the Uniswap v3 design (March 2021).

Liquidity pool vs. order book

Liquidity pool (AMM)Order book
Who sets the priceA formula, based on the pool's reservesBuyers' and sellers' orders
CounterpartyThe pool's smart contractAnother user whose order is matched with yours
Who supplies liquidityProviders who deposit both tokensTraders who leave limit orders on the book
Cost for the traderThe pool fee plus slippage, which grows with trade sizeThe venue fee plus the bid-ask spread
Where it is usedDecentralized exchangesTraditional markets and centralized exchanges

Liquidity pool risks

  • Smart contract failure: a bug in the code can freeze or drain the funds. That is why contracts are audited before launch (smart contract audit).
  • Rug pull: in pools for newly created tokens, whoever controls the token or most of the liquidity can pull it out at once and leave the token with nothing to trade against.
  • Oracle manipulation: a pool's spot price can be moved with one large trade, so other contracts that use it as a price reference can be tricked. That is why Uniswap v2 added a time-weighted average price oracle; according to its whitepaper, the price at the end of a block is harder to manipulate than the price within a block.
  • Impermanent loss and slippage, explained above, and dependence on temporary incentives when the yield comes from protocol rewards rather than fees.

How to provide liquidity, step by step

  1. Choose the pool and check its contract, audit, volume and fee.
  2. Hold both tokens in your wallet in the ratio the pool requires.
  3. Approve the contract to use your tokens and deposit them.
  4. You receive proof of your share: liquidity tokens in Uniswap v2, or a non-fungible position in Uniswap v3.
  5. To exit, you return that position and get back your share of the reserves and of the accrued fees.

TVL (total value locked) measures how much capital sits in a protocol's pools.

Official sources: Uniswap v2: Understanding Returns (impermanent loss); Uniswap: fees and protocol fees; Uniswap v2 Core whitepaper, March 2020; Uniswap v3 Core whitepaper, March 2021; StableSwap, M. Egorov, November 10, 2019.

Framework verified as of October 15, 2026. At Unknown Gravity we develop and audit DeFi protocols, including AMMs and liquidity pools. Talk to us.

Learn more: What Is Blockchain and How Does It Work? Types, Real Examples and Limits

Explained simply

A liquidity pool is a stash of two tokens held in a smart contract so that anyone can swap one for the other without waiting for a buyer or a seller to show up. The people who supply the tokens earn a fee on every swap. It is not free money: if the price of one token moves a lot, they can get back less value than if they had simply held the tokens. That is called impermanent loss.

Liquidity Pool: key points

  • A reserve of tokens in a smart contract that users trade against without an order book
  • An AMM sets the price; in Uniswap v2, with the formula x · y = k
  • Liquidity providers earn fees: in Uniswap v2, 0.25% of volume, out of a 0.3% total fee
  • Impermanent loss: 5.7% if one token's price doubles against the other
  • Three designs: constant product, stableswap and concentrated liquidity

Liquidity Pool: advantages

  • Always-on liquidity: you can trade at any hour without waiting for a counterparty
  • Open: anyone can supply liquidity and earn fees
  • Transparent: reserves, price and fees can be checked on-chain

Liquidity Pool: disadvantages

  • Impermanent loss when the tokens' relative price changes
  • Contract and rug pull risk in unaudited pools or pools for new tokens
  • Slippage: a large trade in a small pool moves the price a lot