EDITION / 7 OCTOBER 2026 / NEWS & CONTEXTOur editorial standard ↗
LondonLocal time
New YorkLocal time
TokyoLocal time
SydneyLocal time
China · BeijingLocal time
THE CONTEXT BEHIND CRYPTO.
MARKET WATCHBTC——ETH——SOL——LINK——All markets ↗
DeFi

How an AMM prices a swap: a worked pool example

Use a simple constant-product model to understand why each additional token can cost more than the last.

CoinEditorial3 min read
Explainer · Educational content
Editorial illustration: Concept diagram for How an AMM prices a swap: a worked pool example: RESERVE X, X × Y, RESERVE Y
Original CoinEditorial concept diagram; educational illustration, not live market data.
THE TAKEAWAY

A pool ratio is a marginal price, not a promise to fill any size at that price.

A rule replaces a traditional order book

A basic constant-product automated market maker maintains a relationship between two reserves, often written x × y = k. Swaps add one asset and remove another according to the rule. Uniswap’s documentation explains pool-based execution. Real implementations can include fees and different designs, so this simplified model should not be applied indiscriminately to concentrated-liquidity pools or every protocol.

Work through the numbers

Imagine a fee-free teaching pool with 100 units of asset X and 10,000 units of Y. The product is 1,000,000. Adding 1,000 Y brings that reserve to 11,000. To preserve the product, X becomes approximately 90.909, releasing about 9.091 X. The average price is therefore about 110 Y per X, not the starting reserve ratio of 100.

Separate impact from slippage

The example shows the price impact of the order itself. Slippage concerns a difference between the expected and actual outcome, which can also reflect changing state before execution. Fees reduce output further. A minimum-output condition can define an acceptable boundary, but it cannot create missing liquidity. Raising tolerance blindly is not the same as obtaining a better quote.

Use the model as a reading tool

Compare small and larger hypothetical quotes in both directions without signing. Ask which pool design and fee tier the route uses. If the interface combines several pools, a single reserve ratio will not describe the whole path. The mathematics is useful because it explains why a visible price and a large valuation do not imply that an equally large position can be exchanged at that price.

Sources & further reading

Sources checked 7 October 2026. Source-linked explanatory content; not personalised investment advice. Found an error? Request a correction.

KEEP READING

More context. Better questions.

Explore all