Core concept

Liquidity pools and LP tokens, explained

A liquidity pool is the engine behind a decentralized exchange. Here we explain, in plain terms, what one is, what LP tokens represent, and why depositing into a pool carries real risk as well as mechanics worth understanding.

If you have read about how AMMs price swaps, you already know that decentralized exchanges do not match buyers with sellers the way a traditional order book does. Instead, trades happen against a shared reserve of tokens called a liquidity pool. This article looks at what those pools are made of, who supplies them, and what the tokens you receive in return actually represent.

What a liquidity pool is

A liquidity pool is a smart contract that holds reserves of two tokens — for example, a pool pairing a token called TOKEN-A with a token called TOKEN-B. Traders do not swap with another person; they swap directly with the contract. To buy TOKEN-A, someone adds TOKEN-B to the pool and removes TOKEN-A, and the contract adjusts the price automatically based on the changing ratio of the two reserves.

Because the pool is just code holding balances, anyone can read its contents on-chain at any time. The whole system runs without a central party deciding who can trade or at what price. For a fuller picture of how the price moves as reserves shift, see how AMMs price swaps.

Liquidity providers and LP tokens

The reserves in a pool have to come from somewhere. People who supply them are called liquidity providers, or LPs. A liquidity provider deposits a matched pair of tokens — typically a roughly equal value of each side — into the pool's contract.

In exchange for that deposit, the contract issues LP tokens. These are themselves tokens, and they act like a receipt: they record what proportional share of the pool you contributed. If you later return your LP tokens to the contract, you redeem them for your corresponding share of whatever the reserves hold at that moment. LP tokens are not a promise of any particular amount — they are a claim on a fraction of the pool.

On the left, a pool holds reserves of 1,000 Token A and 1,000 Token B (illustrative numbers). On the right, a donut chart shows an LP holding a 10 percent share of the pool, representing a claim on a fraction of the reserves.
LP tokens represent a proportional share of the pool's reserves.

An illustrative share

Here is a purely illustrative example, with invented round numbers. Suppose a pool holds 1,000 TOKEN-A and 1,000 TOKEN-B, and you deposit 100 of each. Your deposit would represent roughly one-tenth of each reserve, so you would hold LP tokens standing for about a 10% share. If reserves later change in size or ratio, your LP tokens still represent that same proportional slice — but the underlying amounts that slice is worth can be quite different.

How swap fees work in the pool

Every swap routed through a pool pays a small fee, and that fee is added to the pool's reserves rather than sent elsewhere. Because LP tokens represent a proportional share of the pool, each provider's share corresponds to a slice of those accumulated fees as well. Mechanically, the pool simply grows slightly with each trade's fee, and redeeming LP tokens later draws from that larger balance.

It is important to be clear about what this does and does not mean. The fee mechanism is not a guarantee of gain, income, or return. The value of your share can fall — sometimes below what you deposited — because the token prices and the pool's composition change while your funds are in it. Fees are a feature of how the contract works, not a payout you can count on. Before treating liquidity provision as anything other than a mechanism to understand, read about impermanent loss and smart-contract risk.

TVL: a descriptive measure

TVL stands for total value locked. It is simply a way to describe how much value is sitting in a pool (or across a whole protocol) at a given moment, usually expressed in a reference currency. A larger TVL means deeper reserves, which can mean swaps move the price less. TVL is descriptive only — it tells you the size of the pool, not whether participating in it is wise or safe.

What happens when you withdraw

When you redeem LP tokens, the contract returns your proportional share of the two reserves as they stand at that moment — not the exact tokens you put in. Because traders constantly swap one side for the other, the ratio of the two tokens shifts over time. So you may withdraw a different mix than you deposited: more of one token and less of the other.

This drift is the root of a phenomenon called impermanent loss, where the value of your withdrawn share can be lower than if you had simply held the two tokens separately. It is a genuine risk, not a footnote. The risks article walks through how it arises and what else can go wrong, including bugs in the contract itself.

Key takeaways

  • A liquidity pool is a smart contract holding reserves of two tokens that traders swap against directly.
  • LP tokens are a receipt for your proportional share of a pool; redeeming them returns a share of the current reserves, not your original deposit.
  • Swap fees accumulate in the pool as a mechanism — they are not guaranteed gains, and a provider's share can lose value.
  • TVL simply describes how much is in a pool; it is not a measure of safety or quality.
  • Withdrawals can return a different ratio of tokens than you deposited, which is why impermanent loss matters.

Make sure you understand impermanent loss and smart-contract risk first, or revisit how AMMs price swaps.

Disclaimer: This article is educational content only. It is not investment, financial, legal, or tax advice, and not a recommendation to buy, sell, or trade any asset. Crypto involves significant risk, including total loss of funds.