Automated Market Maker (AMM)
A smart contract protocol that enables token trading using liquidity pools and a mathematical pricing formula instead of order books.
What is AMM?
An automated market maker (AMM) is a type of decentralized exchange protocol that uses smart contracts and liquidity pools to facilitate asset trading without traditional buyers and sellers being matched through an order book. Instead of matching orders, AMMs use a mathematical formula — most commonly the constant product formula x × y = k, where x and y are the quantities of two tokens in a pool — to determine exchange rates automatically based on the ratio of assets in the pool. Liquidity providers deposit pairs of tokens into these pools and earn a portion of the trading fees generated. When a trader swaps one token for another, they interact directly with the pool, which automatically adjusts the price based on the trade size. Uniswap pioneered the AMM model in 2018, and variants now power most decentralized exchanges on Ethereum and competing blockchains.
Example
A Uniswap ETH/USDC pool contains 100 ETH and 300,000 USDC (k = 30,000,000). A trader swaps 1 ETH into the pool. To maintain k, the pool now holds 101 ETH and must return 300,000 − (30,000,000 / 101) ≈ 2,970 USDC to the trader. The effective price for 1 ETH is $2,970 — slightly less than the pre-trade price of $3,000, representing the price impact of the trade.
Source: Uniswap Protocol Documentation