What is an AMM (Automated Market Maker)? Complete Guide
Automated Market Makers (AMMs) are smart contracts that enable decentralized token swaps through liquidity pools instead of traditional order books.
What is an AMM (Automated Market Maker)?
An Automated Market Maker (AMM) is a type of decentralized exchange protocol that uses mathematical formulas and on-chain liquidity pools to price and execute trades — replacing the traditional order book model used by centralized exchanges. Instead of matching buyers and sellers, AMMs let users swap tokens directly against pools of assets supplied by liquidity providers.
AMMs are the foundation of modern decentralized finance. Protocols like Uniswap, Curve, Balancer, and PancakeSwap collectively process tens of billions of dollars in daily volume across multiple blockchains. Their permissionless design has enabled the launch of countless tokens that would never qualify for centralized listings.
How Does It Work?
The most common AMM design uses a constant product formula: x × y = k, where x and y represent the quantities of two tokens in a pool, and k is a constant. When a user swaps token A for token B, the pool rebalances such that the product remains constant — naturally creating a price curve where larger trades incur more slippage.
The full mechanism involves:
1. Liquidity providers (LPs) deposit equal values of two tokens into a pool. 2. Traders swap one token for another, paying a small fee (typically 0.3%). 3. Fees accrue to LPs proportional to their pool share. 4. Prices adjust automatically based on the ratio of tokens in the pool.
Different AMM designs use different curves: Curve Finance optimizes for stablecoin swaps using a flatter curve, Balancer allows multi-asset pools with custom weights, and Uniswap V3 introduced concentrated liquidity for capital efficiency.
History and Evolution
The AMM model was pioneered by Uniswap V1 in November 2018, designed by Hayden Adams with conceptual contributions from Vitalik Buterin. Uniswap V2 launched in May 2020 with ERC-20-to-ERC-20 pairs and triggered the "DeFi Summer" boom.
Uniswap V3 in May 2021 introduced concentrated liquidity, allowing LPs to specify price ranges. Curve Finance optimized AMMs for stablecoin trading. By 2024-2025, AMM innovation continued with intent-based architectures, MEV-resistant designs (CowSwap), and cross-chain liquidity protocols.
Key Concepts
- Liquidity pool: The smart contract holding the paired tokens. - Impermanent loss: The opportunity cost LPs face when token prices diverge. - Slippage: The difference between expected and executed price, larger for big trades. - LP tokens: Receipts representing a provider's share of a pool.
Practical Example
A user wants to swap 1 ETH for USDC on Uniswap. The ETH/USDC pool contains 1,000 ETH and 3,000,000 USDC, so the price is roughly 3,000 USDC per ETH. After the swap, the pool holds 1,001 ETH and approximately 2,997,003 USDC. The user receives ~2,997 USDC (minus the 0.3% fee), and the pool's new price reflects the slightly increased ETH supply. Liquidity providers earn the fee proportional to their share.
Related Terms and Next Steps
To master AMMs, explore the DEX ecosystem they power, understand liquidity pools in depth, and see how AMMs integrate with broader DeFi strategies like yield farming.
[Related: dex] [Related: liquidity-pool] [Related: defi] [Related: yield-farming] [Related: smart-contract]