Skip to content
HodlCue

Reference

Automated Market Maker (AMM)

An automated market maker (AMM) is a decentralized exchange protocol that prices assets algorithmically and executes token swaps directly against smart-contract liquidity pools rather than matching individual buy and sell orders.

How AMM Liquidity Pools and Pricing Work

Traditional exchanges rely on an order book where buyers and sellers list bids and asks. In contrast, an AMM replaces the order book with a paired reserve of tokens locked into a smart contract. Traders swap one asset for another directly through the pool, paying a transaction fee that rewards the liquidity providers who deposit the underlying assets.

Pool pricing updates automatically through mathematical formulas. Many foundational decentralized exchanges use the constant product invariant, expressed as x * y = k, where x and y represent the quantities of two pooled tokens and k is a fixed product. When a trader purchases token x, its reserve decreases while the reserve of token y increases. The algorithm adjusts the exchange rate to keep k balanced, raising the relative price of the purchased asset as pool inventory drops.

Key operating factors for AMM participants include:

  • Slippage: The difference between expected execution price and final execution price, which rises on large orders relative to total pool size.
  • Impermanent Loss: The unrealized loss liquidity providers experience when token price ratios diverge relative to holding the assets outside the pool.
  • Arbitrage Balancing: External arbitrage traders who balance pool exchange rates with broader market prices across external venues.

AMMs Compared to Traditional Order Books

Centralized order books require active market makers to post two-sided quotes, which demands continuous compute capacity and low-latency execution. AMMs eliminate the need for active counterparty matching by enabling deterministic, asynchronous execution on chain. However, traditional order books generally offer tighter capital efficiency for high-volume pairs, while specialized AMM variations, such as concentrated liquidity pools, optimize capital deployment by allowing liquidity providers to allocate funds within specific price ranges.

Related terms

Back to glossary