DexLadder Open the app

Constant product formula (x·y=k)

The rule that a pool's two reserves multiplied together must stay constant through a swap, ignoring fees.

Last verified 13 September 2026 · written by the DexLadder team

What it means

The rule that a pool's two reserves multiplied together must stay constant through a swap, ignoring fees.

Why it matters when you trade

This one identity produces everything else: the price is simply the ratio of reserves, depth falls away as you push in either direction, and the pool can never be fully drained because the price approaches infinity as a reserve approaches zero. Because it is exact arithmetic, you can compute your fill before you trade rather than discovering it afterwards.

Worked example

Reserves 100 ETH × 300,000 USDC give k = 30,000,000. Buy 5 ETH and USDC must rise to 30,000,000 / 95 = 315,789 — a cost of 15,789 for 5 ETH.

See it on live markets

DexLadder runs constant product formula (x·y=k) against live market and pool data, with simulated capital, so you can watch it act on an order instead of reading about it — no account, no wallet, nothing installed.

Related terms

← Every term in the glossary

Open the free Web3 desk — no account, nothing to install