Automated Market Maker (AMM): Definition, Types, and How They Work
Definition
An automated market maker (AMM) is a smart contract-based protocol that uses mathematical formulas to price assets and facilitate trades without relying on a traditional order book. Instead of matching individual buy and sell orders, AMMs allow traders to swap tokens against a liquidity pool — a reserve of assets contributed by liquidity providers — with prices determined algorithmically based on the pool’s composition.
AMMs are the pricing engine behind most decentralised exchanges, enabling permissionless, 24/7 trading without centralised intermediaries.
How AMMs Work
The Constant Product Formula
The most widely used AMM model is the constant product market maker, popularised by Uniswap. The formula is:
x * y = k
Where:
- x = the quantity of token A in the pool
- y = the quantity of token B in the pool
- k = a constant that remains unchanged during trading
When a trader buys token A from the pool, they deposit token B. The smart contract ensures that the product of the two token quantities remains constant (adjusted for fees), which naturally determines the exchange rate.
Price Determination
The price of token A in terms of token B is determined by the ratio of the two tokens in the pool:
Price of A = y / x
As traders buy token A (removing it from the pool), its scarcity within the pool increases and its price rises. Conversely, token B becomes more abundant and its price falls. This self-adjusting mechanism creates a continuous pricing function without any external input.
Trade Execution
When executing a trade, the AMM:
- Receives the input token from the trader
- Calculates the output amount using the bonding curve formula
- Deducts a fee (typically 0.3%)
- Transfers the output token to the trader
- Updates the pool’s reserves
The entire process is atomic — it either completes fully or fails entirely, with no partial fills or pending orders.
Types of AMMs
Constant Product (x * y = k)
The original and most common model. Capital-inefficient because liquidity is spread across the entire price range from zero to infinity, but robust and simple. Best suited for volatile asset pairs where the price range is unpredictable.
Constant Sum (x + y = k)
A hypothetical model where the price remains fixed regardless of trade size. Not used in practice because it would allow the pool to be completely drained of one asset once the price diverges from the fixed rate.
Stableswap (Hybrid)
Curve Finance pioneered a hybrid formula that behaves like a constant sum model near the expected price and like a constant product model further away. This provides extremely low slippage for correlated asset pairs (such as stablecoin-to-stablecoin swaps) while maintaining solvency during price divergence.
Concentrated Liquidity
Uniswap V3 introduced concentrated liquidity, allowing liquidity providers to specify a price range within which their capital is active. This dramatically improves capital efficiency — LPs earn more fees per unit of capital deployed — but requires active management as the market price moves.
Proactive Market Making
Next-generation AMM designs incorporate dynamic fee adjustment, oracle-informed pricing, and automated rebalancing to reduce losses for liquidity providers and improve trading efficiency. These designs aim to address the fundamental tension between market maker profitability and trader execution quality.
Virtual AMMs
Some perpetual swap platforms use virtual AMMs that simulate AMM mechanics without requiring actual liquidity pool deposits. The virtual AMM calculates prices using the constant product formula but settles trades through a separate margin system.
AMM vs Order Book
| Feature | AMM | Order Book |
|---|---|---|
| Liquidity source | Pooled reserves | Individual orders |
| Price discovery | Algorithmic | Market-driven |
| Capital efficiency | Variable (low to high) | High |
| Accessibility | Permissionless | Often permissioned |
| Infrastructure | Smart contracts | Matching engines |
| Trading hours | 24/7, no downtime | May have limits |
| Market making | Anyone can provide | Specialist firms |
| Slippage | Predictable, size-dependent | Variable, depth-dependent |
Both models have strengths. AMMs excel at providing always-available, permissionless liquidity for a wide range of assets. Order books excel at capital-efficient price discovery for high-volume assets. Many institutional trading strategies utilise both, routing orders to the venue offering the best execution.
AMM Fees
Trading Fees
AMMs charge fees on every swap, typically ranging from 0.01% to 1% depending on the pool and the volatility of the assets. These fees are distributed to liquidity providers as compensation for the capital they have deployed and the risks they bear — primarily impermanent loss.
Fee Tiers
Modern AMMs offer multiple fee tiers for the same asset pair, allowing the market to determine the appropriate fee level:
- Low fees (0.01% – 0.05%) — Suitable for stable asset pairs with minimal impermanent loss risk
- Medium fees (0.3%) — The standard tier for most asset pairs
- High fees (1%) — For exotic or highly volatile asset pairs where LPs require greater compensation
Protocol Fees
Some AMM protocols divert a portion of trading fees to the protocol treasury or governance token holders. This protocol fee is separate from LP fees and funds ongoing development, governance, and ecosystem growth.
Advantages of AMMs
Permissionless liquidity — Anyone can provide liquidity or create new trading pairs without requiring exchange listing or market maker agreements.
Always-on trading — AMMs operate 24/7 without downtime, circuit breakers, or trading halts.
Transparency — All pool reserves, trades, and fee distributions are recorded on-chain and publicly verifiable.
Composability — AMM liquidity can be integrated into other DeFi protocols, creating layered financial applications.
No counterparty risk — Trades execute against a smart contract rather than a centralised entity, eliminating exchange counterparty risk (though smart contract risk applies).
Limitations of AMMs
Impermanent loss — Liquidity providers face losses when asset prices diverge from their levels at the time of deposit, as detailed in the liquidity pool entry.
Capital inefficiency — Basic AMM designs distribute liquidity across the entire price range, meaning most capital sits idle. Concentrated liquidity models address this but add complexity.
Slippage — Large trades relative to pool size experience significant slippage, making AMMs less suitable for large institutional orders.
MEV exposure — AMM trades are visible in the public mempool before execution, exposing traders to front-running and sandwich attacks by MEV extractors.
Smart contract risk — All pooled assets are at risk if the AMM smart contract contains vulnerabilities.
AMMs in the Swiss Market
Swiss institutional participation in AMM-based trading is growing, driven by the maturation of DeFi infrastructure and the development of institutional access tools. Custody providers supporting smart contract interaction, compliance tools monitoring DeFi transactions, and the evolving regulatory framework are collectively enabling institutional AMM participation.
For Swiss OTC desks and trading firms, AMM liquidity represents an additional source that can be incorporated into execution strategies, particularly for DeFi-native tokens where AMM pools provide the deepest available liquidity.
Donovan Vanderbilt is a contributing editor at ZUG TRADING, a digital asset trading and exchanges intelligence publication by The Vanderbilt Portfolio AG, Zurich. His analysis covers institutional market structure, OTC liquidity, and regulatory developments across Swiss and global digital asset markets.