How Liquidity Provision Works
Lesson by Uvin Vindula
Liquidity provision is the act of depositing pairs of tokens into a decentralized exchange's liquidity pool, enabling other users to trade those tokens. In return, liquidity providers (LPs) earn a share of the trading fees. This is the fundamental mechanism that makes decentralized trading possible.
The Problem Liquidity Provision Solves
Traditional exchanges (like the Colombo Stock Exchange or Binance) use an order book model: buyers place bids, sellers place asks, and trades happen when prices match. This requires professional market makers — firms that constantly place buy and sell orders to ensure there's always someone to trade with.
Decentralized exchanges can't efficiently run order books on-chain (it would be too slow and expensive). Instead, they use Automated Market Makers (AMMs) — mathematical formulas that determine prices based on the ratio of tokens in a pool.
How AMMs Work
The most common AMM formula is the constant product formula, pioneered by Uniswap:
x × y = k
Where x is the quantity of Token A, y is the quantity of Token B, and k is a constant. When a trader buys Token A, they add Token B to the pool and remove Token A. The ratio changes, and the price adjusts accordingly.
For example, imagine a pool with 10 ETH and 20,000 USDC (k = 200,000). If someone buys 1 ETH, they must add enough USDC to keep k constant. The more ETH they buy, the higher the price rises — creating a natural price curve that adjusts with supply and demand.
Becoming a Liquidity Provider
To provide liquidity, you typically:
- Choose a pool: Select a trading pair (e.g., ETH/USDC, BTC/WBTC) on a DEX like Uniswap, SushiSwap, or PancakeSwap.
- Deposit equal value: You must deposit both tokens in equal dollar value. For an ETH/USDC pool with ETH at $2,000, you'd deposit 1 ETH and 2,000 USDC.
- Receive LP tokens: The protocol gives you LP tokens representing your share of the pool. These are your "receipt" for your deposit.
- Earn fees: Every trade in the pool generates a fee (typically 0.3%), which is distributed proportionally to all LPs based on their share of the pool.
- Withdraw anytime: You can burn your LP tokens to withdraw your share of the pool's assets at any time.
Concentrated Liquidity
Uniswap V3 introduced concentrated liquidity, allowing LPs to specify a price range within which their liquidity is active. This is more capital-efficient — you earn more fees per dollar deposited — but requires active management. If the price moves outside your range, you stop earning fees and your position becomes 100% one token.
For Sri Lankan users exploring DeFi, understanding liquidity provision mechanics is essential before committing any capital. The concept is straightforward, but the risks — particularly impermanent loss, which we cover in the next lesson — require careful consideration.
Key Takeaways
- •Liquidity providers deposit token pairs into pools to enable decentralized trading
- •AMMs use mathematical formulas (x × y = k) instead of order books to determine prices
- •LPs earn trading fees proportional to their share of the pool
- •Concentrated liquidity (Uniswap V3) is more capital efficient but requires active management
- •Understanding the mechanics is essential before committing real capital
Quick Quiz
Question 1 of 3
0 correct so far
What is the constant product formula used by Uniswap?