Automated Market Makers (AMMs) are foundational to many of decentralized finance’s (DeFi) most widely used protocols and applications. If you have ever traded on platforms like Uniswap or Curve, you have interacted with an AMM. These systems function as decentralized trading pools that enable users to provide liquidity directly to markets when buying or selling cryptocurrencies.
Decentralized exchanges (DEXs) represent the first major sector within crypto to adopt AMMs. Before the emergence of AMM-based DEXs, trading a new token typically required waiting for a centralized exchange (CEX) to list it. The growing adoption of AMM platforms is gradually decentralizing the processes of token issuance and listing. Today, AMMs are often among the first venues where new tokens become available for trading.
AMMs are reshaping market structures that have relied on centralized order books for decades. Evidence suggests that on-chain order book systems currently face disadvantages compared to on-chain AMM mechanisms.
In essence, AMMs are smart contracts that form liquidity pools of tokens—such as ERC-20 tokens on Ethereum or equivalent standards on other blockchains. These are traded algorithmically rather than through an order book. This innovation effectively replaces traditional limit order books with a system where assets are automatically swapped against the pool’s latest price.
How Automated Market Makers Work
The “automated” aspect of an automated market maker refers to the use of algorithmic agents to perform market-making functions and provide liquidity. Smart contracts act as custodians of the funds, and liquidity providers (LPs) receive LP tokens representing their proportional share of a given liquidity pool. These smart contracts hold reserves of various tokens, and trades execute directly against these reserves.
The “market maker” component indicates that AMMs facilitate asset trading. For any exchange to function, underlying assets must be available to execute trades. When a user sells 10 ETH for 30,000 USDC, for example, the exchange must have 30,000 USDC available. In traditional finance, institutions often provide this “market-making” service for specific financial assets.
In DeFi, nearly anyone can create a market by depositing tokens into a smart contract. Users can then trade directly against this contract, which automates pricing, price updates, and portfolio rebalancing.
👉 Explore advanced liquidity strategies
Pricing in AMM Liquidity Pools
AMM liquidity pools determine prices automatically using various mechanisms. The most common is the “constant product market maker” model, also referred to as the “constant function market maker” (CFMM). This model uses a simplified formula: x * y = k, where ‘x’ and ‘y’ represent the reserves of two assets. The term “constant function” indicates that any trade must adjust the reserves so that their product remains equal to a constant ‘k’.
CFMMs establish a relationship between two or more tokens. In a typical two-asset liquidity pool, the smart contract holds reserves of the blockchain’s native token (e.g., ETH on Ethereum, MATIC on Polygon) and a paired altcoin. Native tokens like ETH often serve as bridge currencies since each liquidity pool includes a portion of the native token in trading pairs.
As trades occur, the reserves change, and prices move dynamically along a predefined curve. This ensures the contract always maintains the invariant x * y = k. It is important to note that AMMs do not update prices in response to external market movements. Instead, price changes occur as the reserve ratio within the pool updates after each trade.
Key Participants in AMM Ecosystems
- Liquidity Providers (LPs): These users deposit assets into a smart contract to form a liquidity pool. In return, they receive LP tokens proportional to their share of the total liquidity. These tokens can later be redeemed for the underlying assets.
- Traders (Swappers): Users who submit swap orders to the liquidity pool. The smart contract automatically computes the exchange rate based on the conservation function (e.g., x * y = k) and executes the trade. A small fee is charged, which is distributed to LPs.
- Arbitrageurs: These participants monitor asset prices across multiple CEXs and DEXs. They profit from price discrepancies by executing trades that align prices across platforms, often without assuming significant risk.
- Protocol Teams: The core development groups behind AMM-based DEXs. They guide the decentralized organization, implement upgrades, and expand market-making capabilities.
Understanding AMM-Related Concepts
- Divergence Loss: Also known as impermanent loss, this occurs when the value of deposited assets in a liquidity pool changes compared to simply holding them. LPs are exposed to volatility risk in addition to the opportunity cost of locked funds.
- Slippage: The difference between the expected price of a trade and the price at which it is actually executed. Slippage is influenced by the AMM’s bonding curve design and the size of the trade relative to the pool’s liquidity.
The Evolution of Automated Market Makers
The history of AMMs in the cryptocurrency space includes several key milestones:
- Bancor (2017): Introduced the concept of on-chain AMMs.
- Uniswap (2018): The first AMM to achieve significant trading volumes, catalyzing the AMM wave in DeFi.
- Kyber (2018): Offered private automated liquidity pools.
- Curve (2019): The first AMM optimized for trading between stablecoins and other similarly priced assets.
- Balancer (2020): Enabled customizable token weights between 2–8 assets within a single pool.
- Bancor V2 (2020): Introduced dynamic weights for liquidity pools and single-sided exposure, reducing impermanent loss for LPs.
- Blackholeswap (2020): Enabled transactions exceeding existing liquidity by utilizing lending protocols like Compound.
AMMs vs. Centralized Exchanges (CEXs)
If you have used a centralized exchange with an order book, you are familiar with how they operate. CEXs compile buy and sell orders into an order book. These are typically limit orders placed by makers and executed by takers.
In contrast, AMMs offer several advantages:
- Decentralization: No central authority controls the funds or the trading process.
- Automation: Trades are executed algorithmically without manual intervention.
- Continuous Liquidity: Liquidity is always available as long as the pool has reserves.
Despite the rapid growth of AMMs, the majority of trading volume still occurs on centralized exchanges like Binance and Coinbase. However, AMMs continue to gain market share and innovate.
Examples of AMMs on Various Blockchains
- Raydium (Solana)
- PancakeSwap (Binance Smart Chain)
- Pangolin (Avalanche)
- QuickSwap (Polygon)
- SpookySwap (Fantom)
- Serum (Solana)
Each Uniswap pool, for instance, acts as an individual AMM, bringing together liquidity providers and traders in a decentralized manner.
👉 Discover real-time trading tools
Frequently Asked Questions
What is an Automated Market Maker (AMM)?
An AMM is a decentralized protocol that uses algorithmic formulas to provide liquidity and determine prices for token swaps. It replaces traditional order books with liquidity pools funded by users.
How do AMMs determine asset prices?
Most AMMs use a mathematical constant function, such as x * y = k, where x and y are the reserves of two tokens in a pool. The product of these reserves remains constant, and prices adjust as trades alter the reserve ratios.
What is impermanent loss?
Impermanent loss refers to the temporary loss experienced by liquidity providers when the value of assets in the pool diverges from simply holding those assets. It may become permanent if assets are withdrawn during imbalance.
Can anyone become a liquidity provider in an AMM?
Yes, anyone can deposit assets into a compatible liquidity pool and become an LP. In return, they receive fees generated from trades occurring in that pool.
Are AMMs safe to use?
While AMM smart contracts are generally audited, risks include smart contract vulnerabilities, impermanent loss, and slippage. Users should research each protocol and understand the risks involved.
Do AMMs completely replace centralized exchanges?
Not yet. While AMMs offer decentralization and permissionless access, CEXs still dominate in terms of liquidity, user experience, and trading volume for many assets.