Liquidity Pools Explained: How They Work in DeFi
Understand how liquidity pools work in DeFi. Learn about AMMs, the constant product formula, providing liquidity, earning fees, and associated risks.
Uvin Vindula — IAMUVIN
Published 2026-03-10
Liquidity Pools Explained: How They Work in DeFi
Written by Uvin Vindula (IAMUVIN) — Last updated March 2026
Introduction
Liquidity pools are the engine that powers decentralized exchanges (DEXs) and much of the DeFi ecosystem. Without them, decentralized trading as we know it would not be possible. Understanding how liquidity pools work is fundamental to understanding DeFi.
In traditional finance, trading relies on order books — buyers and sellers placing orders at specific prices, with a market maker facilitating trades. In DeFi, liquidity pools replace order books with a mathematical formula and pooled funds from users. This is the innovation that made decentralized trading practical.
What is a Liquidity Pool?
A liquidity pool is a smart contract that holds a pair of tokens (e.g., ETH and USDC) and allows users to trade between them. Instead of matching individual buyers with sellers, the pool acts as the counterparty to every trade.
Anyone can become a liquidity provider (LP) by depositing both tokens into the pool. In return, they earn a share of the trading fees generated by the pool. This is the core mechanism of Automated Market Makers (AMMs).
How AMMs Work: The Constant Product Formula
The most common AMM formula, used by Uniswap and many other DEXs, is the constant product formula:
x * y = k
Where:
- x = the quantity of Token A in the pool
- y = the quantity of Token B in the pool
- k = a constant (the product must remain the same after every trade)
Example
Imagine a pool with 10 ETH and 20,000 USDC:
- k = 10 × 20,000 = 200,000
- Implied price of ETH = 20,000 / 10 = 2,000 USDC
A trader wants to buy 1 ETH. After the trade, the pool must maintain k = 200,000:
- New ETH in pool: 9
- New USDC required: 200,000 / 9 = 22,222 USDC
- The trader pays: 22,222 - 20,000 = 2,222 USDC for 1 ETH
Notice the trader paid 2,222 USDC for 1 ETH even though the implied price was 2,000. This difference is called price impact or slippage. Larger trades relative to pool size have higher price impact.
Why Liquidity Pool Size Matters
Deeper pools (with more total liquidity) have less price impact for any given trade size. This is why large liquidity pools like Uniswap's ETH/USDC pair can handle millions of dollars in trades with minimal slippage, while small pools may have significant slippage even for small trades.
Providing Liquidity: Step by Step
- Choose a pool: Select a token pair you want to provide liquidity for
- Deposit tokens: Add both tokens in equal value to the pool (e.g., $1,000 of ETH + $1,000 of USDC)
- Receive LP tokens: The pool gives you LP tokens representing your share of the pool
- Earn fees: As traders use the pool, fees accumulate to your LP position
- Withdraw: When ready, return your LP tokens to withdraw your share of the pool (which now includes accumulated fees)
How Fees Work
Every trade through the pool incurs a fee (typically 0.3% on Uniswap v2, variable on v3/v4). This fee is added to the pool, increasing the value of all LP positions proportionally.
Fee Example
If a pool does $1,000,000 in daily trading volume with a 0.3% fee:
- Daily fees generated: $3,000
- If the pool has $10,000,000 in total liquidity, and you have 1% ($100,000), you earn $30 per day
- Annualized: approximately $10,950, or about 11% APR on your $100,000
However, this does not account for impermanent loss, which can reduce or eliminate these gains. See our impermanent loss guide for detailed coverage.
Concentrated Liquidity (Uniswap v3/v4)
Traditional AMMs spread liquidity across the entire price range from 0 to infinity. Uniswap v3 introduced concentrated liquidity, allowing LPs to allocate their liquidity within specific price ranges.
Benefits
- Much higher capital efficiency — earn more fees with less capital
- Can provide liquidity precisely where it is needed
Drawbacks
- If price moves outside your range, you stop earning fees
- Impermanent loss is amplified within the concentrated range
- Requires active management and monitoring
- More complex to set up and optimize
Types of Liquidity Pools
Constant Product Pools (Uniswap-style)
The standard x*y=k formula. Best for volatile token pairs.
StableSwap Pools (Curve-style)
Modified formula optimized for assets that should trade near parity (stablecoin-to-stablecoin, wETH-to-stETH). Provides much lower slippage for same-value swaps.
Weighted Pools (Balancer-style)
Allow custom weight ratios (e.g., 80/20 instead of 50/50) and pools with more than two tokens. Provides more flexibility for portfolio-like liquidity provision.
Risks of Liquidity Provision
- Impermanent loss: The most significant risk. Price divergence between pool tokens causes your position to be worth less than holding individually.
- Smart contract risk: Pool contracts can be exploited. Even audited contracts have been hacked.
- Rug pulls: If one token in the pair loses all value (e.g., project abandonment or fraud), your entire position is affected.
- Oracle manipulation: Some pool types rely on price oracles that can be manipulated.
- MEV (Maximal Extractable Value): Bots can front-run your trades and liquidity additions, extracting value from your transactions.
Choosing a Liquidity Pool
If you are considering providing liquidity (understanding all risks), here are factors to evaluate:
- Trading volume: Higher volume means more fees. Use analytics on our tools page to check.
- Pool TVL: Your share of fees is proportional to your share of the pool. Smaller pools mean larger fee share but also higher risk.
- Token pair correlation: Correlated pairs (stablecoin/stablecoin) have lower impermanent loss.
- Fee tier: Higher fee tiers compensate for higher volatility but may receive less trading volume.
- Protocol reputation: Stick to established, audited protocols.
Conclusion
Liquidity pools are a foundational innovation in DeFi, enabling decentralized trading without traditional market makers. They create opportunities for anyone to earn fees by providing liquidity, but they also carry significant risks that must be thoroughly understood.
Before providing liquidity, make sure you understand impermanent loss, smart contract risk, and the specific mechanics of the pool you are considering. Start with small amounts, use established protocols, and never deposit more than you can afford to lose. Visit our learning hub for more DeFi education.

By Uvin Vindula — IAMUVIN
Sri Lanka's leading Bitcoin educator. Author of "The Rise of Bitcoin".
Learn more →Related Articles
The Bitcoin Brief: LK
Weekly Bitcoin insights, market analysis, and Sri Lanka crypto news. Join 1,000+ readers.
Unsubscribe anytime · Educational content only