An AMM (Automated Market Maker) is a type of decentralized exchange protocol that uses liquidity pools and mathematical algorithms to facilitate token swaps. Instead of matching buyers with sellers through an order book, AMMs allow users to trade against a pool of tokens managed by smart contracts.

The most common AMM model uses a formula called the constant product formula (x * y = k), where the product of the two token quantities in a pool must remain constant. When you buy one token, its supply in the pool decreases, raising its price. This happens automatically without any human market makers.

How AMMs work in practice:

  • Liquidity providers deposit pairs of tokens into a pool and earn trading fees as a reward
  • Traders swap tokens directly against the pool, paying a small fee on each trade
  • Smart contracts automatically calculate prices based on the ratio of tokens in the pool

Popular AMM platforms include Uniswap, SushiSwap, Curve, and PancakeSwap. Each uses slightly different algorithms optimized for various use cases — for example, Curve is optimized for stablecoin swaps with minimal slippage.

While AMMs have made DeFi trading accessible to everyone, they come with risks. Liquidity providers face impermanent loss when token prices diverge, and low-liquidity pools can experience significant slippage on larger trades.

AMMs are a foundational innovation in decentralized finance, enabling permissionless trading and yield farming opportunities that anyone can access through a wallet like MetaMask.