Liquidity pool basics for beginners: how they work
Liquidity pool basics for beginners: A liquidity pool is a smart contract that holds two or more crypto tokens and allows anyone to trade between them without a traditional buyer and seller on the other side. Instead of matching orders through a book, the pool uses a mathematical formula to price trades automatically. This mechanism is the foundation of decentralized exchanges (DEXs) and a large part of the DeFi sector. Understanding liquidity pools means understanding how token swaps happen on-chain, where trading fees go, and what participants take on when they deposit funds.
What is a liquidity pool in crypto?
A liquidity pool is a shared reserve of tokens locked inside a smart contract that traders can swap against at any time. The contract governs pricing, deposits, and withdrawals automatically. No company, broker, or order book manages it. Two traders do not need to find each other; instead, a depositor supplies both sides of the market in advance, and the smart contract handles the rest.
Most pools hold two tokens, typically paired against a stablecoin or a major asset like ETH. The pool keeps both tokens in reserve, and whenever someone swaps one for the other, the ratio in the pool changes. That ratio shift is what moves the price.
How pools differ from traditional exchanges
Traditional (centralized) exchanges use an order book: buyers post prices they will pay, sellers post prices they will accept, and a matching engine connects them. Trades only execute when a buyer and seller agree.
Liquidity pools replace that entire system. There is no order book. There are no open orders. A smart contract holds the reserves, and a pricing formula calculates the exchange rate on the fly every time a trade arrives. This approach is called an automated market maker (AMM), and it operates around the clock with no approval needed.
| Feature | Order book exchange | Liquidity pool (AMM) |
|---|---|---|
| Price setting | Buy/sell orders from traders | Mathematical formula |
| Requires counterparty | Yes | No |
| Operates 24/7 without interruption | Depends on platform | Yes (on-chain) |
| Who provides liquidity | Market makers, institutions | Anyone who deposits |
| Slippage on large trades | Low with deep order books | Higher in shallow pools |
| Permissionless access | Often requires KYC | No registration required |
How does an automated market maker work?
An automated market maker (AMM) is a pricing algorithm built into the pool. The most common design is the constant product formula, introduced by Uniswap.
The constant product formula explained
The formula is: x × y = k
- x = the quantity of token A in the pool
- y = the quantity of token B in the pool
- k = a constant that never changes
If a pool starts with 100 ETH and 200,000 USDC, then k = 100 × 200,000 = 20,000,000.
When a trader buys ETH, they send USDC into the pool. The pool now holds more USDC, so to keep k constant, it must hold less ETH. The contract releases ETH proportional to how much the ratio shifts. The more ETH a trader tries to buy in one transaction, the worse the price gets. This natural price deterioration is called price impact or slippage.
How prices move inside a pool
Each trade pushes the ratio between the two tokens. A large buy of ETH against USDC raises the ETH price inside the pool. Arbitrage traders notice when the pool price diverges from prices on other platforms, and they trade to close the gap. This arbitrage keeps pool prices reasonably aligned with broader market prices.
The process is continuous. Every swap changes the ratio. Every arbitrage trade resets it. The pool itself never needs to know the “real” price of anything; the formula and market pressure handle it.
Other AMM designs
Uniswap’s constant product formula is not the only approach. Different protocols designed formulas for specific needs:
- Stable swap formula (Curve Finance): Optimized for pairs that should trade close to 1:1, like USDC and USDT. The formula creates a much flatter price curve inside a narrow range, reducing slippage for stablecoin swaps.
- Weighted pools (Balancer): Allow pools with more than two tokens and with weights other than 50/50. A pool could hold 80% ETH and 20% USDC, for example.
- Concentrated liquidity (Uniswap v3): Lets depositors specify a price range where their liquidity is active. Capital sits only where the depositor expects the price to trade, which can improve fee efficiency. The tradeoff is more active management and higher exposure to impermanent loss when prices move outside the chosen range.
Who puts money into a liquidity pool?
Liquidity providers (LPs) are the participants who deposit tokens into a pool. Anyone with compatible tokens and a crypto wallet can become an LP on a permissionless protocol.
Why liquidity providers deposit
LPs earn a share of trading fees generated by the pool. Every swap made through the pool incurs a fee, typically between 0.01% and 1% of the trade size, depending on the protocol and the specific pool. That fee is distributed proportionally to LPs based on their share of the pool.
If a pool earns $1,000 in fees during a period, and a particular LP owns 10% of the pool, that LP earns $100, minus any gas costs to claim it.
Some protocols also distribute their own governance tokens as additional incentives to attract deposits. This is often called liquidity mining or yield farming. The sustainability of these token rewards varies widely depending on the protocol’s economics.
How LP tokens work
When a deposit is made, the protocol mints LP tokens and sends them to the depositor. These tokens represent the depositor’s proportional share of the pool. They are tradable and can be used in other DeFi protocols as collateral or for additional yield.
To withdraw, the LP tokens are returned to the pool contract, which burns them and releases the underlying tokens plus any accumulated fees.
What LPs must deposit
Most standard pools require depositing both tokens in the pool’s current ratio. If a pool holds ETH and USDC at a ratio of 1 ETH to 2,000 USDC, a depositor must supply both. A depositor cannot put in only ETH. Unbalanced deposits are either rejected or result in an automatic partial swap before the remainder is deposited, which adds a layer of slippage.
Practical example: a $10,000 deposit into an ETH/USDC pool
Walking through a concrete example clarifies how pool mechanics translate to real outcomes.
Assume a pool holds 1,000 ETH and 2,000,000 USDC, with ETH priced at $2,000. A depositor contributes $10,000 total: 2.5 ETH ($5,000) and 5,000 USDC. That deposit represents 0.25% of the pool.
Month later scenario — ETH price rises to $2,500:
Arbitrage traders have rebalanced the pool. The depositor’s share still represents 0.25% of the pool, but because of how constant-product math works, the pool now holds relatively less ETH and relatively more USDC than at deposit time. The depositor’s 0.25% stake converts to slightly fewer ETH and more USDC than was originally deposited.
This phenomenon is impermanent loss. The depositor would have more total dollar value if they had simply held the original 2.5 ETH and 5,000 USDC without depositing. The gap between “held vs deposited” represents the loss that the formula introduces by rebalancing toward the cheaper asset.
Trading fees collected during that month partially or fully offset this loss, depending on pool volume. In high-volume pools, fees routinely exceed impermanent loss. In low-volume pools, they may not.
Risks every beginner needs to understand
Depositing into a liquidity pool is not passive income with no downside. The risks are real and in some cases severe.
Impermanent loss
The pool’s constant-product formula rebalances holdings automatically as prices move. When a depositor’s two tokens diverge in price, the pool ends up holding more of the token that fell and less of the token that rose. Compared to holding both tokens outside the pool, the depositor is worse off when they withdraw.
The loss is called “impermanent” because it only locks in when the depositor withdraws at a diverged ratio. If prices return to the original ratio, the loss reverses. In practice, prices rarely return exactly, and many depositors exit with a realized loss that trading fees did not cover.
For reference: when one token in a 50/50 pool doubles in price relative to the other, the impermanent loss is approximately 5.7%. A quadrupling produces roughly 25% loss relative to holding.
Smart contract risk
The tokens are held by code, not by a company or custodian. If the smart contract has a bug or is exploited, funds can be lost or drained with no recourse. Exploits targeting pools and AMMs have resulted in substantial losses across the DeFi sector. Audits reduce this risk but do not eliminate it.
Token price risk
An LP is exposed to the price movement of both tokens in the pool. If one or both lose significant value, the total portfolio value drops regardless of fees earned.
Oracle manipulation and pool price manipulation
Some attacks manipulate the price inside a pool within a single transaction block, using flash loans to shift ratios temporarily and exploit other protocols that read pool prices as a price oracle. Participation in well-established, high-liquidity venues reduces exposure to this risk.
Rug pulls and low-quality pools
Any token can be paired with another and a pool created. Fraudulent projects have created pools, artificially inflated prices, and withdrawn their own liquidity suddenly, leaving other depositors holding worthless tokens. This is called a rug pull.
Pools created by unknown teams, for tokens with no verifiable utility, with no lock on LP tokens, and with extremely high advertised yields are higher-risk signals. This is not a complete checklist, but they are the most common markers.
How pool fees work and where they go
Every swap through the pool generates a fee, calculated as a percentage of the trade value. That fee stays inside the pool, so the total pool value grows with each trade even as token prices fluctuate.
Because the fee compounds inside the pool, LP token value increases over time relative to the underlying tokens held by the pool — but only if the pool accumulates more from fees than it loses to price divergence.
Fee tiers vary. On Uniswap v3, pools operate at 0.01%, 0.05%, 0.3%, or 1% depending on the expected volatility of the pair. Stablecoin pairs use lower fees because volatility is minimal and volume is high. More volatile pairs use higher fees to compensate depositors for greater impermanent loss risk.
Some protocols redirect a portion of fees to a protocol treasury or to stakers of a governance token, rather than distributing 100% to LPs. Checking how fee distribution works before depositing is worth the time.
FAQs
What is the minimum amount needed to provide liquidity? Most protocols have no enforced minimum, but gas costs on Ethereum make small deposits impractical. On lower-cost networks, smaller deposits are more viable. The practical floor is high enough that gas fees represent a small percentage of expected earnings.
Can liquidity pool funds be lost entirely? Yes. A smart contract exploit, a catastrophic price collapse in one or both pooled tokens, or a rug pull can result in total or near-total loss. Fees earned do not act as insurance against these outcomes.
What is the difference between a liquidity pool and staking? Staking typically means locking tokens to support a blockchain’s consensus mechanism and earning validator rewards. Depositing into a pool means supplying capital to facilitate trading and earning fees. They are separate mechanisms, though protocols sometimes use the word “staking” informally to describe depositing into pools or locking LP tokens.
How is liquidity pool APY calculated? APY is calculated from fee income divided by the total value locked in the pool, annualized. It fluctuates constantly with trading volume and pool size. A high displayed APY from a few high-volume days does not guarantee that rate persists. Some displayed APY figures include token incentive rewards that can drop sharply if the protocol reduces emissions.
What does “TVL” mean in DeFi and why does it matter? TVL stands for total value locked. It is the aggregate dollar value of all tokens deposited across a protocol or within a specific pool. Higher TVL typically means deeper liquidity, which means less slippage for traders. It is also used as a rough measure of protocol adoption, though it is not a guarantee of safety or sustainability.
Is providing liquidity the same as lending crypto? No. Lending involves depositing tokens into a lending protocol where borrowers pay interest to use them. Providing liquidity means depositing into a pool that facilitates trading. The economic exposure is different: lenders face credit and liquidation risk on borrowers; LPs face impermanent loss and smart contract risk.
What happens to a liquidity pool if no one trades? If trading volume drops to zero, fee income stops. The pool still holds the deposited tokens, and LPs can still withdraw. The pool does not “expire” or dissolve on its own. LPs simply earn nothing during idle periods.
Can the same pool exist on multiple blockchains? The same token pair can have separate pools on different blockchains or layer-2 networks. These pools are independent of each other with separate reserves, separate prices, and separate fee histories. Arbitrageurs sometimes trade across pools on different chains when bridging costs make it profitable.
Disclaimer
This article is written for educational purposes by an independent crypto research and analysis blog. It does not constitute financial, investment, or legal advice. Participating in DeFi pools carries significant financial risk, including the possibility of total loss of deposited funds. Readers should conduct their own research and consult qualified professionals before making any financial decisions.
Liquidity pools are the infrastructure that makes decentralized trading possible. The constant product formula, the role of LPs, fee mechanics, and the risk profile are all connected. A beginner who understands the x × y = k relationship, knows what impermanent loss is and why it happens, and recognizes the categories of risk involved has a working foundation for evaluating any specific pool or protocol they encounter. The mechanism is learnable. The risks are real. Both are worth taking seriously before any capital moves.
Don’t just read—grow with every post in our transformational blog library.