What Is a Liquidity Pool, and How Does It Work?
A liquidity pool is a shared pot of tokens locked in a smart contract that lets people trade without waiting for a buyer. This guide explains pricing, fees and risk.
On this page
Short answer
A liquidity pool is a shared pot of two or more tokens locked in a smart contract, which lets people trade one token for another without waiting for a matching buyer or seller. Instead of trading against a person, a trader trades against the pool, and the price is set by the ratio of the tokens inside it.
What is a liquidity pool?
A liquidity pool is a shared pot of two or more tokens locked in a smart contract, which lets people trade one token for another without waiting for a matching buyer or seller. Instead of trading against a person, a trader trades against the pool, and the price is set by the ratio of the tokens inside it.
The idea replaces the order book used by traditional exchanges. On an order book, a trade only happens when a buyer and a seller agree on a price. In a pool, the trade happens as soon as the smart contract can work out the price from the pool's current ratio, so even a token with few traders can be bought and sold at any time.
Anyone can add tokens to a pool and become a liquidity provider. In return they receive a share of the trading fees the pool earns, in proportion to their share of the pool. The bigger their share, the bigger their slice of the fees, and the bigger their exposure if prices move.
Pools are the engine of decentralised exchanges. A token pair such as ETH and a stablecoin usually has a pool, and the exchange routes trades through it. Without pools, a decentralised exchange would have no one to trade against. For the contract side of this, see what is smart contract development.
How does an automated market maker price trades?
An automated market maker is the formula that sets the price inside a liquidity pool. The most common formula keeps the product of the two token amounts constant: if a pool holds x of token A and y of token B, then x times y stays the same after every trade. Buying token A removes some of it from the pool, so its price rises; selling it adds some back, so its price falls.
This means the price moves with every trade, and larger trades move it more. A small trade barely changes the ratio, so the price is close to the market price. A large trade changes the ratio a lot, so the buyer gets a worse price than the market price. That difference is called slippage, and it is why large trades on small pools are expensive.
The formula also means a pool never runs out of a token entirely. As a token becomes scarcer in the pool, its price rises, which makes it less attractive to buy and more attractive to sell. The pool keeps working even after big price moves, though the price it offers may be far from the price on other exchanges.
Other formulas exist for tokens that should stay close in price, such as two stablecoins. Those formulas keep the price steady for small trades and only move it when the pool becomes very unbalanced. The choice of formula changes how the pool behaves, but the basic idea is the same: the ratio sets the price.
How do liquidity providers earn fees?
Liquidity providers earn a share of the trading fees that the pool charges on every swap. A typical fee is a small percentage of each trade, such as 0.3%, which is added to the pool. Each provider's share of the pool grows in line with the fees collected, so a provider who owns 10% of the pool receives 10% of the fees.
Fees are paid in the pool's tokens, not in cash. A provider who adds ETH and a stablecoin receives more of both tokens as fees accumulate, and can withdraw their share at any time by returning their pool tokens to the contract. The return depends on trading volume: a busy pool earns more fees than a quiet one.
Some pools offer extra rewards on top of fees, usually in the form of a governance token paid to providers who stake their pool tokens. These rewards can be larger than the fees, but they are often paid in a token whose price can fall sharply, so the real return is lower than the headline rate.
The return is not guaranteed. If the price of one token in the pair falls, the provider's share is worth less, and the fees may not cover the loss. This is the main risk of providing liquidity, and it is covered in the risks section below.
Liquidity pool risks and rewards
The table below compares the main rewards and risks of providing liquidity, so a reader can weigh them before adding tokens to a pool. The rewards are real, but they depend on volume and price, and the risks are easy to underestimate.
| Point | Reward | Risk |
|---|---|---|
| Trading fees | Share of every swap fee | Low volume means low fees |
| Extra rewards | Governance tokens on some pools | Reward token price can fall |
| Price moves | Fees keep coming in either direction | Impermanent loss when prices diverge |
| Smart contract | Automatic and always on | Bugs can drain the pool |
| Access | Anyone can provide liquidity | No protection if the pool is exploited |
Impermanent loss is the risk most providers misunderstand. When the price of one token in the pair moves a lot against the other, the pool rebalances by selling the token that rose and buying the one that fell.
The provider ends up with less of the token that gained, so they would have been better off simply holding both tokens. The loss is called impermanent because it disappears if the prices return to their starting ratio, but that does not always happen.
Smart contract risk is the other big one. A bug in the pool's code can let an attacker drain it, and there is usually no one to claim from. Providers should check whether the contract has been audited, how long the pool has run and whether the team behind it is known.
Example (hypothetical): two friends provide liquidity for a token pair
Example (hypothetical): two friends add liquidity to a pool holding $100,000 of ETH and $100,000 of a stablecoin, so the pool holds $200,000 in total. They add $10,000 of ETH and $10,000 of stablecoin, so their share is $20,000 out of $200,000, or 10% of the pool.
Over a month, traders pay $5,000 in fees into the pool. The friends' share is 10% of $5,000, which is $500 for the month. If the same volume continues, that is $6,000 over a year on a $20,000 deposit, before any price moves.
Then the price of ETH doubles. The pool rebalances, so the friends' share is now worth about $27,000, while simply holding the same $10,000 of ETH and $10,000 of stablecoin would be worth $30,000. The difference of $3,000 is the impermanent loss, and it is larger than the $500 of fees earned that month.
The lesson is that fees only win when prices stay close to where they started. A pool with steady volume and stable prices can earn a good return, but a pool with a token that moves sharply can lose money even while it collects fees. That is why providers usually choose pairs they expect to stay in balance.
What are the common mistakes?
The most common liquidity pool mistakes are chasing the highest reward rate, ignoring impermanent loss, and trusting a pool without checking the contract.
- Chasing the highest rate. A pool that pays a very high reward rate usually does so because the reward token is new and its price is likely to fall. The headline rate is not the return.
- Ignoring impermanent loss. Fees only cover small price moves. If one token in the pair doubles or halves, the loss from rebalancing is usually larger than the fees earned.
- Trusting an unaudited pool. A pool with no audit, no track record and an anonymous team is a gamble. Check the audit, the pool's age and the team's history before adding tokens.
- Providing with money you need soon. Withdrawing from a pool during a price move locks in the loss. Only provide with funds you can leave in place for months.
- Forgetting the fees to enter and leave. Adding and removing liquidity each costs a network fee, and on a busy network those fees can be large. Small deposits can be eaten by fees alone.
How to check a liquidity pool before you use it
Checking a pool before you use it takes a few minutes and prevents most losses. Start with the pair: are both tokens well known and traded elsewhere, or is one of them new and thinly traded? A pool with a new token is riskier than one with two established tokens.
- Check the audit. Look for a published audit by a known firm and read what it found. An unaudited contract should not hold your money.
- Check the pool's age and size. A pool that has run for months with a large amount locked is safer than one created yesterday with a small balance.
- Check the trading volume. Fees depend on volume, so a quiet pool earns little. Look at the volume over the last month, not just the last day.
- Check the reward token. If the pool pays extra rewards, find out what token they are paid in and whether its price has held up.
- Start small. Add a small amount first, check that you can withdraw it, and only add more once you understand how the pool behaves.
Regulation is the last check. Rules for decentralised finance vary by country and are changing, so read what is MiCA regulation if you operate in Europe, and check the rules where you live. A pool that is legal today may face limits tomorrow, so keep a record of every deposit and withdrawal for tax.
Key takeaways
- A liquidity pool lets people trade against a shared pot instead of waiting for a buyer
- The price is set by the ratio of tokens in the pool, so large trades move it more
- Providers earn a share of swap fees, but impermanent loss can outweigh them
- Check the audit, the pool's age, volume and reward token before adding funds
- Fees only win when prices stay close to where they started
Frequently asked questions
What is the difference between a liquidity pool and an order book?
An order book matches buyers and sellers at agreed prices, while a pool lets a trader swap against tokens locked in a contract. The pool sets the price from the ratio of its tokens, so trades happen at any time, even for tokens with few traders.
What is impermanent loss?
It is the loss a provider suffers when the price of one token in the pair moves against the other. The pool rebalances by selling the token that rose, so the provider ends up with less of it than if they had simply held both tokens.
Can I withdraw my tokens from a pool at any time?
Usually yes, by returning your pool tokens to the contract. You receive your share of the pool at the current ratio, which may be different from what you deposited. Withdrawing during a large price move locks in the loss.
How much can I earn from a liquidity pool?
It depends on trading volume and price moves. Fees are a share of each swap, so a busy pool earns more than a quiet one. Extra rewards can add to the return, but they are often paid in a token whose price can fall.
Are liquidity pools safe?
They carry real risks: smart contract bugs, impermanent loss and tokens that lose value. Check the audit, the pool's age and volume, and the tokens in the pair before adding funds, and only provide with money you can leave in place.
Do I need to pay tax on liquidity pool earnings?
In most countries, yes. Fees and rewards are usually taxable, and withdrawing tokens can trigger a taxable event. Keep a record of every deposit, withdrawal and reward, and check the rules where you live.