Chapter 8: Key Takeaways
The Big Picture
Automated market makers (AMMs) solve the fundamental liquidity problem in prediction markets. Without AMMs, most prediction markets would fail because there are not enough traders to maintain continuous two-sided order books. AMMs replace human counterparties with mathematical functions that always stand ready to trade.
Core Concepts
1. AMMs Provide Algorithmic Liquidity
An AMM is a mathematical function that determines the price of every trade. Traders buy from and sell to the algorithm, not to each other. The market operator funds the AMM with a subsidy, and in return, the market always has liquidity. This makes prediction markets viable for niche questions with limited participants.
2. LMSR: The Foundation of Prediction Market AMMs
The Logarithmic Market Scoring Rule (LMSR) is the gold standard for prediction market AMMs. Its cost function $C(\mathbf{q}) = b \cdot \ln(\sum e^{q_i/b})$ produces prices via the softmax function, guarantees prices sum to 1, supports any number of outcomes, and has a bounded maximum loss of $b \cdot \ln(n)$.
3. CPMM: The DeFi Alternative
The Constant Product Market Maker uses the $x \cdot y = k$ invariant. It is simpler and familiar from decentralized finance (Uniswap), but has unbounded loss, limited reserves, and less natural multi-outcome support compared to LMSR.
4. LS-LMSR: Adaptive Liquidity
The Liquidity-Sensitive LMSR makes the liquidity parameter $b$ grow with trading volume. Early trades are responsive (low $b$); later trades are stable (high $b$). This avoids the problem of choosing a fixed $b$ that is either too small or too large.
5. The Liquidity Parameter $b$ Is the Key Design Choice
In LMSR, $b$ controls everything: price sensitivity, bid-ask spread, and maximum subsidy cost. Choose $b$ based on expected trading volume, acceptable subsidy, and desired price responsiveness. A useful rule of thumb: $b \approx \text{expected volume} / 10$.
6. Valid Cost Functions Must Satisfy Key Properties
Any AMM cost function must be convex (prices increase as you buy), path-independent (order of trades does not matter), arbitrage-free (prices sum to 1), and translationally invariant (only relative demand matters). These properties ensure fair and consistent pricing.
7. Slippage Is the Cost of Moving Prices
The effective price you pay is always worse than the quoted price because the price moves against you during your trade. Larger trades incur more slippage. This is a feature that prevents cheap price manipulation.
8. The AMM Subsidy Is the Cost of Information
The market operator's maximum loss is the price of gathering probability estimates from the crowd. For LMSR, this is $b \cdot \ln(n)$ --- often far cheaper than hiring expert forecasters or running surveys. In practice, actual losses are typically 30-60% of the theoretical maximum.
Practical Guidelines
| If you need to... | Then... |
|---|---|
| Choose an AMM mechanism | Use LMSR for budget predictability, CPMM for simplicity in DeFi, LS-LMSR for adaptive behavior |
| Set the liquidity parameter $b$ | Start with $b \approx \text{expected volume} / 10$; verify it fits your subsidy budget ($b \cdot \ln(n)$) |
| Estimate AMM subsidy cost | Maximum loss = $b \cdot \ln(n)$; expected loss is roughly 30-60% of this |
| Minimize slippage on a large trade | Know that splitting trades does not reduce slippage in LMSR (path independence) but may help in other mechanisms |
| Handle multiple outcomes | Use LMSR with $n$ outcomes; prices automatically normalize to sum to 1 |
| Prevent price manipulation | Increase $b$ (makes manipulation more expensive); manipulation cost scales linearly with $b$ |
| Decide between AMM and order book | Use AMM for thin markets and many simultaneous questions; use CLOB for high-volume markets with active traders |
Common Pitfalls to Avoid
-
Setting $b$ too low. The market becomes so volatile that a single trade can swing the price by 20+ percentage points, making the market feel unreliable and discouraging participation.
-
Setting $b$ too high. The market barely responds to trades, making it feel unresponsive. You also over-commit subsidy capital. A trade of 10 shares should produce a visible price change.
-
Ignoring multi-outcome budget scaling. Maximum loss grows as $\ln(n)$, so a 10-outcome market costs $\ln(10)/\ln(2) \approx 3.3$ times as much as a 2-outcome market for the same $b$.
-
Expecting the AMM to profit. AMMs are designed as a service, not a profit center. The subsidy is the cost of providing liquidity and gathering information. In exceptional cases the AMM may break even or profit, but this should not be expected.
-
Using CPMM without understanding reserve limits. Unlike LMSR, a CPMM cannot sell more shares than it has in its reserve pool. Large traders can exhaust liquidity.
-
Forgetting numerical stability. Implementing LMSR without the log-sum-exp trick leads to overflow errors when quantities are large relative to $b$. Always use numerically stable implementations.
Key Equations to Remember
| What | Formula | When to Use |
|---|---|---|
| LMSR cost function | $C = b \cdot \ln(\sum e^{q_i/b})$ | Computing trade costs |
| LMSR price | $p_i = e^{q_i/b} / \sum e^{q_j/b}$ | Reading current probabilities |
| LMSR max loss | $b \cdot \ln(n)$ | Budgeting subsidy costs |
| Trade cost | $C_{\text{after}} - C_{\text{before}}$ | Pricing any trade |
| CPMM invariant | $x \cdot y = k$ | CPMM price calculations |
| CPMM price | $p_A = y / (x + y)$ | Reading CPMM probabilities |
| Price impact (approx.) | $\Delta p \approx \Delta / (4b)$ | Quick estimate near 50/50 |
| Shares to reach target price | $\Delta q = b \cdot [\text{logit}(p_{\text{target}}) - \text{logit}(p_{\text{current}})]$ | Planning large trades |
Connections to Other Chapters
- Chapter 4 (Scoring Rules): LMSR is built on proper scoring rules. The connection between scoring traders and pricing shares is the theoretical foundation of Hanson's invention.
- Chapter 7 (Order Books): AMMs and order books are the two fundamental approaches to market microstructure. Understanding both is essential for designing effective prediction markets.
- Chapter 9 (Order Books and Matching Engines): Dives deeper into the CLOB alternative and explores hybrid AMM/CLOB designs.
- Chapter 12 (Trading Strategies): Knowing how the AMM prices trades is essential for developing profitable trading strategies. Slippage calculations and price impact analysis from this chapter directly inform strategy design.