AMM (automated market maker)
An AMM (automated market maker) is a smart contract that sets the swap price by a formula based on the token balances in a pool, with no order book and no live sellers.
How it works
A pool holds two tokens, say ETH and USDC, deposited by liquidity providers. The best-known formula is x × y = k: the product of the two balances stays constant. When you take ETH out and put USDC in, there is less ETH in the pool, so its price goes up.
The bigger your trade relative to the pool, the more it moves the price. That is slippage, also called price impact in DeFi. AMM prices stay in line with other markets because arbitrage traders buy wherever it is cheaper.
Liquidity providers earn a share of every swap fee but face impermanent loss when token prices drift apart. There are several AMM designs, including concentrated liquidity within a price range and special curves for stablecoins.
A pool holds 100 ETH and 300,000 USDC, so k = 30,000,000 and the price is 3,000 USDC per ETH. You buy 10 ETH: 90 ETH remain, so USDC must rise to 30,000,000 / 90 ≈ 333,333. You pay about 33,333 USDC, an average of ~3,333 per ETH, 11% above the starting price (before fees).
A common mistake is assuming the quoted price is what a large trade will get. In an AMM a big buy in a small pool moves the price a lot. Check the price impact figure before confirming, and split a large swap or use an aggregator.
Questions and answers
What is an AMM in simple terms?
It is a program that buys and sells tokens from a shared pool and works out the price with a formula. No live sellers or order book are needed.
How does an AMM know the right price?
The formula only knows the pool balances. Arbitrage traders keep the price in line with the wider market by profiting from any gap.
What does x*y=k mean?
The amount of token X times the amount of token Y stays constant during a swap. So the more of one token you take out, the more expensive it gets.
Related terms
Read next
A decentralized exchange has no support desk and no undo button. Here is what to check before a swap so your tokens do not end…
Read →APY and APRAPR is a yearly rate without compounding, while APY is the yearly return including reinvested earnings. For the same…
Updated: 2026-10-19