#Definition
An Automated Market Maker (AMM) is a smart contract or algorithm that provides liquidity to a market using mathematical formulas rather than a traditional order book. Instead of matching buyers with sellers, AMMs allow traders to buy from or sell to a liquidity pool, with prices determined by the ratio of assets in that pool.
In prediction markets, AMMs enable trading even when no other human is willing to take the opposite side of a bet. The algorithm always offers a price; it just adjusts that price based on supply and demand.
#Why It Matters in Prediction Markets
AMMs solve the critical "chicken and egg" problem of market liquidity: traders won't participate in markets without liquidity, but liquidity requires traders. By guaranteeing that trades can always execute, AMMs bootstrap new markets that would otherwise remain illiquid.
Always-on liquidity
Traditional order book markets can have gaps where no one is willing to trade. AMMs eliminate this; there's always a price, even if that price moves significantly for large orders.
Permissionless market creation
Platforms like Polymarket use AMMs to launch hundreds of markets without needing dedicated market makers for each one. Anyone can create a market; the AMM provides instant liquidity.
Transparent pricing
AMM prices follow deterministic formulas. Traders can calculate exactly how much a given trade will cost before executing, including the price impact of their own order.
Capital efficiency trade-offs
AMMs require capital locked in pools to function. This capital earns fees but faces risks. Understanding AMM mechanics helps traders assess whether providing liquidity (or simply trading against pools) makes sense.
#How It Works
#The Basic Mechanism
AMMs maintain pools of two assets. In prediction markets, this typically means:
- Pool of "Yes" tokens
- Pool of "No" tokens (or the settlement currency like USDC)
The AMM uses a formula to determine prices based on pool balances. When you buy Yes tokens, you add the payment currency to the pool and remove Yes tokens, changing the ratio and thus the price.
#Constant Product Formula (Simplified)
The most common AMM formula is the constant product market maker (CPMM).
The Core Idea: The pool must always maintain a balance where the product (multiplication) of the two asset quantities remains constant.
x × y = k
How it sets the price:
If you want to buy Yes tokens, you take them out of the pool. To keep k constant, you must put more No tokens (or cash) into the pool.
- As Yes tokens become scarcer (supply drops), the formula requires you to pay more for them.
- This automatically raises the price as demand increases.
#Constant Product Curve Visual
Example calculation:
A pool contains 1,000 Yes tokens and 1,000 USDC (k = 1,000,000).
A trader wants to buy 100 Yes tokens:
New Yes tokens = 1,000 - 100 = 900
Required USDC to maintain k: 900 × y = 1,000,000
y = 1,111.11 USDC
USDC added = 1,111.11 - 1,000 = 111.11 USDC
The trader pays 111.11 USDC for 100 Yes tokens, an effective price of 1.00 due to slippage.
#Price Impact and Slippage
AMM prices move with every trade. Larger trades relative to pool size cause more price movement:
| Trade Size (% of pool) | Approximate Slippage |
|---|---|
| 1% | ~1% |
| 5% | ~5% |
| 10% | ~11% |
| 25% | ~33% |
This built-in slippage protects the pool from being drained at favorable prices but increases costs for large traders.
Key Takeaway: AMMs provide infinite liquidity (you can always trade), but the price gets exponentially worse as your order size increases relative to the pool.
#Liquidity Provision
AMMs need capital to function. Liquidity providers (LPs) deposit assets into pools and earn fees from trades. In return, they face:
- Fee income: Typically 0.1-1% of each trade
- Impermanent loss: If prices move significantly, LPs may end up with less value than simply holding the assets
- Resolution risk: In prediction markets, one outcome token becomes worthless, so LPs holding that token lose that portion
#Prediction Market Adaptations
Standard AMM formulas designed for token swaps don't perfectly fit prediction markets. Platforms use variations:
Logarithmic Market Scoring Rule (LMSR): Designed specifically for prediction markets, LMSR maintains consistent liquidity regardless of probability and handles the constraint that Yes + No must equal the payout.
Constant Product with Fees: Modified constant product formulas with fees that adjust for prediction market characteristics.
Hybrid Systems: Some platforms use AMMs for initial liquidity but transition to order books as markets mature.
#History of AMMs in Prediction Markets
The evolution of AMMs is deeply tied to prediction market research:
- LMSR (2002): Robin Hanson invented the Logarithmic Market Scoring Rule (LMSR). It was the gold standard for academic prediction markets, allowing a market maker to subsidize liquidity with a bounded loss. However, it was computationally heavy for early blockchains.
- Uniswap & CPMM (2018): The crypto boom popularized the Constant Product Market Maker (CPMM). While designed for token swaps, its simplicity made it easy to deploy for prediction markets, despite not being perfectly optimized for binary outcomes (capital inefficiency).
- Fixed Product Market Maker (FPMM): Gnosis and Polymarket adapted CPMM specifically for binary tokens, creating the Fixed Product Market Maker. This allowed for simpler tokenization of "Yes" and "No" positions.
- Hybrid Models (2022+): Modern platforms are moving towards hybrid models (like "clob-amm") that combine the passive liquidity of AMMs with the price precision of Limit Order Books.
#Robin Hanson's LMSR: The Academic Foundation
Robin Hanson's Logarithmic Market Scoring Rule deserves special attention as the theoretical foundation for prediction market AMMs:
Key LMSR Properties:
- Bounded loss: The market maker's maximum loss is predetermined and finite
- Path independence: The final state depends only on quantities held, not the order of trades
- Consistent pricing: Prices always sum to 1 across all outcomes
LMSR Cost Function: C(q) = b × ln(Σ exp(qi/b))
Where:
- q = vector of outcome quantities
- b = liquidity parameter (controls price sensitivity)
#Why CPMMs Aren't Ideal for Binary Outcomes
Standard Constant Product Market Makers face specific challenges in prediction markets:
| Issue | Description | Impact |
|---|---|---|
| Capital inefficiency | Liquidity spread across full price range | Much capital unused at probability extremes |
| Resolution asymmetry | One token goes to 1 | Severe impermanent loss guaranteed |
| Sum != 1 enforcement | No native mechanism ensuring YES + NO = $1 | Requires external arbitrage to maintain |
| Extreme price behavior | Formula breaks down near 0% and 100% | Unreasonable prices at probability tails |
These limitations led to the development of specialized adaptations like Gnosis's Fixed Product Market Maker and ultimately to hybrid CLOB systems like Polymarket now uses.
#Examples
#Example 1: New Market Bootstrap
A platform launches a market on whether a bill will pass Congress. No professional market makers are interested in this niche question.
The AMM seeds the market with $5,000 of liquidity. Early traders can immediately buy Yes or No positions. As volume grows, the market may attract additional liquidity providers or transition to order book trading.
#Example 2: Price Discovery Through Trading
An AMM pool starts at 50/50 (equal Yes and No tokens). A trader with strong conviction buys $500 of Yes tokens, moving the price to 55%. Another trader sees this as overpriced and sells, pushing back to 52%. Through repeated trades, the price settles around the market's consensus probability.
#Example 3: Liquidity Provider Returns
An LP deposits $1,000 into a binary market pool, receiving LP tokens representing their share. Over the market's lifetime:
- Trading generates $50 in fees (5% return)
- The outcome resolves Yes; the LP's share of No tokens becomes worthless
- Net return depends on how much of the pool was in No tokens at resolution
#Example 4: Large Trade Slippage
A trader wants to bet 20,000 in total liquidity. Using an AMM:
- First 0.50 to $0.55
- Next 0.61
- By the final 0.78
- Average execution price: approximately 0.50
The trader pays a 30% premium due to slippage, illustrating why AMM trading is expensive in thin pools.
#Risks, Pitfalls, and Misunderstandings
Underestimating slippage
AMM slippage can be severe in small pools. Always check price impact before trading. A market showing 60% probability might fill a large order at an effective 75% due to slippage.
Impermanent loss for LPs
Liquidity providers often underestimate impermanent loss. In prediction markets, this is especially acute because resolution guarantees extreme price movement to either 1.
Confusing displayed price with execution price
The AMM's current price assumes zero trade size. Your actual execution price will be worse, increasingly so for larger trades. Check the post-trade price, not the pre-trade display.
Assuming AMMs equal fair prices
AMM prices reflect trading activity, not necessarily accurate probabilities. A market with little activity may show stale prices that don't incorporate recent information.
Ignoring pool composition at resolution
When a prediction market resolves, the winning token is worth 0. LPs holding pool shares must understand they'll receive a mix of (valuable) winning and (worthless) losing tokens.
#Practical Tips for Traders
-
Check pool depth before trading: Calculate your expected slippage. If a 1,000 pool costs 10% extra, that's a significant hidden fee
-
Split large orders: Instead of one large trade, execute several smaller trades over time. This reduces slippage if the pool receives deposits between your trades
-
Compare AMM to order book prices: Some markets have both AMM pools and order books. The order book may offer better execution for specific sizes
-
Understand LP economics before providing liquidity: Prediction market LP positions face certain loss on one token at resolution. Calculate whether expected fee income exceeds this guaranteed impermanent loss
-
Use AMM price impact to gauge liquidity: High slippage on moderate trades signals thin liquidity. This affects not just entry but also your ability to exit
-
Monitor pool ratios for information: Significant pool imbalances indicate trading activity that may reflect informed opinions. AMM pool ratios are public information on blockchain-based platforms
#Related Terms
- Liquidity
- Order Book
- Slippage
- Polymarket
- Market Maker
- Liquidity Pool
- Prediction Market
- Bonding Curve
#FAQ
#How is an AMM different from an order book?
An order book matches specific buyers with specific sellers at agreed prices. An AMM uses a mathematical formula to price trades against a liquidity pool; there's no counterparty matching. Order books can offer better prices for patient traders using limit orders; AMMs guarantee execution but at prices determined by the formula and pool state.
#Can I make money providing liquidity to prediction market AMMs?
Possibly, but it's risky. LPs earn trading fees but face impermanent loss when prices move. In prediction markets, resolution guarantees extreme price movement (to 1 for binary markets), often causing significant losses for LPs. Profitable LP positions typically require high trading volume generating fees that exceed resolution losses.
#Why do prediction markets use AMMs instead of traditional market makers?
AMMs enable permissionless, always-on liquidity without human market makers. This allows platforms to offer hundreds of niche markets that wouldn't attract professional market makers. AMMs also work 24/7, operate transparently on-chain, and don't require trust in a centralized market maker.
#What is slippage and why does it matter for AMMs?
Slippage is the difference between the expected price and the actual execution price. AMMs inherently produce slippage because each unit purchased changes the pool ratio and thus the price. Larger trades cause more slippage. A trade expecting 0.55 average price if the trade is large relative to pool size.
#Do all prediction markets use AMMs?
No. Kalshi uses a traditional order book. Polymarket historically used AMMs but has moved toward hybrid systems. Some platforms use AMMs for initial liquidity then transition markets to order books as volume grows. Each approach has trade-offs between guaranteed liquidity (AMMs) and potential for better prices (order books).