CoinmicoCoinmico

Liquidity pools and AMMs: how a formula sets a price

A liquidity pool replaces every bid and ask in an order book with one equation. This lesson works through that equation with real numbers, shows why large trades get worse prices, and explains what liquidity providers earn and what they risk.

Coinmico Editorial·Sep 20, 2026·5 min read
A hyperbolic curve labelled x times y equals k with a point sliding along it as reserves shift
A hyperbolic curve labelled x times y equals k with a point sliding along it as reserves shift

What you will learn

  • The constant-product rule x × y = k means the pool's price is the ratio of its two reserves, and every trade moves it.
  • Price impact grows with trade size relative to pool depth. A trade of 1% of the pool moves the price about 2%; a trade of 10% moves it over 20%.
  • Liquidity providers earn fees but face impermanent loss — they end up holding more of whichever token fell. Fees must outrun it for providing to pay.

The previous lesson said a pool's price is the ratio of its reserves and that every trade moves it. Here is the rule that makes both true, and everything that follows from it.

The constant-product rule

The original and still most common AMM design, introduced by Uniswap, keeps one quantity fixed:

x × y = k

where x is the pool's reserve of the first token, y the reserve of the second, and k a constant that changes only when liquidity is added or removed. Trades may move x and y however they like, so long as their product stays at k.

The constant-product curve: the pool sits at a point on x times y equals k, and a swap slides it along the curve, changing the price

Take a pool of 100 ETH and 300,000 USDC. Then k = 30,000,000 and the price is 300,000 ÷ 100 = 3,000 USDC per ETH.

One trade, worked through

You want to buy ETH with 30,000 USDC.

  1. After the trade the pool holds 330,000 USDC.
  2. To keep k constant, ETH must fall to 30,000,000 ÷ 330,000 = 90.909 ETH.
  3. You receive 100 − 90.909 = 9.091 ETH.
  4. Your average price was 30,000 ÷ 9.091 = 3,300 USDC per ETH — 10% worse than the quoted 3,000.
  5. The pool's new price is 330,000 ÷ 90.909 = 3,630.

You traded 10% of the pool's USDC reserve and paid a 10% premium to the starting price. Someone buying next pays from 3,630. That premium is price impact, and it is not a fee — it is the curve. The slippage lesson shows how to size trades around it.

The same trade in a pool ten times larger (1,000 ETH, 3,000,000 USDC) yields 9.901 ETH at an average of 3,030 — a 1% impact. Depth is everything.

Fees

Each swap pays a fee, typically 0.05% to 1% depending on the pool, taken from the input token and left in the pool. Fees are the only reason liquidity exists: they accrue to the liquidity providers (LPs) in proportion to their share.

In the trade above at a 0.3% fee, 90 USDC stays in the pool as fees before the swap is computed. k grows slightly with every trade, which is how LPs' claims grow.

Being a liquidity provider

To provide liquidity you deposit both tokens in the pool's current ratio — say 1 ETH and 3,000 USDC — and receive an LP position representing your share. You earn a share of every fee. You can withdraw at any time and receive your share of whatever the reserves are then.

That last clause is the catch.

Impermanent loss

Suppose ETH doubles to 6,000 on centralised exchanges. Arbitrage traders buy ETH from the pool until its price matches, which means they take ETH out and put USDC in. The pool now holds fewer ETH and more USDC; your share is worth:

Held in walletProvided to pool
Start1 ETH + 3,000 USDC = 6,0001 ETH + 3,000 USDC = 6,000
After ETH → 6,0001 ETH + 3,000 USDC = **9,000**0.707 ETH + 4,243 USDC = **8,485**

You are up — but 515 dollars less than if you had simply held. That gap is impermanent loss: the pool automatically sold the token that rose and bought the one that fell. It is "impermanent" only in the sense that if the price returns to where you entered, the gap closes. If it does not, the loss is real.

Fees are meant to compensate. Providing liquidity pays when fee income exceeds impermanent loss, which is true for pairs that trade heavily and move little (stablecoin pairs, ETH/stETH) and frequently false for volatile new tokens, whose LPs can earn high fees and still lose to a 5× move in either direction.

Concentrated liquidity

The constant-product curve spreads liquidity across every price from zero to infinity, most of which will never be reached. Concentrated liquidity (Uniswap v3 and its many forks) lets an LP choose a price range — say 2,800 to 3,200 — and puts all their capital to work within it. Inside the range the pool behaves like a much deeper constant-product pool; outside it, that LP's position holds only one token and earns nothing until the price returns.

For traders, the result is far better prices on the same capital. For LPs, higher fee income within the range and total exposure to impermanent loss at its edges. Most large DEX volume today runs through concentrated-liquidity pools.

Reading a pool

When Coinmico shows a DEX pair, the figures that matter are:

  • Liquidity (TVL) — the dollar value of both reserves. Price impact is relative to this.
  • Volume / liquidity — how hard the pool works. A pool turning over its liquidity daily is earning well for LPs and is genuinely used; one at 1% is idle.
  • Pool age and creator — a pool created an hour ago by an address that also created the token is the setup for the rug pull covered in the next-but-one lesson.

The DEX rankings sum measured swap volume across every pool on each venue; a coin's page lists its individual pools with their liquidity.

Price comparedIndexed to the start of the last 30 days
Aug 24Sep 23
Measured by CoinmicoLast updated Methodology

What this means in practice

  • The pool's price is the ratio of its reserves. Your trade changes that ratio, and the change is your cost.
  • Providing liquidity is selling volatility for fees. It pays on pairs that trade a lot and move a little.
  • Judge a pool by liquidity and turnover, not by the token's headline price.

Next in this track

Price impact is the largest hidden cost of on-chain trading and the easiest to control. The next lesson separates it from slippage, explains the tolerance setting, and shows how MEV bots exploit both.

Assets in this piece

Every figure here is measured by Coinmico across the venues and chains we index. See our methodology.

More in On-chain & DEXs

A quoted price marker and an executed price marker on a pool curve, with the gap between them shaded and split into impact and slippage
On-chain & DEXs

Slippage and price impact: the cost nobody shows you

Two different things hide under the word "slippage", and confusing them is how traders lose 5% on a swap without noticing. This lesson separates them, explains the tolerance setting, and shows how bots turn a loose setting into their profit.

Coinmico Editorial·Sep 20, 2026·5 min read