An automated market maker (AMM) is a type of decentralized exchange that uses a mathematical formula to set prices rather than matching buyers with sellers in an order book. You trade against a pool of tokens. The formula adjusts the price as the pool’s balance shifts with each trade.

How AMM pricing works

The most common formula is the constant product formula, used by Uniswap v2: x multiplied by y equals k, where x and y are the amounts of each token in the pool and k is a constant. If a pool holds 100 ETH and 300,000 USDC, k equals 30,000,000. Buy 1 ETH and the pool drops to 99 ETH. To keep k constant, USDC must increase to 303,030. You paid 3,030 USDC for 1 ETH when the implied price was 3,000. The extra 30 USDC is slippage caused by your own trade moving the pool ratio.

Larger trades relative to pool size cause more slippage. A $1,000 swap in a $10 million pool barely moves the ratio. The same $1,000 swap in a $100,000 pool moves it substantially. This is why liquidity depth determines the effective exchange rate you receive, not just the quoted mid-price.

What this means for traders

Always check the price impact shown by the DEX interface before confirming a large swap. Price impact is your slippage estimate. A 0.5% price impact on a $5,000 swap costs $25. On a $200,000 swap, that is $1,000. For large trades, using an aggregator like 1inch or Paraswap that splits your order across multiple pools and routes usually produces a better rate than a single DEX trade.

For arbitrage between DEXes and the price correction that AMMs create, see crypto arbitrage explained. For how liquidity providers earn fees on these pools, see DeFi yield mechanics.

A concrete example

You want to swap $50,000 USDC for ETH on Uniswap v3. In a pool with $5 million in liquidity, price impact is roughly 0.5%, meaning you receive ETH worth $49,750 at the pre-swap price. In a pool with $500,000 in liquidity, that same trade causes about 5% price impact, and you receive $47,500 worth. Running the same swap through 1inch, which splits it across three pools, might reduce the average price impact to 0.3%, saving you roughly $100. On smaller, illiquid tokens, the difference is far more dramatic.

Frequently asked questions

How do AMMs differ from order book exchanges?
Order book exchanges (Coinbase, Binance, most CEXes) match buyers with sellers at specific prices. AMMs have no individual counterparties; you trade against a pool. AMMs never run out of liquidity (there is always a price at which you can trade), but large trades cause slippage that limit orders on order books avoid.

What is a stable AMM and when does it matter?
Curve Finance uses a modified formula optimized for assets that should trade near parity (USDC/USDT, stETH/ETH). Its stableswap formula provides dramatically lower slippage for near-parity pairs than the constant product formula. For swapping more than $100,000 between stablecoins, Curve almost always gives a better rate than Uniswap.

What is Uniswap v3 concentrated liquidity?
Liquidity providers can concentrate their capital in a specific price range rather than spreading it across the full 0-to-infinity range. Capital within the active range earns more fees per dollar deployed. Capital outside the range earns nothing and becomes fully one-sided (you hold only the depreciating asset). It is a more capital-efficient but more actively managed system than v2.