Skip to content

What Is an AMM? Pool Math, Price Impact and Liquidity Risk

Work through a small pool trade to see why a larger order changes the average execution price. Then distinguish price impact, slippage and the risks borne by liquidity providers.

What Is an AMM? Pool Math, Price Impact and Liquidity Risk
Illustration of a constant-product pool. The formula shown is one AMM model; the calculation below explicitly excludes fees.

A pool quotes a trade using rules

An automated market maker lets traders exchange assets against liquidity held by a protocol. Liquidity providers supply the assets and may receive fees under the pool's rules. The useful question is not whether a robot is trustworthy, but what the contract permits, which assets it holds and how the trade changes its balances.

A constant-product pool is one model. Uniswap v2's pricing documentation describes reserves and the invariant check, including fees. It does not establish that every AMM uses the same formula or that every swap succeeds.

Worked example: buying 1 ETH from a small pool

For this calculation only, ignore swap fees, gas, rounding and other trades. Start with 10 ETH and 30,000 USDT. Treat USDT as the quote unit, without assuming its market value is guaranteed.

  1. The starting product is 10 × 30,000 = 300,000.
  2. After the trader removes 1 ETH, 9 ETH remain.
  3. The required USDT reserve is 300,000 ÷ 9 = 33,333.333…
  4. The trader therefore adds about 3,333.33 USDT.

To see how pool depth changes the cost, compare a pool with ten times the starting reserves. With 100 ETH and 300,000 USDT, removing 1 ETH requires 30,000,000 ÷ 99 − 300,000 = about 3,030.30 USDT before fees. Both pools begin at a reserve ratio of 3,000 USDT per ETH, but removing one ETH consumes a different fraction of their liquidity.

This is a calculation from the stated assumptions. It is not a live quote. A fee-bearing implementation adjusts the input calculation; retained fees can increase the reserve product. “k always stays the same” is only the simplified no-fee model, not a universal statement about real pools.

Price impact and slippage describe different comparisons

Price impact describes how the trade itself changes the available exchange rate. Slippage compares the expected or quoted result with the executed result as conditions change. A quote may already include price impact. Setting a slippage tolerance does not remove that impact; it bounds an acceptable execution result and may cause the swap to revert if the bound cannot be met.

LP fees do not guarantee profit

As arbitrageurs trade against a pool, its asset mix changes. Impermanent loss compares the value of that position with holding the original assets, under a specified model. It is not synonymous with losing money in dollar terms. Uniswap's return explanation shows why fees and relative price movement must be considered together.

In the simple constant-product model, returning to the original relative price removes that modeled divergence. Real returns can still be affected by fees, gas, rebalancing, token failures and contract risk. Arbitrage tends to connect prices across venues; it does not guarantee fair outcomes or positive LP returns.

Three designs worth distinguishing

  • Curve StableSwap: its documented invariant combines constant-sum and constant-product behavior. It is not simply x + y = k. Low price impact near balance is not protection against a stablecoin losing its peg.
  • Balancer weighted pools: weights and balances affect prices. A weighted pool can contain two tokens; three is not a minimum.
  • Uniswap v3: providers choose price ranges. The concentrated-liquidity documentation explains that an out-of-range position is inactive and stops earning swap fees until price returns to its range.

Before interpreting a quote or LP return, identify the pool design, fee treatment, liquidity at the trade size and the units being compared. These details explain much more than a promise of trading safely at any time.

Revision history and scope

Reviewed 19 October 2026. Corrected the pool calculation and the descriptions of Curve, Balancer and liquidity-provider risk. The numerical examples are hypothetical calculations, not market quotes.

24 October 2026: Moved the earlier correction note below the lesson and added a reader-focused introduction. This is a presentation edit; the earlier factual review date is unchanged.