x · y = k

A pool holds two tokens and every trade must leave their product unchanged. That single rule produces the price, the slippage, the impermanent loss and the arbitrage — everything else on this page is a consequence of it. Drag anything; the numbers are computed by the same code the pool analyser runs on, so nothing here is a simplified retelling.

price = y / x  ·  out = Δin·(1−f)·Y / (X + Δin·(1−f))  ·  in = ( X·Y / (Y − Δout) − X ) / (1 − f)

1 · Every swap slides along the curve

The dashed line is the tangent at the starting point — its slope is the spot price. The red chord is what you actually fill at. The gap between them is slippage, and it grows with your trade relative to the pool.

Spot before
Spot after
Your fill
Price impact
Reserves after
Fee to LPs

k = . Buying moves you up-left along the curve: less ETH in the pool, so every further ETH costs more.

x · y = k spot price (tangent) your fill (chord)

2 · Depth is the whole game

The same order costs wildly different amounts depending on how much liquidity it is pushing through. Total cost — fee plus slippage — at a fee:

Below roughly 1% of the pool you are paying the fee and little else. Past a few percent, slippage takes over and grows without bound. This is why the analyser treats a thin pool as a risk rather than a high-APR opportunity.

3 · Does splitting a trade help?

A 100 / 100 pool, buying token B either in one go or in equal pieces. The intuition that smaller trades get better prices is worth testing.

One trade
Split
Cost of splitting

4 · Being the pool: impermanent loss

As the price moves, arbitrageurs buy the rising token from you and sell you the falling one. Against simply holding the two tokens you are always behind, by 2√r/(1+r) − 1. Concentrating into a range amplifies it.

Hold the two tokens
Be the pool
Impermanent loss
In dollars
Range efficiency
Loss in that range

Concentrated loss is . On a $10,000 position. IL(r) = IL(1/r), so a halving costs exactly what a doubling does.

full range concentrated range

5 · Arbitrage, and who pays for it

The pool has no idea what anything is worth. It only learns when somebody trades it back into line — and that somebody is paid out of the liquidity providers' pockets. Inside the fee band no trade is worth making, which is why a higher fee tier bleeds less.

What to do
Optimal size
Pool price after
Gross
After gas

No-arbitrage band: . The optimal trade pushes the pool's post-fee marginal price exactly onto the outside price — any further and you are trading against yourself.

fee band, nothing to do profit after gas

Where this connects

Each section above is a term in the real analysis:

  • Depth becomes the entry and exit cost of an actual position — on a thin pool the round trip can cost more than months of fees.
  • Impermanent loss is the thing fee income has to beat; the analyser measures both against the pool's real price history rather than a slider.
  • The fee band is the structural bleed: every move larger than the band hands an arbitrageur a rebalance at a stale price.

Analyse a real pool →

Educational model: a v2-style pool with the fee taken on the input. Fees are not compounded back into k, and gas is ignored except where shown. Not financial advice.