Library · Crypto, word by word · DeFi
What is an automated market maker (AMM)?
An automated market maker (AMM) is a smart contract that sets prices by formula instead of matching buyers with sellers. Traders swap against a pool of two tokens, and the price moves with the ratio of the tokens left in the pool.
What it means for you
Because the price is set by the pool's balances, a large trade against a small pool gets a noticeably worse rate than the quoted price. Check the price impact shown before you confirm a swap, and compare it with the size of your trade.
How it works
The common design is the constant product formula, x × y = k: the pool holds amounts x and y of two tokens, and every trade must leave their product unchanged. Buying one token adds the other to the pool and removes the one bought, so each further unit costs more, and larger trades move the price more than small ones. The pool does not see outside prices; arbitrage traders buy from it or sell to it until its ratio matches other markets.
An example
Say a pool holds 100 of token A and 10,000 of token B, so k is 1,000,000 and the quoted price is 100 B per A. Buying 10 A leaves 90 A, so the pool must hold 1,000,000 ÷ 90, about 11,111 B. You pay about 1,111 B, an average of 111 B per A before fees, against the quoted 100.
Sources: Uniswap docs: How Uniswap works, BIS Quarterly Review: DeFi risks and the decentralisation illusion, Uniswap docs: Understanding returns (v2) · checked 4 October 2026
Often confused with
Related words
Educational content, not financial advice. Written by hand and checked against the source named above. Something wrong? Tell us and we reply within two business days.