IndexCrypto
Educational only. Not financial, tax or legal advice, and nothing here is a recommendation to buy anything.

Liquidity Pools: How They Work

Learn how liquidity pools power decentralized exchanges, how fees are earned, and the risks like impermanent loss.

A liquidity pool is a smart contract that holds two different tokens. Traders swap one token for the other directly against the pool, rather than matching with another trader. In return for depositing tokens into the pool, a liquidity provider earns a share of the fees that every trade pays. This mechanism is the engine behind most decentralized exchanges (DEXs) and is called an automated market maker (AMM).

What an AMM Actually Does

An AMM replaces the order book of a traditional exchange. Instead of waiting for a buyer and seller to agree on a price, the pool itself quotes a price. The price is determined by a mathematical formula, most commonly the constant product formula: x * y = k.

Here, x is the amount of token A in the pool, y is the amount of token B, and k is a constant. When someone swaps token A for token B, they add token A to the pool and remove token B. To keep the product x * y unchanged, the pool must give out less token B than the ratio implied by the old balances. The larger the trade relative to the pool size, the more the price moves.

This price movement is not a bug; it is the mechanism that keeps the pool balanced. If the price of token A rises on other exchanges, arbitrageurs will buy token A from the pool (increasing the pool’s token B) until the pool price matches the market. This arbitrage keeps the pool price roughly in line with the wider market.

How Providing Liquidity Works

To become a liquidity provider, you deposit equal values of both tokens. For example, you might deposit 1 ETH and 3000 USDC. The pool issues you a liquidity token that represents your share of the pool. That token can be redeemed later for your proportional share of the pool’s total assets.

Every trade in the pool pays a fee, typically 0.3% or less, which is added back to the pool. As a provider, you earn a portion of that fee proportional to your share. Fees accumulate in the pool, so your liquidity token becomes worth more over time.

The Catch: Impermanent Loss

Impermanent loss occurs when the price of one token changes relative to the other while your funds are in the pool. Because the pool automatically rebalances your holdings, you end up with more of the token that went down in price and less of the one that went up. When you withdraw, your holdings are worth less than if you had simply held both tokens outside the pool.

This loss is called “impermanent” because if the price returns to the original ratio, the loss disappears. But if you withdraw while the ratio is different, the loss becomes permanent. High volatility increases the chance of impermanent loss. In some cases, the fees you earn can offset the loss, but not always.

What People Get Wrong About Liquidity Pools

A common misunderstanding is that providing liquidity is a passive, risk-free way to earn yield. The reality is that you are actively managing a portfolio that is constantly being rebalanced by the pool. Many newcomers see the fee income and ignore the risk of impermanent loss, which can be substantial in a volatile market.

Another mistake is thinking that the pool’s price is always fair. In reality, the price is only as accurate as the arbitrage that keeps it in line. If a token is not widely traded or the pool is small, the price can drift significantly from other markets. A large trade can also cause slippage, which is the difference between the quoted price and the actual execution price.

These misconceptions are natural because the marketing around liquidity mining often highlights the rewards and downplays the risks. Understanding the mechanics helps you make an informed decision.

Comparison: When to Use a Liquidity Pool vs. Not

SituationUse a Liquidity PoolDo Not Use a Pool
You want to earn fees on idle assetsYes, if you accept the risksNo, if you need the funds soon
The token pair is highly volatileNo, impermanent loss risk is highYes, if you are confident in the price range
You are providing liquidity for a stablecoin pairYes, low volatility reduces impermanent lossNo, if the pool is illiquid
You need to access your funds at any timeNo, some pools lock fundsYes, if the pool allows instant withdrawal
You want a simple passive investmentNo, active monitoring is requiredYes, if you are prepared to manage it

How to Participate

To add liquidity, you typically need both tokens in the correct ratio. Most DEXs have a “Pool” or “Liquidity” section where you can select a pair and deposit. The interface will show you the current ratio and the amount of each token you need.

After depositing, you receive LP tokens. These represent your share and can be used in other protocols for yield farming, but that adds another layer of risk.

When you want to withdraw, you redeem your LP tokens. The pool returns your proportional share of both tokens. The amount you receive may be less than what you deposited in terms of one token, due to impermanent loss.

Risks Beyond Impermanent Loss

  • Smart contract risk: The pool’s code could have a bug or be exploited. Audits reduce but do not eliminate this risk.
  • Rug pulls: A malicious developer can create a token that restricts selling, effectively trapping funds in the pool.
  • Slippage: Large trades can move the price significantly, especially in thin pools.
  • Regulatory uncertainty: In some jurisdictions, providing liquidity may be treated as a regulated activity.

What providing liquidity really involves

Liquidity pools are a fundamental building block of decentralized finance. They allow anyone to become a market maker and earn fees, but they come with real risks. Understanding how the AMM formula works, what impermanent loss is, and when a pool is appropriate is essential before committing funds.

Common questions

What is a liquidity pool?

A liquidity pool is a smart contract that holds two tokens and allows users to swap between them. The pool sets the price using a formula, and liquidity providers deposit tokens to facilitate trades and earn fees.

How do I earn fees from a liquidity pool?

You earn a portion of the trading fees proportional to your share of the pool. When you deposit tokens, you receive LP tokens that represent your share. As trades happen, fees are added to the pool, increasing the value of your LP tokens.

What is impermanent loss?

Impermanent loss is the temporary loss in value compared to holding the tokens outside the pool, caused by price changes. It becomes permanent if you withdraw while the price ratio is different from when you deposited.

Can I lose all my money in a liquidity pool?

Yes, you can lose a significant portion of your investment, especially if the pool is exploited or the token price crashes. Impermanent loss can also reduce your holdings, but you rarely lose everything unless the token goes to zero.

Do I need both tokens to provide liquidity?

Yes, you need equal values of both tokens in the pair. Some platforms offer single-sided staking, but that usually involves converting your token to the other or using a separate mechanism.

Read next