An automated market maker (AMM) is a smart contract that holds reserves of two or more tokens and lets anyone trade against them at a price set by a formula. There is no order book matching buyers with sellers and no professional market maker quoting prices. Instead, users called liquidity providers deposit tokens into the pool and earn a share of the trading fees. Derivatives platforms sometimes use a price-only variant called a virtual AMM (vAMM).
AMMs are the main trading engine of decentralized exchanges (DEXs) and a core part of decentralized finance (DeFi). They became popular on the Ethereum blockchain, where order books were too slow and expensive to run on-chain, and now operate on most smart-contract networks.
Automated market makers in plain terms
Imagine a currency booth with two drawers, one full of euros and one full of dollars, and no cashier. A rule printed on the wall sets the rate: the emptier a drawer becomes, the more expensive its contents get. Anyone can walk up, put money in one drawer and take money from the other according to the rule.
The drawers are stocked by members of the public who lend their cash to the booth. In return, every customer pays a small fee that is shared among them. No one negotiates prices; the rule simply responds to how much has been taken out of each drawer, and traders elsewhere keep the booth's rate in line with the wider market.
How AMMs work
Each AMM pool is a liquidity pool governed by a pricing function. The best-known is the constant product rule, used by Uniswap:
- is the pool's reserve of the first token.
- is the pool's reserve of the second token.
- is a constant that must not fall when a trade is made (fees make it grow slightly over time).
A trade adds one token to the pool and removes the other, keeping the product unchanged. For example, a pool holding 100 ETH and 300,000 USDC has and a spot price of 3,000 USDC per ETH. A trader adding 3,000 USDC, ignoring fees, leaves 303,000 USDC in the pool, so the ETH reserve must fall to . The trader receives about 0.99 ETH, an average price near 3,030 USDC, roughly 1% above the starting price. That gap is slippage, and it shrinks as the pool grows, which is why deep liquidity matters. Variations are covered in formulas for automated market makers.
The pool's price changes only when someone trades with it. When it drifts from prices on other venues, traders practicing arbitrage buy the cheap side and sell the expensive side until the gap closes.
History and main designs
Bancor launched an early token pool system in 2017. Uniswap went live in November 2018 with a simple constant product design, and its second version in 2020 allowed any pair of ERC-20 tokens to be traded directly. Later designs changed the formula or the way liquidity is placed:
- Stablecoin curves. Curve, launched in 2020, uses a formula that keeps prices nearly flat for assets meant to trade at par, such as two stablecoins.
- Concentrated liquidity. Uniswap version 3, released in 2021, let providers place funds within a chosen price range, raising capital efficiency but requiring more active management.
- Customizable pools. Uniswap version 4, launched in early 2025, added "hooks" that let developers attach custom logic to pools.
- Copies on other chains. PancakeSwap and many others adapted these models for other networks.
Liquidity providers and incentives
A liquidity provider deposits both tokens of a pair, usually in equal value, and receives a liquidity provider token (LP token) representing their share. Fees on each trade, commonly a fraction of a percent, accrue to the pool. Many protocols have added token rewards on top, a practice behind the rise of yield farming.
Risks and limitations
- Impermanent loss. When prices move, providers end up holding more of the weaker token and can be worse off than if they had simply held both, a cost described under impermanent loss.
- Front-running. Because pending transactions are public, bots can trade just before and after a large order to capture value at the trader's expense.
- Contract and token risk. Bugs in pool code can be exploited, and anyone can create a pool for a worthless token, so traders face scams such as a rug pull.
- Costs. Each trade pays a gas fee to the network as well as the pool fee, which can make small trades uneconomic on busy chains.
Regulators have also debated whether firms that build or front-end AMM protocols carry exchange or broker obligations, a question that remains open in several jurisdictions.