What Is a Liquidity Pool? How AMMs and Impermanent Loss Work
A liquidity pool is a smart contract holding two tokens that traders swap against. A formula sets the price, and depositors earn trading fees but face impermanent loss.

In this guide
A liquidity pool is a pot of two tokens locked in a smart contract that anyone can trade against. Instead of waiting for a buyer to meet a seller, you swap with the pool, and a formula sets the price based on how much of each token it holds. People who deposit tokens into the pool, called liquidity providers, earn a share of every trading fee.
Liquidity pools are the engine behind decentralized exchanges such as Uniswap, Curve and PancakeSwap, and behind much of decentralized finance (DeFi). They are clever, open to anyone and work around the clock. They also carry a cost that surprises many first-time depositors: impermanent loss.
This guide explains how the most common pool design works with a worked swap, how fees are shared, how to calculate impermanent loss, what concentrated liquidity changes, and the risks to weigh before you deposit.
What Is a Liquidity Pool?
Traditional exchanges use an order book: a list of buy and sell orders at different prices. A trade happens when a buyer’s price meets a seller’s. That works when there are many active traders and professional market makers, but it is slow and expensive to run on a blockchain, where every order update costs a transaction fee.
A liquidity pool replaces the order book. It is a smart contract, a program running on a blockchain, holding reserves of two tokens, for example ETH and the USDC stablecoin. If you want ETH, you send USDC into the pool and take ETH out. The contract calculates how much ETH you get using a fixed rule, so it can quote a price at any moment without anyone on the other side.
The people who supply those reserves are liquidity providers (LPs). In return for depositing both tokens, they receive LP tokens or a position NFT, a receipt that represents their share of the pool and can be redeemed for their share of the reserves plus accumulated fees. For the wider context, see our guide to what DeFi is.
How an Automated Market Maker Works
An automated market maker (AMM) is the pricing rule a pool uses. The most influential design, introduced by Uniswap, is the constant product formula:
x × y = k
Here x is the pool’s reserve of one token, y the reserve of the other, and k a constant. Every trade must leave the product of the two reserves unchanged (before fees). The price of token X in terms of Y is simply y / x. When you add Y and remove X, X becomes scarcer in the pool and its price rises. That automatic price adjustment is what lets the pool run without anyone setting prices by hand.
Two consequences follow. First, the pool can never run out of either token, because the price climbs toward infinity as a reserve approaches zero. Second, the pool’s price only moves when someone trades against it. If ETH rises on other exchanges, arbitrage traders buy the cheap ETH from the pool until its price matches the wider market, and they profit from the gap. That arbitrage is what keeps pool prices accurate, and, as you will see, it is also the source of impermanent loss.
Worked swap and price impact
Example: Suppose a pool holds 100 ETH and 300,000 USDC. Then k = 100 × 300,000 = 30,000,000, and the price is 300,000 / 100 = 3,000 USDC per ETH. The pool charges a 0.3% fee.
Small trade: you spend 3,000 USDC.
- Fee: 3,000 × 0.3% = 9 USDC. The amount that counts toward the swap is 2,991 USDC.
- New USDC reserve for the formula: 300,000 + 2,991 = 302,991.
- ETH that must remain: 30,000,000 / 302,991 ≈ 99.01284. You receive 100 − 99.01284 ≈ 0.98716 ETH.
- Your average price: 3,000 / 0.98716 ≈ 3,039 USDC per ETH, about 1.3% above the starting price (0.3% fee plus about 1% price impact).
Large trade: you spend 30,000 USDC.
- Fee: 90 USDC, so 29,910 USDC counts toward the swap. New USDC reserve for the formula: 329,910.
- ETH remaining: 30,000,000 / 329,910 ≈ 90.93389. You receive ≈ 9.06611 ETH.
- Average price: 30,000 / 9.06611 ≈ 3,309 USDC per ETH, about 10.3% above the starting price.
- The pool now holds about 90.93 ETH and 330,000 USDC (the fee stays in the pool), so the new pool price is about 330,000 / 90.93 ≈ 3,629 USDC per ETH.
A trade worth 1% of the pool’s USDC side cost about 1% in price impact; a trade worth 10% cost about 10%. Bigger pools, or “deeper liquidity,” mean less price impact for the same trade size.
Price impact is the change in price caused by your own trade. It is different from slippage, which is the difference between the price you were quoted and the price you actually got, often because other trades landed first. Most swap interfaces let you set a maximum slippage so a trade fails instead of filling at a much worse price.
Other AMM designs
Not every pool uses x × y = k. Stableswap pools, popularized by Curve, use a flatter curve for assets that should trade near 1:1, such as two dollar stablecoins, so large trades move the price very little. Weighted pools, used by Balancer, allow uneven splits such as 80/20 and more than two tokens. The trade-offs differ, but all of them price trades from reserves rather than from an order book.
How Liquidity Providers Earn Fees
Every swap pays a fee that stays in the pool. On Uniswap v2 it is 0.3% of the trade; Uniswap v3 and later offer several tiers, such as 0.01%, 0.05%, 0.3% and 1%, so stable pairs can charge less and volatile pairs more. Because the fee is added to the reserves, each LP token is redeemable for slightly more over time.
Your share of fees equals your share of the pool. If a pool holds $10 million and you supply $10,000, you own 0.1%. If the pool trades $2 million a day at a 0.3% fee, it collects $6,000 a day, and your share is $6 a day, or about $2,190 a year: a 21.9% fee yield on your $10,000. If volume falls to $500,000 a day, the same position earns about $547.50 a year, or 5.5%. Fee income is driven entirely by trading volume relative to pool size, so it is never fixed.
Some protocols pay extra incentive tokens to LPs on top of fees. That practice, combined with moving funds between pools and protocols to chase the best rate, is called yield farming; see our comparison of staking vs yield farming vs lending.
Impermanent Loss Explained
Impermanent loss (IL) is the gap between the value of your pool position and what the same tokens would be worth if you had just held them in your wallet. It happens whenever the prices of the two tokens move apart, in either direction.
The cause is arbitrage. When ETH’s market price rises, arbitrage traders buy ETH from the pool until the pool’s price catches up. That leaves the pool, and therefore you, with less ETH and more USDC. You end up holding less of the token that went up. When ETH falls, the reverse happens: the pool accumulates more of the falling token.
For a 50/50 constant product pool, the loss depends only on the price ratio r (new price divided by entry price):
Impermanent loss = 2 × √r / (1 + r) − 1
Example: Suppose you deposit 1 ETH and 3,000 USDC when ETH is $3,000, a total of $6,000. Your share of the pool behaves like a mini-pool with k = 1 × 3,000 = 3,000.
ETH then doubles to $6,000 (r = 2).
- The pool rebalances so that ETH held = √(k / price) = √(3,000 / 6,000) ≈ 0.7071 ETH, and USDC held = √(k × price) = √(3,000 × 6,000) ≈ 4,242.64 USDC.
- Pool position value: 0.7071 × $6,000 + $4,242.64 ≈ $8,485.28.
- If you had just held: 1 ETH × $6,000 + $3,000 = $9,000.
- Impermanent loss: $9,000 − $8,485.28 = $514.72, which is $514.72 / $9,000 ≈ 5.72%.
- Check with the formula: 2 × √2 / 3 − 1 = 2.8284 / 3 − 1 ≈ −0.0572, or 5.72%.
You still made money in dollars ($6,000 to $8,485), but you made $514.72 less than holding. To come out ahead of holding, the position would have needed more than $514.72 in fees over the period.
The loss grows quickly with larger moves and is the same whether a token rises or falls by the same ratio:
| Price change of one token vs the other | Impermanent loss vs holding |
|---|---|
| 1.25x (or 0.8x) | 0.6% |
| 1.5x (or 0.67x) | 2.0% |
| 2x (or 0.5x) | 5.7% |
| 3x (or 0.33x) | 13.4% |
| 4x (or 0.25x) | 20.0% |
| 5x (or 0.2x) | 25.5% |
The loss is called “impermanent” because it shrinks back to zero if prices return to your entry ratio. It becomes permanent when you withdraw while prices are diverged. Pools of closely correlated assets, such as two dollar stablecoins or ETH and a liquid staking version of ETH, have little impermanent loss because their prices rarely drift apart.
Concentrated Liquidity
In a classic pool, your deposit is spread across every possible price from zero to infinity, so most of it sits at prices that are never traded. Uniswap v3, launched in 2021, introduced concentrated liquidity: you choose a price range, such as ETH between $2,500 and $3,500, and your capital only provides liquidity inside it.
- Upside: inside your range, your capital works much harder, so you earn more fees per dollar than a full-range position of the same size.
- Downside: impermanent loss is magnified inside the range, in proportion to the extra capital efficiency.
- Out of range: if the price leaves your range, your position converts entirely into the less valuable of the two tokens (all ETH if the price falls below your range, all USDC if it rises above) and earns no fees until the price returns or you reposition.
Concentrated liquidity turns liquidity provision into an active strategy closer to market making. Professional LPs adjust ranges often; a passive beginner with a narrow range can easily end up out of range and holding the wrong token.
Risks of Liquidity Pools
- Impermanent loss: covered above; fees may not compensate for it.
- Market risk: if both tokens fall, your position falls too. A pool does not hedge you.
- Smart contract risk: bugs or exploits can drain pools. Use protocols with a long record and public audits, and remember audits reduce risk but do not remove it.
- Token risk: anyone can create a pool for any token. Scam tokens with hidden sell restrictions, and “rug pulls” where creators remove all liquidity, are common in new pools. See our guide to common crypto scams.
- Stablecoin depeg risk: a pool with a stablecoin that loses its peg will fill up with the failing coin as traders dump it.
- Costs: on Ethereum mainnet, deposits, withdrawals and range adjustments can cost more in gas than a small position earns. Layer 2 networks are cheaper; see our guide to Ethereum layer 2s.
- Taxes: depositing, withdrawing and claiming fees may be taxable events, and treatment varies by country.
Tip: Before depositing, run the math for a 2x and a 0.5x price move using the impermanent loss formula, then compare it with realistic fee income at the pool’s recent volume. If fees would not cover a 5.7% gap, holding the tokens may be the better choice.
How to Provide Liquidity: Step by Step
- Pick a reputable DEX and network, and connect a self-custody wallet (see our crypto wallet guide).
- Choose a pair you are comfortable holding in either proportion, since you may end up with more of the weaker token.
- Check the pool’s volume, size and fee tier to estimate fee income.
- Decide on full-range or concentrated liquidity, and if concentrated, how often you will monitor it.
- Deposit a small amount first, confirm your position appears, and learn how to withdraw.
- Track your results against simply holding, not just against your starting dollar value.
Bottom Line
A liquidity pool lets people trade tokens against a shared reserve priced by a formula, and lets anyone earn fees by supplying that reserve. The constant product rule makes every trade move the price, which is why large trades face price impact and why liquidity providers suffer impermanent loss when prices diverge. Providing liquidity pays when fees outrun that loss, which is most likely in busy pools of correlated assets. Before depositing, do the math for big price moves and treat any pool position as a market bet, not a savings product.
Sources
Frequently asked questions
What is a liquidity pool in simple terms?
It is a shared pot of two tokens locked in a smart contract. Anyone can trade one token for the other against the pot, paying a small fee, and anyone can add tokens to the pot to earn a share of those fees. A formula, not an order book, sets the price.
What is an automated market maker?
An automated market maker (AMM) is a type of decentralized exchange that prices trades with a formula based on the pool's reserves. The best-known formula is the constant product, x × y = k, used by Uniswap v2. AMMs let tokens trade around the clock without a company acting as market maker.
Impermanent loss explained: is it a real loss?
It is the difference between the value of your pool position and what you would have had by simply holding the two tokens. It becomes a realized loss if you withdraw while prices are diverged. If prices return to where you entered, it disappears, which is why it is called impermanent.
What is the difference between a yield farming vs liquidity pool?
A liquidity pool is the underlying product: you deposit tokens and earn trading fees. Yield farming is a strategy that often uses pools, adding incentive tokens, staking LP tokens in other contracts and moving between protocols for the highest return. Farming adds more risk layers on top of the pool's own risks.
Can you lose money in a liquidity pool?
Yes. You can lose from impermanent loss, from a fall in the price of the tokens themselves, from a smart contract exploit, or from depositing into a pool with a worthless or malicious token. Fees can offset impermanent loss, but they are not guaranteed to.
How do I choose a liquidity pool?
Look at the pool's trading volume relative to its size (which drives fees), how correlated the two tokens are (which drives impermanent loss), the protocol's track record and audits, and transaction costs on the network. Pools of two stablecoins have little impermanent loss; pools pairing a volatile token with a stablecoin have more.