What Is a Liquidity Pool?

Learn what a liquidity pool is in DeFi, how AMM reserves price trades, how LPs earn fees, and where slippage, impermanent loss, and oracle risks arise.

Sara ToshiMar 21, 2026
Summarize this blog post with:
What Is a Liquidity Pool? hero image

Introduction

liquidity pool is the name for one of DeFi’s most important design moves: instead of waiting for a specific counterparty to take the other side of your trade, a protocol can let you trade against assets already sitting in a smart contract. That sounds almost too simple, which is why it is worth slowing down. A pool is not just a pile of tokens. It is pooled inventory plus rules: rules for pricing, for who can deposit, for how fees are collected, and for how withdrawals are divided.

This matters because many decentralized exchanges and lending-related systems need liquidity to function, but blockchains are awkward places to run traditional market structure. Order books require active market makers, constant quote management, and infrastructure that is harder to maintain on-chain. A liquidity pool solves the problem differently. It keeps reserves on-chain and lets anyone interact with those reserves according to a deterministic mechanism.

The result is a primitive that now shows up far beyond simple swaps. Pools are used to route trades, accumulate fees for liquidity providers, support flash-borrowing within a transaction, and sometimes even act as inputs to price oracles. But the same design that makes pools powerful also creates distinctive risks: slippage, adverse rebalancing, oracle manipulation, and losses for liquidity providers when prices move.

How does a liquidity pool work as on-chain market infrastructure?

At the most basic level, a liquidity pool is a smart contract that holds assets in reserve so users can trade, deposit, or withdraw according to pre-defined rules. In the classic two-asset case, the pool state is just the pair of reserve balances, often written conceptually as (x, y), where x is the amount of asset X and y is the amount of asset Y. Those balances are not bookkeeping trivia. They are the market.

That is the key idea that makes liquidity pools click: the pool’s reserves are both inventory and price signal at the same time. In an order book, price comes from posted bids and asks. In a pool, price comes from how the pricing rule interprets the current reserve balances. Change the reserves by trading against them, and the quoted price changes automatically.

So when people say a pool “provides liquidity,” they mean something precise. The pool stands ready to exchange one asset for another because it already owns both, and because its contract specifies how much output a trader gets for a given input. The trade does not need a human market maker to wake up and respond. The mechanism is embedded in the contract.

This is why liquidity pools are tightly connected to automated market makers, or AMMs. An AMM is the pricing mechanism; the liquidity pool is the reserve base that mechanism reads and updates. You can separate the ideas analytically, but in practice they work together. Without reserves, the pricing function has nothing to price from. Without a pricing function, the reserves are just idle tokens.

Why do DeFi protocols use liquidity pools instead of on‑chain order books?

ModelLiquidity sourcePrice formationCapital needsPrice impactBest for
Order bookMarket makersOrder aggregationActive inventoryLow for quoted sizesLow‑latency markets
Liquidity poolPassive pooled reservesReserve‑based formulaPassive depositsRises with trade sizeOn‑chain always‑on liquidity
Figure 198.1: Order book vs liquidity pool: tradeoffs

The immediate question is why DeFi needed this design at all. After all, traditional finance already knows how to match buyers and sellers. The reason is not that order books are impossible on-chain, but that they are expensive and operationally demanding in a transparent, adversarial, block-by-block execution environment.

An order book works best when many market makers continuously update quotes as prices move elsewhere. That requires speed, active inventory management, and often off-chain infrastructure. A liquidity pool takes a different route. It does not ask participants to maintain thousands of live quotes. It asks liquidity providers to deposit assets into a shared reserve, and then it lets a formula handle the marginal pricing of trades.

The tradeoff is fundamental. Order books can offer very fine-grained price discrimination if active quoting is present. Pools offer always-on liquidity using passive capital, but the price gets worse as a trade consumes more of the reserve balance. In other words, a pool replaces quote management with Curve-based pricing. The convenience is real, but so is the cost.

How does trading against an AMM pool execute and cause slippage?

The simplest nontrivial example is a two-token pool that holds X and Y and uses the constant-product rule made famous by Uniswap. The rule says the product of reserves, x * y, should not decrease. If the pool has 100 units of X and 100 units of Y, the product is 10,000. If a trader adds some X and removes some Y, the new reserves must still satisfy the invariant after fees are accounted for.

Here is the mechanism in plain language. Suppose a trader sends X into the pool because they want Y out. The pool’s X reserve rises. To preserve the invariant, the Y reserve must fall. The more X the trader pushes in relative to the pool size, the more sharply the Y reserve must shrink. That shrinking reserve means each additional unit of Y becomes more expensive than the last. This is why larger trades incur more slippage.

Notice what the pool is doing economically. It is not “discovering” price in the same way an order book aggregates many opinions at once. It is enforcing a reserve relationship. Arbitrageurs then compare the pool’s implied price with prices elsewhere. If the pool is out of line, they trade against it until it comes back into alignment. So external markets and arbitrage are what keep many pools near the broader market price; the pool itself supplies the mechanical reaction function.

This also explains why the reserve depth matters so much. A shallow pool moves a lot when traded against because any given order is a large fraction of reserves. A deep pool moves less. That is the operational meaning of liquidity here: more reserve depth means lower price impact for a given trade size.

How do liquidity pool fees work and who earns them?

A liquidity pool needs a reason for people to deposit capital into it. The usual answer is fees paid by traders. In Uniswap v2, for example, swaps pay a 0.30% fee that accrues to liquidity providers, and the protocol design also allows a smaller protocol fee to be switched on, diverting part of that trading fee away from LPs.

The mechanism is cleaner than it first appears. A trader pays by receiving slightly less favorable execution than a zero-fee version of the same Curve would give. That difference stays in the pool. Because liquidity providers own claims on the pool’s reserves, they indirectly own the accumulated fees. Fees are therefore not usually paid as a separate side transfer. They are embedded into the reserve accounting.

This matters because LP returns do not come from nowhere. They come from traders who value immediate execution enough to pay for it. A pool is economically viable only if fee income compensates LPs for the risks they bear. If there is no trading, there are no swap fees. If there is trading but price volatility is large, fees may still fail to offset the losses from continuously rebalancing inventory at unfavorable prices.

What do liquidity providers get in return for depositing assets?

When someone deposits assets into a pool, the protocol needs a way to track their share. In many designs, that claim is represented by LP tokens or some equivalent accounting record. In Uniswap v2, the initial liquidity minted is proportional to the geometric mean of the deposited token amounts, sqrt(x_deposited * y_deposited). That choice avoids making the initial share value depend arbitrarily on the depositor’s units or deposit ratio.

The underlying principle is that an LP owns a fraction of the pool, not a fixed number of underlying tokens. If you own 10% of the LP shares, you are entitled to 10% of the reserves when you withdraw. Since the reserves change over time because traders swap and fees accumulate, your claim is on a moving target.

This is the point many newcomers miss. Providing liquidity is not the same as parking two assets in cold storage. Once the assets enter the pool, the composition of your position changes as traders rebalance the reserves. If the price of one token rises in the outside market, arbitrageurs will tend to remove that appreciating token from the pool and replace it with the other asset until the pool price catches up. Your pool share therefore ends up holding relatively less of the winner and more of the loser.

That mechanism is the source of impermanent loss, which is really a rebalancing effect. The pool has sold into the rising asset and bought into the falling asset because that is what keeping the reserve rule consistent requires. Fees can offset this, but they do not eliminate the mechanism.

How does a pool’s reserves rebalance when market prices move? (worked example)

Imagine a pool begins with equal value of ETH and USDC. Liquidity providers deposit both, traders start using the pool, and the outside market price of ETH doubles. The pool does not magically know this because a line in a database changed. It learns through order flow.

Arbitrageurs notice that ETH is now underpriced inside the pool relative to other venues. They buy ETH from the pool and pay in USDC. Each trade removes ETH from reserves and adds USDC. Because the invariant must still hold, the pool quotes progressively higher prices for ETH as its ETH balance falls and its USDC balance rises. Arbitrage continues until the pool’s implied price roughly matches the broader market.

At the end of that process, the pool holds less ETH and more USDC than before. That is exactly what liquidity provision means in an AMM: you have outsourced market making to a rule, and the rule has rebalanced your inventory in response to order flow. If you later withdraw, your claim reflects this new composition. Compared with simply holding the original ETH and USDC outside the pool, you have less exposure to the asset that went up most. That gap is the economic cost LPs are being paid fees to bear.

The analogy to a vending machine is partly helpful here. A vending machine has inventory and dispenses goods automatically at posted terms. A pool also holds inventory and dispenses assets automatically. But the analogy fails in the crucial place: a vending machine’s price is static until changed by an operator, while a pool’s price is endogenous to its reserve state and updates after every trade.

Which AMM curve fits different asset pairs (constant‑product vs stable‑swap)?

CurveBest forSlippage profileCapital efficiencyComplexity
Constant-productVolatile pairsIncreasing with trade sizeMediumLow
StableSwapStablecoins and pegsVery low near pegHigh near pegHigher
Weighted / multi-tokenIndex or multi‑asset poolsVariable by weightsFlexible weightingMedium
Figure 198.2: Common AMM curve types compared

The constant-product pool is the canonical starting point, but it is not the only design because not all assets have the same trading needs. If two assets should usually trade near the same value, as with many stablecoin pairs, a pure constant-product curve wastes capital: it produces more slippage near the expected peg than users really need.

Curve’s StableSwap design addresses that by using an invariant that behaves more like constant-sum near balance and more like constant-product as the pool becomes imbalanced. The important idea is not the exact algebra. It is the shape of the response. Near the target region, the pool offers flatter pricing and therefore lower slippage. Far from balance, the curve becomes more protective, preventing the pool from being drained at an unrealistic fixed price.

This illustrates a broader truth: a liquidity pool is not defined by a single formula. It is defined by the combination of reserves plus a rule for how reserves can change. Different rules are appropriate for different assets. Stable pools optimize for low slippage around parity. Standard volatile-asset pools tolerate bigger price moves. Weighted or multi-token pools can generalize the idea further by holding more than two assets or assigning different target weights.

Balancer is useful here as a reminder that a pool need not even be a 50/50 two-token container. The same primitive can be extended into programmable multi-asset pools where the reserve rule is customized. The core concept survives: assets are pooled, shares track ownership, and a contract mediates trading against those reserves.

How does concentrated liquidity (Uniswap v3) change capital efficiency and risk?

Position typeCapital efficiencyFee potentialManagement neededIf price exits
Full-rangeLowLower per capitalPassiveContinues earning fees
ConcentratedHigh inside rangeHigher when in‑rangeActive rebalancingNo fees and becomes one asset
Figure 198.3: Concentrated vs full‑range liquidity

Uniswap v3 made an important refinement: most liquidity in a full-range constant-product pool is rarely used, because a trading pair spends much of its time in a narrower price region. So instead of forcing all LP capital to be spread across the entire possible price range, v3 lets LPs choose a bounded range where their capital is active.

This is called concentrated liquidity. Inside the chosen range, the position behaves like a much deeper pool than the same capital would support if it were spread across all prices. That improves capital efficiency: traders can get better execution with less total locked capital, and LPs can earn more fees per unit of deployed capital if price stays within range.

But the gain comes from a sharper assumption. If price moves outside the range, the position stops being active and no longer earns fees until price re-enters. The position also becomes entirely one asset at the edge. So concentrated liquidity is not magic; it is a way of trading passive breadth for active precision. Uniswap v3 therefore changed LP shares from fungible ERC-20 receipts into non-fungible positions, because two LPs choosing different price ranges are no longer providing the same economic exposure.

This pattern now appears outside Ethereum as well. Orca’s Whirlpools on Solana and Raydium’s CLMM pools follow the same broad idea: capital can be focused into price intervals rather than smeared across the full range. The chain changes, but the underlying mechanism does not.

How do liquidity pools enable flash loans, TWAPs, and other DeFi primitives?

Once assets sit in a contract under deterministic rules, other primitives become possible. Uniswap v2’s flash swaps are a clear example. A user can take assets out of the pool first and only complete payment by the end of the same atomic transaction. If they fail to return what is owed, the whole transaction reverts.

Economically, this is a flash loan using pool inventory. It matters because it turns idle reserves into composable temporary credit. Traders and protocols can use that credit for arbitrage, refinancing, liquidations, or multi-step routing without holding the starting capital themselves.

Pools can also become oracle inputs. Uniswap v2 introduced a time-weighted average price, or TWAP, by accumulating prices over time so external callers can compute an average over an interval instead of trusting a single spot value. Uniswap v3 improved this by storing accumulator checkpoints in core, reducing the need for external checkpointing and supporting more robust on-chain averages.

But this is also where readers should be careful. A pool price is easy to observe, which makes it tempting as an oracle. It is not automatically safe as one. Spot prices can be manipulated if an attacker can move reserves temporarily, especially using flash-borrowed capital. TWAPs are generally more manipulation-resistant than instantaneous prices, but they still depend on design details, observation windows, and assumptions about how costly manipulation is.

What can go wrong with liquidity pools? (slippage, manipulation, oracle risks)

The strengths of liquidity pools are easy to see on a happy path. The failures are more revealing. A pool assumes that its reserve-based pricing rule is a reasonable local approximation for trading. That assumption weakens when liquidity is thin, when assets are hard to value, or when other protocols treat pool outputs as ground truth.

Slippage is the mildest version of the problem. If the pool is shallow, large trades get poor execution because the reserve ratio moves too much. More serious issues arise when the pool’s state is used outside the pool itself. Research on flash-loan-enabled attacks has shown how public, on-chain liquidity can be borrowed and used to manipulate AMM prices within a single transaction, especially if another protocol reads those prices too naively.

The Curve read-only reentrancy oracle incident is a different but related lesson. There, a pool-integrated value used as an oracle could be made temporarily inconsistent during liquidity removal, which was enough to mislead downstream protocols. The bug was not “liquidity pools are bad.” The lesson was narrower and more important: if a pool-derived value is exposed as an oracle, every transient inconsistency in contract execution order starts to matter.

The Mango Markets episode on Solana shows the economic version of the same theme. Thin on-chain liquidity made price manipulation feasible, and the manipulated price then fed into a broader system in a way that allowed a large extraction of funds. The contracts reportedly behaved as designed. The failure was in market design and risk assumptions, not in a simple coding error.

So a liquidity pool is never just a bucket of assets. It is a financial machine embedded in a broader system of arbitrage, oracle consumption, incentives, and adversarial strategy. Technical security matters, but economic security matters too.

Which pool features differ between protocols and what fundamentals remain the same?

Across protocols and chains, several details change. Some pools are two-asset; others hold many assets. Some use constant product; others use stable-asset or weighted invariants. Some issue fungible LP tokens; others represent positions as NFTs or custom records. Some support multiple fee tiers, hooks, or custom routing logic. Some try to reduce LP pain through single-sided provision or other design choices.

What stays fundamental is simpler. A liquidity pool always has three core elements: pooled reserves, a rule for changing those reserves, and a share system for assigning gains and losses to liquidity providers. If you understand those three pieces, most pool designs become variations rather than mysteries.

That is also why the concept extends cleanly across ecosystems. On Ethereum, Uniswap and Curve made the pattern famous. On Solana, Orca and Raydium implement concentrated and constant-product variants. In the Cosmos ecosystem, Osmosis exposes pool and swap logic through its own tooling and chain architecture. The interfaces differ, the economics can differ, and the execution environments differ, but the primitive remains recognizable.

Conclusion

A liquidity pool is an on-chain reserve of assets governed by a pricing and accounting rule. It exists because blockchains need a way to provide continuous trading liquidity without relying entirely on active order-book market makers.

The core mechanism is easy to state and easy to underestimate: traders move reserves, the rule updates the price, fees accrue to LPs, and arbitrage links the pool back to the wider market.

Everything else is built on top of that foundation.

  • concentrated liquidity
  • stable-asset curves
  • LP tokens
  • flash swaps
  • oracle design

The shortest version to remember is this: a liquidity pool turns stored inventory into a tradable market by making reserve changes the source of price. That is why it is so useful, and also why its risks are unlike the risks of simply holding tokens.

How do you trade through a DEX or DeFi market more effectively?

Trading through DEXs and DeFi markets effectively means matching order size to available liquidity, choosing the right execution type, and controlling price impact. On Cube Exchange, use a clear market-access workflow to compare liquidity conditions, set price constraints, and execute in a way that reduces slippage and unexpected costs.

  1. Fund your Cube account with fiat or a supported crypto transfer so you have on-exchange capital ready to execute.
  2. Check on-chain pool depth and 24h traded volume for the pair on a block explorer or market-data feed and compare the pool price to a reference venue to spot large divergences.
  3. Open the market on Cube and choose an execution type: use a limit order for price control or a market order for immediacy; for swaps, set a tight slippage tolerance or price limit if the interface supports it.
  4. For large sizes, split the order into smaller limit orders or execute in timed slices to reduce single-trade price impact; review estimated fees and the expected fill before submitting.

Frequently Asked Questions

How does a liquidity pool determine the price of a trade without an order book?
+
A pool’s reserves themselves are the price signal: a pricing rule (the AMM formula) reads the current token balances and computes how much output a trader gets for a given input, so trades change reserves and thereby change the quoted price; arbitrageurs then trade against the pool until its implied price aligns with external markets.
Why do larger trades incur more slippage when traded against a pool?
+
Because most AMM curves (e.g., constant-product) force the output price to move as reserves change, the larger a trade is relative to the pool’s reserves the more the reserve ratio shifts, so each incremental unit costs more and execution suffers greater slippage; deeper reserves reduce this price impact for the same trade size.
What is impermanent loss and why does it happen to liquidity providers?
+
Impermanent loss is the rebalancing cost LPs face: when an outside market price moves, arbitrageurs trade with the pool so the pool ends up holding relatively less of the asset that rose and more of the one that fell, leaving an LP’s withdrawn portfolio value potentially lower than simply holding the original tokens; fees can offset but do not eliminate this mechanism.
How are liquidity providers actually paid for supplying capital to a pool?
+
Swap fees are typically embedded into the pool’s reserves rather than paid out separately: traders receive slightly worse execution than a zero-fee curve, and the fee-sized difference accumulates inside the pool so LPs (who own shares of the reserves) benefit as those reserves grow.
Can on-chain liquidity-pool prices be used safely as price oracles?
+
Pool prices exposed on-chain are attractive oracle inputs but are vulnerable to manipulation: instantaneous spot prices can be moved cheaply by flash capital, and while TWAP-style averages are more resistant their safety depends on window length and integration details, so using pools as oracles requires careful design.
How does concentrated liquidity (e.g., Uniswap v3) change the trade-offs for LPs compared with classic pools?
+
Concentrated liquidity lets LPs place capital only inside chosen price ranges, making the active liquidity in that range behave like a much deeper pool (better capital efficiency and higher fee yield if price stays in-range) but if price exits the range the position becomes inactive and effectively converts to one asset until price returns, increasing management needs and tail risk.
What are flash loans/flash swaps and why do they matter for pool security?
+
Pools commonly enable flash swaps/loans by letting a user take assets and require repayment within the same atomic transaction; this composability is powerful for arbitrage and complex routing but also creates a practical attack vector because attackers can borrow large on-chain capital briefly to manipulate on-chain prices or state within a single block.
With so many pool designs, what core features do all liquidity pools share?
+
Implementations differ (two‑token vs multi‑token, constant‑product vs stable‑swap, fungible LP tokens vs NFTs, different fee tiers), but every pool shares three fundamentals: pooled reserves, a rule (pricing/invariant) that governs how those reserves change, and a share/accounting system that assigns gains and losses to liquidity providers.

Related reading

Keep exploring

Your Trades, Your Crypto