Cipherbase
BTC ETH XMR
DeFi Entry 04 of 20

Liquidity Pools Explained: The Engine Behind DeFi

Liquidity pools are smart contract-based reserves that make decentralized trading possible — no order books, no middlemen. They allow anyone to trade, lend, or borrow assets by tapping into pooled funds contributed by other users. Understanding how they work is the foundation for navigating DeFi with confidence.

Animated diagram of two tokens entering a liquidity pool and LP tokens coming out.
Animated diagram of two tokens entering a liquidity pool and LP tokens coming out.
On this page
  1. What Is a Liquidity Pool?
  2. How Liquidity Providers Earn Fees
  3. Impermanent Loss: The Hidden Risk
  4. Types of Liquidity Pools
  5. Liquidity Pools in Lending Protocols
  6. Risks Worth Understanding Before You Commit Capital
  7. Summary and Key Takeaways

Decentralized finance runs on a fundamental question: if there's no central exchange matching buyers with sellers, where does the liquidity come from? The answer is liquidity pools — smart contract-based reserves that let trading, lending, and borrowing happen without a counterparty on the other side. Whether you're using a DEX for the first time or exploring yield strategies through something like Compound, understanding how these pools work changes how you see everything in DeFi.


What Is a Liquidity Pool?

At its core, a liquidity pool is just a pile of tokens locked inside a smart contract. You deposit assets, you get back LP tokens representing your share. Simple enough. What makes it powerful is what those pools replace: the traditional order book, where every trade needs a matching buyer or seller on the other side.

Instead, pools use an Automated Market Maker (AMM) — an algorithm that prices assets based on their ratio inside the pool. No matching engine. No waiting. Just math.

The formula behind most pools is the constant product model:

x * y = k

Here x and y are the quantities of two tokens, and k stays constant no matter what. When someone buys token X, they push token Y into the pool, which shifts the ratio and nudges the price automatically.

A Simple Example

Say a pool holds 100 ETH and 200,000 USDC. That implies ETH is worth $2,000. A trader buys 1 ETH by depositing USDC. Now the pool holds 101 ETH and a bit less USDC, so the price ticks up slightly. Big trades move the price a lot; small trades barely register. No humans required.


How Liquidity Providers Earn Fees

Deposit assets into a pool and you become a liquidity provider. Every trade that runs through that pool generates a fee, and you get a cut proportional to your share. On Uniswap v2, that fee is 0.3% per trade.

Run the math on a pool doing $100,000 in daily volume at 0.3% and you're looking at $300 per day spread across all providers. Your piece of that depends entirely on how much of the pool you own:

Your daily earnings = (Your LP share / Total LP supply) * Daily fee revenue

It's a passive income model, though "passive" doesn't mean risk-free.

LP Tokens and Composability

The LP tokens you receive aren't just receipts. They're live assets you can put to work elsewhere in DeFi — stake them in yield farms, post them as collateral in a lending protocol, or sell them outright. This stacking behavior is what people mean when they talk about DeFi composability, and it's one of the more genuinely interesting things about how these protocols interact.


Impermanent Loss: The Hidden Risk

Impermanent loss trips up a lot of new liquidity providers. It happens when the price of your deposited assets shifts relative to when you deposited them, leaving you with less value than if you'd just held the tokens outright.

ScenarioETH Price ChangeImpermanent Loss
No change0%0%
ETH doubles+100%~5.7%
ETH triples+200%~13.4%
ETH drops 50%-50%~5.7%
ETH drops 75%-75%~20%

The word "impermanent" is doing a lot of work here. The loss only locks in when you withdraw. If prices drift back to their original ratio, it disappears. In practice, the fees you earn can offset it — but in choppy, volatile markets, the math doesn't always work in your favor.

When Impermanent Loss Hurts Most

Pools pairing highly correlated assets, think USDC/DAI or stETH/ETH, barely feel it because the price ratio stays tight. Pools pairing uncorrelated or volatile assets are a different story. Before you put capital into any pool, model out the potential impermanent loss against the expected fee yield. Don't skip that step.


Types of Liquidity Pools

The ecosystem has moved well past the basic 50/50 model. Here's what's actually out there.

Standard AMM Pools (Uniswap v2 style)

Two assets split equally by value. Easy to understand, widely supported. Works best when neither asset has a strong price correlation with the other.

Concentrated Liquidity (Uniswap v3)

This is where it gets more interesting. Instead of spreading your liquidity across all possible prices, you pick a range. Capital deploys more efficiently because you're not wasting it on price points that will never trade. The catch is that you need to actively manage your position — if the price moves outside your range, you stop earning fees entirely.

// Conceptual representation of a Uniswap v3 position
struct Position {
    address owner;
    int24 tickLower;   // lower price bound
    int24 tickUpper;   // upper price bound
    uint128 liquidity; // active liquidity amount
}

Weighted Pools (Balancer)

Balancer lets you run pools with more than two assets and custom weightings — something like 80% ETH / 20% USDC. That shifts your impermanent loss exposure and lets you hold something closer to a portfolio position while still collecting fees.

Stable Pools (Curve Finance)

Curve uses a hybrid formula built for stablecoins and pegged assets. It lets large trades go through with almost no slippage when assets are near parity, which is why it's the go-to venue for stablecoin swaps. If capital efficiency in DEX design interests you, Curve's mechanics are worth digging into.


Liquidity Pools in Lending Protocols

Trading isn't the only game in town. Lending protocols like Aave and Compound run on pooled models too — depositors supply assets, borrowers draw from the same pool, and interest rates adjust algorithmically based on how much of the pool is currently in use.

When utilization is low, borrow rates stay cheap to pull in borrowers. When utilization climbs, rates rise to attract more deposits and slow down borrowing. The pool self-regulates without anyone flipping a switch.

Utilization Rate = Total Borrowed / Total Supplied
Borrow APR = Base Rate + (Utilization * Multiplier)

Suppliers earn interest continuously, paid out in cTokens (Compound) or aTokens (Aave) that accrue value over time. Different use case than a trading pool, but the same core mechanic: pooled assets governed by smart contracts and math.


Risks Worth Understanding Before You Commit Capital

Impermanent loss gets most of the attention, but it's not the only thing that can hurt you here.

Smart contract risk is the most serious. A bug or exploit in the pool contract can drain everything. Check whether a protocol has been audited, how long it's been live, and what its TVL history looks like. Longevity matters.

Oracle manipulation is a real attack vector. Thin markets and flash loan conditions can let bad actors distort prices and extract value from pools that rely on external price feeds.

Rug pulls happen because anyone can create a pool with a fake token, attract liquidity, and walk away with it. Stick to protocols with track records and verify token contracts yourself.

Risk TypeMitigation
Smart contract exploitUse audited protocols with long track records
Impermanent lossChoose correlated asset pairs; model fee yields
Oracle manipulationPrefer TWAP-based protocols; avoid low-liquidity pools
Token riskVerify contract addresses; check token distribution
Regulatory riskUnderstand jurisdiction-specific rules on DeFi income

Summary and Key Takeaways

Liquidity pools are the infrastructure layer that makes decentralized trading, lending, and borrowing possible without intermediaries. They replace order books with smart contracts, market makers with algorithms, and gatekeepers with open access.

“DeFi is the most exciting thing happening in crypto right now.”

— Vitalik Buterin

Key takeaways:

  • AMMs use mathematical formulas (most commonly x * y = k) to price assets based on pool ratios, not order matching.
  • Liquidity providers earn a share of trading fees proportional to their pool contribution, paid via LP tokens.
  • Impermanent loss is real, can be significant in volatile markets, and only locks in when you withdraw.
  • Different pool designs (Uniswap v3, Balancer, Curve) make different tradeoffs between capital efficiency, risk, and management complexity.
  • Lending protocols like Aave and Compound use the same pooled model with algorithmically adjusting interest rates.
  • Smart contract risk, oracle manipulation, and token risk all deserve serious consideration before you deploy capital.

Frequently Asked Questions

What is a liquidity pool and how does it work?

A liquidity pool is a smart contract that holds a reserve of two or more tokens, allowing people to trade between them without needing a traditional buyer or seller on the other side. Instead of matching orders like a stock exchange, trades are executed directly against the pool's reserves using an algorithm that automatically adjusts prices based on supply and demand. This is the foundation of most decentralized exchanges (DEXs) like Uniswap or SushiSwap.

How do I earn money from a liquidity pool?

You earn by depositing an equal value of two tokens into a pool, becoming a liquidity provider (LP) and receiving a share of the trading fees every time someone swaps those tokens. Most pools pay out a small percentage of each trade (commonly 0.3%) proportional to your share of the pool. The more trading volume the pool sees, the more fees you collect.

What is impermanent loss and should I be worried about it?

Impermanent loss happens when the price ratio of your deposited tokens changes after you add them to a pool — if one token rises or falls significantly in price, you end up with less value than if you had simply held the tokens in your wallet. It's called 'impermanent' because the loss only locks in when you withdraw, and trading fees can sometimes offset it. For beginners, it's worth understanding before committing large amounts, especially in pools with volatile or unpredictable token pairs.

Video Resources

Sources & Further Reading

  • Uniswap Docs — Protocol documentation for the leading automated market maker.
  • Finematics — Educational explainers on DeFi mechanisms with diagrams.
  • DeFi Llama — Total value locked and protocol analytics across chains.
  • Ethereum.org: DeFi — Official introduction to decentralised finance on Ethereum.
  • Aave Docs — Lending protocol documentation, risk parameters and governance.
  • Compound Docs — Documentation for the Compound money market protocol.
  • Lido Docs — Liquid staking protocol documentation.