What Is a Liquidity Pool in DeFi? Automated Market Makers Explained Simply
Understand how DeFi liquidity pools power decentralized exchanges like PancakeSwap and Uniswap, what LP tokens represent, and what impermanent loss means.
On a traditional stock exchange or centralized crypto exchange, buyers and sellers meet on an order book—a list of limit bids and asks waiting to be matched. Decentralized exchanges (DEXs) like Uniswap and PancakeSwap work differently. Instead of matching individual buyers with individual sellers, they rely on liquidity pools powered by Automated Market Makers (AMMs).
Understanding liquidity pools unlocks almost everything in DeFi—from why swap prices move to why checking liquidity locks is critical for avoiding rug pulls.
What Is a Liquidity Pool?
A liquidity pool is simply a public smart contract holding reserves of two (or more) tokens deposited by users called Liquidity Providers (LPs).
For example, a BNB / USDT liquidity pool might hold:
- 100 BNB (worth $60,000 at $600/BNB)
- 60,000 USDT (worth $60,000)
When a trader wants to swap USDT for BNB, they don’t wait for another person to accept their order. They deposit USDT directly into the smart contract pool and receive BNB back immediately according to a mathematical pricing formula.
How Automated Market Makers (AMMs) Set Prices
The classic AMM model (pioneered by Uniswap V2 and adopted by PancakeSwap V2) uses the constant product formula:
Formula:
x × y = k(wherex= Token A reserve,y= Token B reserve, andk= a constant product before fees)
Because the product k stays constant during a swap:
- Removing BNB from the pool shrinks the BNB reserve (
x) while adding USDT expands the USDT reserve (y). - As BNB becomes scarcer inside the pool, the formula automatically increases the price of each additional BNB bought.
- Larger pools absorb big swaps with tiny price changes; shallow pools experience dramatic slippage.
Why Users Supply Liquidity—and What LP Tokens Are
Liquidity providers deposit an equal dollar value of both tokens (for example, $500 of BNB + $500 of USDT) into the pool. In return:
- Swap Fee Share: Every trader pays a small swap fee (typically 0.05%–0.30%), which is distributed proportionally to liquidity providers.
- LP Tokens: The pool smart contract issues LP (Liquidity Provider) tokens to the depositor as a digital receipt representing their percentage share of the pool. Returning those LP tokens later withdraws that share of the underlying reserves.
This is why LP token ownership matters so much for security. On a newly launched token, if the project creator holds 100% of the LP tokens unlocked in a personal wallet, they can redeem them at any moment and drain the entire BNB or ETH reserve—causing a classic liquidity rug pull.
Understanding Impermanent Loss
Providing liquidity is not risk-free passive income. Aside from smart contract bugs, LPs face a specific mathematical phenomenon called impermanent loss.
Impermanent loss occurs whenever the market price of one token in the pool changes significantly relative to the other token:
- As arbitrage traders rebalance the pool to match external market prices, the pool ends up holding more of the depreciating token and less of the appreciating token.
- As a result, when you withdraw your liquidity, the total dollar value can be lower than if you had simply held the two tokens untouched in your wallet.
It is called “impermanent” only because the gap disappears if the relative prices return to your exact entry ratio before you withdraw. Once you withdraw at a diverged price, the loss becomes permanent—unless accumulated swap fees exceeded the divergence.
Quick Summary for Beginners
- Liquidity pools replace order books with smart contracts holding paired token reserves.
- Deeper liquidity means smoother swaps and lower price impact.
- LP tokens are the keys to withdrawing pool reserves—always verify they are locked or burned on new tokens using our Token Safety Checklist.
- Impermanent loss means providing liquidity to volatile pairs can underperform simply holding the assets.