Liquidity Pool
How Liquidity Pools Work
Traditional exchanges rely on order books — a list of buy and sell orders waiting to be matched. DEXs like Uniswap replaced that with Automated Market Makers (AMMs), which use liquidity pools and a pricing algorithm instead.
Here’s the basic mechanism:
- Providers deposit pairs. A liquidity provider (LP) deposits two tokens in equal value (e.g., $1,000 worth of ETH and $1,000 worth of USDC) into a pool’s smart contract.
- Traders swap against the pool. When someone wants to trade ETH for USDC, they swap against the pool rather than another person. The AMM algorithm adjusts prices based on the ratio of tokens in the pool.
- Fees are distributed. Each swap charges a small fee (typically 0.3%) that gets distributed proportionally to all LPs based on their share of the pool.
- LP tokens track ownership. When you deposit, you receive LP tokens representing your share. Redeem them to withdraw your portion of the pool plus accumulated fees.
The Constant Product Formula
Where x = reserve of Token A, y = reserve of Token B, and k = constant. Every trade changes the ratio of x and y, but their product must remain constant. This is what automatically adjusts the price as trades occur — buy a lot of one token, and it gets more expensive relative to the other.
Major Liquidity Pool Protocols
| Protocol | AMM Model | Key Feature |
|---|---|---|
| Uniswap | Constant product (v2) / Concentrated (v3) | Largest DEX by volume; concentrated liquidity in v3 |
| Curve | StableSwap invariant | Optimized for stablecoin pairs with minimal slippage |
| Balancer | Weighted pools (custom ratios) | Supports pools with more than 2 tokens and custom weights |
| SushiSwap | Constant product | Community-governed fork of Uniswap with additional incentives |
| PancakeSwap | Constant product | Largest DEX on BNB Chain; lower fees |
Impermanent Loss Explained
Impermanent loss is the key risk unique to liquidity provision. It happens when the price ratio of your deposited tokens changes after you enter the pool.
| Price Change | Impermanent Loss |
|---|---|
| 1.25x (25% move) | ~0.6% |
| 1.50x (50% move) | ~2.0% |
| 2x (100% move) | ~5.7% |
| 3x (200% move) | ~13.4% |
| 5x (400% move) | ~25.5% |
The loss is “impermanent” because it reverses if prices return to the original ratio. In practice, fees earned can offset smaller impermanent losses, but large price swings can make providing liquidity a net negative compared to simply holding.
Key Takeaways
- Liquidity pools replace traditional order books with smart contract-based token reserves.
- Automated Market Makers (AMMs) use mathematical formulas to price trades against the pool.
- LPs earn trading fees proportional to their pool share but face impermanent loss risk.
- Impermanent loss grows exponentially with price divergence — stablecoin pairs carry the least risk.
- TVL is a useful metric for comparing protocols, but always check what’s driving the liquidity — fees or incentives.
Frequently Asked Questions
What is a liquidity pool in DeFi?
A liquidity pool is a smart contract that holds reserves of two or more crypto tokens. It powers decentralized trading by letting users swap tokens directly against the pool instead of waiting for a counterparty. Providers who deposit tokens earn a share of trading fees.
How do you earn money from a liquidity pool?
By depositing tokens into the pool, you become a liquidity provider (LP). Every trade that goes through the pool charges a fee — typically 0.3% — and your share of those fees is proportional to your share of the total pool. Some protocols also offer bonus token rewards through yield farming programs.
What is impermanent loss?
Impermanent loss occurs when the price ratio of tokens in your pool changes relative to when you deposited. The AMM rebalances your position, leaving you with more of the cheaper token and less of the expensive one. If prices don’t revert, the loss becomes permanent.
Are liquidity pools safe?
They carry meaningful risks: impermanent loss, smart contract bugs, and potential exploits. Established, audited protocols (Uniswap, Curve, Aave) have stronger track records, but no DeFi protocol is risk-free. Never deposit more than you can afford to lose.
What is Total Value Locked (TVL)?
TVL measures the total dollar value of assets deposited in a protocol’s liquidity pools and smart contracts. It’s the most-watched metric in DeFi for gauging protocol adoption. Higher TVL generally means deeper liquidity and better trading conditions, but it can be artificially inflated by temporary incentive programs.