AMM
An Automated Market Maker (AMM) is a type of decentralized exchange protocol that relies on a mathematical formula to price assets instead of using a traditional order book. In an AMM, assets are pooled into smart contracts, known as liquidity pools, where traders interact with the pool rather than a counterparty. This infrastructure enables continuous liquidity and automated trade execution, removing the need for intermediaries such as market makers or centralized exchanges in the pricing and settlement process.Definition
An Automated Market Maker (AMM) is a type of decentralized exchange protocol that relies on a mathematical formula to price assets instead of using a traditional order book. In an AMM, assets are pooled into smart contracts, known as liquidity pools, where traders interact with the pool rather than a counterparty. This infrastructure enables continuous liquidity and automated trade execution, removing the need for intermediaries such as market makers or centralized exchanges in the pricing and settlement process.Simple explanation
Think of an AMM like a vending machine that always has items in stock. Instead of waiting for someone else to agree to buy or sell at your price, you simply trade with the machine. It uses a special math formula to decide the price based on how many items are left, ensuring you can always complete your trade instantly.Why it matters
AMMs are the foundational building blocks of DeFi, allowing decentralized trading to function without centralized authorities. They enable users to swap tokens permissionlessly and ensure that liquidity is always accessible for various assets.How it works
Liquidity providers deposit pairs of tokens into a smart contract vault based on a constant product formula, such as x*y=k. When a trader swaps token A for token B, the contract adjusts the ratio of tokens in the pool, which automatically shifts the price based on the trade size. Arbitrageurs then trade against these pools to keep the price aligned with global market rates.Real-world example
Uniswap V2, which uses the constant product formula to facilitate billions in decentralized token swaps.Advantages
- Continuous liquidity availability
- Permissionless trading access
- Automated price discovery
Limitations
- Risk of impermanent loss
- High slippage during large trades
- Vulnerable to sandwich attacks
Common misconceptions
- Many believe AMMs require a centralized entity to set prices.
- Some think liquidity providers are guaranteed a profit regardless of market conditions.
Related knowledge
- Constant Product Formula — term
- DEX — term
- Liquidity Pool — term
- Slippage — term
- Smart Contract — term
- Yield Farming — term
Canonical knowledge ID:
glossary:amm