TL;DR
An AMM is a decentralized trading mechanism that uses liquidity pools and mathematical formulas instead of order books to determine token prices and execute swaps.
Instead of matching buyers and sellers like a traditional exchange, AMMs use liquidity pools — smart contracts holding pairs of tokens (e.g., SOL/USDC). The price is determined by a formula, most commonly the constant-product formula (x × y = k). When you swap SOL for USDC, you add SOL to the pool and remove USDC, which shifts the ratio and adjusts the price. Larger trades relative to pool size cause more price impact (slippage).
Raydium, Orca, and PumpSwap are Solana’s main AMMs. Raydium uses both standard AMM pools and concentrated liquidity (CPMM). Orca pioneered concentrated liquidity on Solana with its Whirlpools. PumpSwap handles graduated Pump.fun tokens. Jupiter aggregates across all of them to find the best price for any given swap.
Anyone can become a liquidity provider (LP) by depositing equal value of both tokens into a pool. LPs earn a share of trading fees proportional to their pool share. However, LPs face impermanent loss when one token’s price moves significantly relative to the other. Concentrated liquidity AMMs let LPs focus their capital in specific price ranges for higher fee earnings but greater impermanent loss risk.