What is an Automated Market Maker (AMM)?
If you've ever traded on Uniswap or PancakeSwap, you've already used an AMM (Automated Market Maker). This seemingly complex concept can actually be understood with a simple analogy.
What is AMM? Think of a Vending Machine
Imagine a vending machine:
- Traditional Exchange (Order Book): Like a store with clerks where buyers and sellers need to match orders.
- AMM: Like a vending machine—you insert money, the machine automatically calculates the price and gives you the product. No clerk, entirely algorithm-driven pricing.
In the crypto world, AMM is a trading mechanism that doesn't require an order book, using mathematical formulas to automatically price trades, allowing you to buy and sell tokens anytime.
Tip
AMM's biggest innovation is "eliminating the need for buyer-seller matching"—you can trade instantly at any time.
How Does AMM Work?
Core Formula: x * y = k
The core of AMM is a simple mathematical formula: x * y = k
- x = Amount of token A in the pool
- y = Amount of token B in the pool
- k = A constant value
Let's understand with actual numbers:
Example
Assume an ETH/USDT liquidity pool:
-
Initial State
- Pool has 100 ETH (x = 100)
- Pool has 200,000 USDT (y = 200,000)
- k = 100 × 200,000 = 20,000,000
- ETH price = 200,000 ÷ 100 = 2,000 USDT
-
Someone Wants to Buy 10 ETH
- Pool must maintain k = 20,000,000
- After removing 10 ETH, pool has 90 ETH
- So 90 × y = 20,000,000
- y = 222,222 USDT
- Buyer pays 222,222 - 200,000 = 22,222 USDT (2,222 USDT per ETH)
-
New Price After Trade
- Pool now has 90 ETH and 222,222 USDT
- ETH new price = 222,222 ÷ 90 = 2,469 USDT
Notice what happened? After buying ETH, the ETH price increased! This is AMM's automatic pricing mechanism.
Tip
The amount you buy affects the price. The more you buy, the greater the price slippage. This is why large trades need to pay attention to slippage settings.
What is a Liquidity Pool?
A liquidity pool is the core of AMM. It's like a public fund pool:
Liquidity Pool Structure
- Two-token pair: e.g., ETH/USDT, BTC/USDC
- Equal value deposit: Must deposit equal values of both tokens when providing liquidity
- Earn fees: Traders pay 0.3% per trade (most AMMs), distributed proportionally to liquidity providers
Anyone Can Become a Liquidity Provider
Unlike traditional exchanges, AMM allows anyone to provide liquidity:
- Choose a trading pair (e.g., ETH/USDT)
- Deposit equal values of both tokens
- Receive LP Tokens (liquidity certificates)
- Start earning trading fees
Warning
Providing liquidity has "impermanent loss" risk! The greater the price volatility, the greater the loss. Understand the risks before participating.
Order Book vs AMM Comparison
| Aspect | Order Book (CEX) | AMM (DEX) |
|---|---|---|
| Matching | Buyer-seller pairing | Smart contract auto-pricing |
| Liquidity Source | Market makers, traders | Liquidity providers (anyone) |
| Price Determination | Supply-demand matching | x * y = k formula |
| Trading Depth | Limited order depth | Depends on pool size |
| Slippage | Low for large trades | High for large trades |
| Platforms | Binance, OKX, Coinbase | Uniswap, PancakeSwap, Curve |
| Best For | Major coins, professional trading | Long-tail tokens, small trades |
| Entry Barrier | KYC required | Connect wallet only |
Tip
Order books suit large trades, AMMs suit small trades and new tokens. Many traders use both platforms.
Popular AMM Platforms
1. Uniswap
![]()
- Chains: Ethereum, Polygon, Arbitrum, etc.
- Feature: Largest DEX, best liquidity
- Fees: 0.05%, 0.3%, 1% tiers (V3)
- Best For: Mainstream token trading
2. PancakeSwap
- Chain: BNB Chain
- Feature: Low gas fees, fast
- Fees: 0.25%
- Best For: Trading tokens on BNB Chain
3. Curve Finance
- Chains: Multi-chain support
- Feature: Optimized for stablecoin swaps, extremely low slippage
- Best For: Stablecoin swaps (USDT ↔ USDC)
Tip
For swapping stablecoins, choose Curve first—slippage is much lower than Uniswap.
AMM Pros and Cons
Pros
✅ Permissionless: Anyone can trade immediately ✅ Continuous Liquidity: Trade 24/7 anytime ✅ Open Participation: Anyone can provide liquidity and earn fees ✅ New Token Friendly: Easy for new projects to create trading pairs ✅ Decentralized: No account freezing
Cons
❌ Price Slippage: High slippage for large trades ❌ Impermanent Loss: Liquidity providers face price volatility risk ❌ High Gas Fees: Transaction costs high on Ethereum mainnet ❌ MEV Risk: Vulnerable to sandwich attacks ❌ Price Efficiency: Price discovery less precise than order books
Risk Warning: Impermanent Loss
If you want to provide liquidity to earn fees, you must understand the important concept of impermanent loss.
What is Impermanent Loss?
After providing liquidity, if the price ratio of the two tokens changes, your total value when withdrawing may be less than simply holding both tokens.
Simple Example
- You deposit 1 ETH (2,000 USDT) + 2,000 USDT, total value 4,000 USDT
- ETH rises to 4,000 USDT
- Due to x * y = k mechanism, arbitrageurs constantly adjust the pool
- When you withdraw, you get ~0.707 ETH + 2,828 USDT = total value 5,656 USDT
- But if you simply held 1 ETH + 2,000 USDT = 6,000 USDT
- Impermanent Loss = 6,000 - 5,656 = 344 USDT (about 5.7%)
Warning
The greater the price volatility, the greater the impermanent loss. Stablecoin pairs (like USDT/USDC) have minimal impermanent loss.
How to Reduce Impermanent Loss?
- Choose highly correlated pairs: e.g., ETH/stETH, USDT/USDC
- Provide short-term: Participate when prices are relatively stable
- Calculate returns: Ensure fee income exceeds impermanent loss
- Use Curve: Specialized for stablecoin swaps, extremely low impermanent loss
Summary
AMM is one of DeFi's core innovations, achieving through simple mathematical formulas:
- Decentralized Trading: Buy and sell tokens without intermediaries
- Open Participation: Anyone can provide liquidity
- Continuous Liquidity: Trade anytime
But also note:
- ⚠️ Large trades have slippage
- ⚠️ Providing liquidity has impermanent loss risk
- ⚠️ Gas fees can be very high
For beginners, start by making small trades on AMM platforms to get experience. After understanding the risks, then consider providing liquidity for yields.
Want to start using DEX? First buy tokens from a centralized exchange and transfer to your wallet:
| Exchange | Features | Discount | |
|---|---|---|---|
| World's largest exchange、Most trading pairs | 20% fee discount | ||
| Strong derivatives、Web3 wallet integration | 20% fee discount | ||
| Best for futures、Copy trading | 20% fee discount | ||
| Free trading bots、Grid trading | Free trading bots | ||
| P2P lending market、Zero trading fees | Zero trading fees | ||
| Copy trading leader、100K+ traders | Copy trading fee discount | ||
| Zero-fee USD wire transfer、Solana ecosystem integration | Zero-fee USD wire transfer |
Further Reading
Continue Reading
What is DeFi? Beginner's Guide to Decentralized Finance
Learn the basics of DeFi, common applications, and how to safely participate in the DeFi ecosystem
What is a Smart Contract? Explained with Real-Life Examples
Smart contracts are like vending machines—insert money, get your product automatically, no cashier needed. Learn how smart contracts work, their applications in crypto, and the risks you should know.

