Smart contracts that price and trade assets algorithmically, using pooled liquidity instead of an order book.
Pool funded
Liquidity providers deposit a pair of tokens into a shared pool.
Price via formula
A formula (commonly x * y = k) sets the exchange rate based on the pool's current balances.
Trade
A trader swaps one token for the other; the pool's balances - and therefore the price - shift accordingly.
Fees accrue
A small fee from each trade is added to the pool, shared among liquidity providers.
Unlike a traditional exchange that matches buyers and sellers directly, an AMM always quotes a price algorithmically from whatever is in the pool - there's always someone to trade with, but the price moves as the pool's ratio changes.
Larger trades relative to the pool size move the price more - this is 'slippage', and it's why price impact is shown before every swap.
Liquidity providers earn trading fees, but are exposed to 'impermanent loss' if the two pooled assets' relative price moves significantly compared to just holding them.
Why does my swap quote change as I type a bigger amount?
Because the AMM's price is a function of pool size versus trade size - larger trades shift the pool ratio more, which is exactly what the price-impact figure on the Swap page reflects.
Want to see the math with numbers you control?
Open the simulator