Chapter 8 Quiz: Automated Market Makers
Test your understanding of automated market makers, cost functions, and liquidity parameters. Each question has one best answer. Try to answer before revealing the solution.
Question 1
What is the primary problem that automated market makers solve in prediction markets?
- A) They prevent insider trading
- B) They guarantee that markets resolve correctly
- C) They provide liquidity when there are not enough traders to match orders
- D) They calculate the true probability of events
Answer
**C) They provide liquidity when there are not enough traders to match orders.** AMMs solve the thin market problem. Prediction markets often lack enough active traders to maintain continuous two-sided liquidity. An AMM acts as an always-available counterparty, using a mathematical cost function to set prices, so that any trader can buy or sell at any time without waiting for a matching order.Question 2
In the LMSR cost function $C(\mathbf{q}) = b \cdot \ln\left(\sum_{i} e^{q_i/b}\right)$, what does $b$ represent?
- A) The number of outcomes
- B) The maximum loss the AMM can sustain
- C) The liquidity parameter controlling price sensitivity
- D) The total number of shares that can be sold
Answer
**C) The liquidity parameter controlling price sensitivity.** $b$ is the liquidity parameter. A larger $b$ means more liquidity --- prices move less per trade, the bid-ask spread is tighter, but the maximum possible loss ($b \cdot \ln(n)$) is higher. A smaller $b$ means prices are more reactive but the subsidy cost is lower.Question 3
For a two-outcome LMSR market with $b = 100$ and initial quantities $q_1 = q_2 = 0$, what are the initial prices?
- A) $p_1 = 0, p_2 = 0$
- B) $p_1 = 0.50, p_2 = 0.50$
- C) $p_1 = 1.00, p_2 = 1.00$
- D) $p_1 = 0.50, p_2 = 0.50$ only if $b = 1$
Answer
**B) $p_1 = 0.50, p_2 = 0.50$.** When all quantities are equal (including all zeros), the softmax formula gives equal probabilities to each outcome: $p_i = e^{0/b} / (n \cdot e^{0/b}) = 1/n$. For two outcomes, this is 0.50 each. This is independent of the value of $b$.Question 4
A trader buys 10 "Yes" shares in an LMSR market. The cost function before the trade is $C_{\text{before}} = 69.31$ and after is $C_{\text{after}} = 74.44$. How much does the trader pay?
- A) $69.31
- B) $74.44
- C) $5.13
- D) $143.75
Answer
**C) $5.13.** The cost of any trade in LMSR is the difference in the cost function values: $C_{\text{after}} - C_{\text{before}} = 74.44 - 69.31 = 5.13$. The cost function acts as a potential function, and the trade cost is the change in potential.Question 5
What is the maximum possible loss for an LMSR market maker with $b = 200$ and 4 outcomes?
- A) $200
- B) $200 \cdot \ln(4) \approx \$277.26$
- C) $200 \cdot 4 = \$800$
- D) The loss is unbounded
Answer
**B) $200 \cdot \ln(4) \approx \$277.26$.** The maximum loss for LMSR is $b \cdot \ln(n)$, where $n$ is the number of outcomes. With $b = 200$ and $n = 4$: $200 \cdot \ln(4) = 200 \cdot 1.3863 \approx 277.26$. This bounded loss property is one of LMSR's key advantages.Question 6
In a CPMM with the invariant $x \cdot y = k$, what happens when a trader buys "Yes" shares?
- A) Both $x$ and $y$ increase
- B) $x$ decreases, $y$ increases, and $k$ stays constant
- C) $x$ increases, $y$ decreases, and $k$ stays constant
- D) $k$ increases while $x$ and $y$ adjust
Answer
**B) $x$ decreases, $y$ increases, and $k$ stays constant.** When a trader buys "Yes" shares, they remove Yes shares from the reserve ($x$ decreases) and deposit No shares or base currency ($y$ increases). The key constraint is that the product $x \cdot y = k$ must remain constant. This is the defining property of a constant product market maker.Question 7
A CPMM has reserves $x = 80, y = 125$. What is the price of outcome A (the $x$ asset)?
- A) $80 / 125 = 0.64$
- B) $125 / (80 + 125) = 0.610$
- C) $80 / (80 + 125) = 0.390$
- D) $80 \cdot 125 = 10{,}000$
Answer
**B) $125 / (80 + 125) = 0.610$.** In a CPMM adapted for prediction markets, the price of asset A is $p_A = y / (x + y) = 125 / 205 \approx 0.610$. The price is inversely related to the reserve: when A is scarce (low $x$), its price is high. Conversely, $p_B = x / (x + y) = 80 / 205 \approx 0.390$.Question 8
Which AMM property ensures that the order of trades does not affect the total cost to reach a given market state?
- A) Convexity
- B) Translational invariance
- C) Path independence
- D) Bounded loss
Answer
**C) Path independence.** Path independence means that the total cost to go from state $\mathbf{q}_0$ to state $\mathbf{q}_f$ is always $C(\mathbf{q}_f) - C(\mathbf{q}_0)$, regardless of what intermediate trades occurred. This prevents strategic manipulation through trade ordering and ensures fairness.Question 9
What does translational invariance mean for an LMSR market?
- A) Moving the market to a different platform does not change prices
- B) Adding the same constant to all quantity elements does not change prices
- C) Prices are the same regardless of the value of $b$
- D) The cost function is the same in all currencies
Answer
**B) Adding the same constant to all quantity elements does not change prices.** If every trader buys one share of every outcome, prices should not change because this trade carries no information about which outcome is more likely. Mathematically, $\text{prices}(q_1 + c, \ldots, q_n + c) = \text{prices}(q_1, \ldots, q_n)$ for any constant $c$. Only relative differences in quantities matter.Question 10
In an LMSR market with $b = 100$, approximately how many shares of "Yes" must you buy (starting from 50/50) to move the price to about 73%?
- A) About 25 shares
- B) About 50 shares
- C) About 100 shares
- D) About 200 shares
Answer
**C) About 100 shares.** A useful rule of thumb is that buying $b$ shares starting from 50/50 moves the price to about 73.1%. This is because $e^{1} / (e^{1} + 1) \approx 0.731$. So for $b = 100$, buying 100 shares moves the price from 50% to approximately 73%.Question 11
What is "slippage" in the context of AMM trading?
- A) The delay between placing a trade and its execution
- B) The difference between the quoted price and the effective average price paid
- C) The fee charged by the market operator
- D) The loss of precision due to floating-point arithmetic
Answer
**B) The difference between the quoted price and the effective average price paid.** Slippage is the extra cost beyond what you would pay at the current quoted (instantaneous) price. It occurs because the price changes *during* your trade --- as you buy more shares, the price rises, so you pay more on average than the initial quote. Larger trades incur more slippage.Question 12
Why does the LS-LMSR modify the standard LMSR?
- A) Standard LMSR has prices that do not sum to 1
- B) Standard LMSR has a fixed liquidity parameter $b$ that cannot adapt to trading volume
- C) Standard LMSR cannot handle more than 2 outcomes
- D) Standard LMSR requires infinite subsidy
Answer
**B) Standard LMSR has a fixed liquidity parameter $b$ that cannot adapt to trading volume.** The LS-LMSR addresses the problem that a fixed $b$ is either too small (volatile prices) or too large (expensive subsidy). LS-LMSR makes $b$ a function of total trading activity: $b(\mathbf{q}) = \alpha \cdot \sum_i q_i$. This allows the market to start responsive (low $b$) and become more stable (high $b$) as trading volume grows.Question 13
Which of the following is NOT a property that a valid AMM cost function must satisfy?
- A) Convexity (buying more shares gets progressively more expensive)
- B) Prices always sum to 1
- C) Constant returns (each additional share costs the same)
- D) Path independence (order of trades does not matter)
Answer
**C) Constant returns (each additional share costs the same).** This is the opposite of what a good AMM does. A valid cost function must be *convex*, meaning each additional share costs *more* than the previous one. Constant returns (linear cost function) would mean no price impact, which defeats the purpose of an AMM. The other three properties (convexity, prices summing to 1, path independence) are all required.Question 14
A CPMM is initialized with reserves $(100, 100)$. A trader buys 50 "Yes" shares. What are the new reserves?
- A) $(50, 200)$
- B) $(50, 150)$
- C) $(150, 66.67)$
- D) $(50, 100)$
Answer
**A) $(50, 200)$.** With $k = 100 \times 100 = 10{,}000$. After removing 50 Yes shares: $x_{\text{new}} = 50$. To maintain $x \cdot y = k$: $50 \cdot y_{\text{new}} = 10{,}000$, so $y_{\text{new}} = 200$. The trader deposited $200 - 100 = 100$ No-share equivalents to buy 50 Yes shares.Question 15
What is the LMSR price function equivalent to in machine learning?
- A) The sigmoid function
- B) The softmax function
- C) The ReLU function
- D) The tanh function
Answer
**B) The softmax function.** The LMSR price for outcome $i$ is $p_i = e^{q_i/b} / \sum_j e^{q_j/b}$, which is exactly the softmax function with the quantities $q_i/b$ as inputs. The softmax converts arbitrary real values into probabilities that sum to 1, which is exactly what we need for market prices. For two outcomes, this reduces to the sigmoid (logistic) function.Question 16
If you double the liquidity parameter $b$ in an LMSR market, what happens to the price impact of a fixed-size trade?
- A) Price impact doubles
- B) Price impact is cut approximately in half
- C) Price impact stays the same
- D) Price impact increases by a factor of $\ln(2)$
Answer
**B) Price impact is cut approximately in half.** The approximate price impact of buying $\Delta$ shares in a two-outcome market near 50/50 is $\Delta / (4b)$. Doubling $b$ halves this impact. Intuitively, a larger $b$ means more liquidity, so it takes more trading to move the price by the same amount.Question 17
A market operator has a budget of $\$100$ for AMM subsidy. For a 3-outcome LMSR market, what is the maximum $b$ they can afford?
- A) $b = 100$
- B) $b \approx 91$ ($100 / \ln(3)$)
- C) $b \approx 33$ ($100 / 3$)
- D) $b \approx 144$ ($100 / \ln(2)$)
Answer
**B) $b \approx 91$ ($100 / \ln(3)$).** Maximum loss is $b \cdot \ln(n)$. Setting this equal to the budget: $b \cdot \ln(3) = 100$, so $b = 100 / \ln(3) = 100 / 1.0986 \approx 91$. Note that this is less than 100, because with 3 outcomes the maximum loss per unit of $b$ is higher than for 2 outcomes.Question 18
In an LMSR market, buying one share of every outcome simultaneously costs:
- A) $0 (they cancel out)
- B) Exactly $1.00
- C) $b \cdot \ln(n)$
- D) It depends on the current state of the market
Answer
**B) Exactly $1.00.** Buying one share of every outcome costs $C(q_1+1, \ldots, q_n+1) - C(q_1, \ldots, q_n) = 1$ for any valid prediction market AMM. This must be true because one of those shares will pay out $1 at resolution and the rest will pay $0 --- so a bundle of one of each outcome is always worth exactly $1. This is a consequence of the no-arbitrage condition.Question 19
Which characteristic is unique to CPMM compared to LMSR?
- A) Prices always sum to 1
- B) There is a hard limit on how many shares can be purchased
- C) The cost function is convex
- D) Prices adjust based on trading
Answer
**B) There is a hard limit on how many shares can be purchased.** In a CPMM, the reserve of each asset must remain positive, so you can never buy more shares than exist in the reserve. LMSR has no such limit --- you can theoretically buy unlimited shares (they just get increasingly expensive). Properties A, C, and D are shared by both mechanisms.Question 20
An LMSR market with $b = 100$ has final quantities $q_{\text{Yes}} = 60, q_{\text{No}} = 40$. If "Yes" wins, approximately how much does the AMM lose?
- A) $\$60$
- B) About $\$50$ (60 shares paid out minus money collected)
- C) Exactly $\$69.31$ (maximum loss)
- D) Cannot be determined without knowing the full trade history
Answer
**B) About $\$50$ (60 shares paid out minus money collected).** The AMM pays out $60 (for the 60 winning Yes shares). The money collected is $C(60, 40) - C(0, 0)$. Computing: $C(60, 40) = 100 \cdot \ln(e^{0.6} + e^{0.4}) \approx 100 \cdot \ln(1.822 + 1.492) \approx 100 \cdot \ln(3.314) \approx 119.85$. $C(0, 0) = 100 \cdot \ln(2) \approx 69.31$. Money collected $\approx 50.54$. Loss $= 60 - 50.54 \approx 9.46$. This is well below the maximum loss of $69.31$. *Note: The actual loss depends on the final state, and can be calculated exactly without knowing the trade history, thanks to path independence.*Question 21
Why might a platform choose LS-LMSR over standard LMSR?
- A) LS-LMSR has lower maximum loss
- B) LS-LMSR automatically adjusts liquidity as trading volume changes
- C) LS-LMSR guarantees the AMM will never lose money
- D) LS-LMSR is simpler to implement
Answer
**B) LS-LMSR automatically adjusts liquidity as trading volume changes.** LS-LMSR makes the liquidity parameter $b$ grow with trading volume, so the market starts responsive (good for price discovery with limited data) and becomes more stable as it matures (appropriate when many traders have contributed information). Standard LMSR requires choosing a fixed $b$ upfront, which is inevitably suboptimal for some phase of the market's life.Question 22
For an LMSR market at state $\mathbf{q} = (50, 50, 50)$ with 3 outcomes and $b = 100$, what are the prices?
- A) $(0.50, 0.50, 0.50)$
- B) $(0.333, 0.333, 0.333)$
- C) $(1.0, 1.0, 1.0)$
- D) Cannot be determined without knowing $b$
Answer
**B) $(0.333, 0.333, 0.333)$ (i.e., $1/3$ each).** By translational invariance, the prices at $(50, 50, 50)$ are the same as at $(0, 0, 0)$. When all quantities are equal, the softmax gives equal weight to each outcome: $p_i = e^{50/100} / (3 \cdot e^{50/100}) = 1/3$ for all $i$. The specific value of the common quantity does not matter.Question 23
What is the "log-sum-exp trick" used in LMSR implementations?
- A) A technique to make the algorithm faster by pre-computing logarithms
- B) Subtracting the maximum value before exponentiating to prevent numerical overflow
- C) Rounding prices to the nearest cent for display purposes
- D) Converting between natural and base-10 logarithms
Answer
**B) Subtracting the maximum value before exponentiating to prevent numerical overflow.** When $q_i / b$ is large, $e^{q_i/b}$ can overflow floating-point representation. The trick is: $\ln(\sum e^{x_i}) = m + \ln(\sum e^{x_i - m})$ where $m = \max(x_i)$. After subtracting $m$, the largest exponent is 0 and all others are negative, preventing overflow while giving the same mathematical result.Question 24
A prediction market platform runs 500 binary markets simultaneously using LMSR with $b = 50$ each. What is the platform's total worst-case subsidy cost?
- A) $\$25{,}000$
- B) $\$17{,}329$ ($500 \times 50 \times \ln(2)$)
- C) $\$50{,}000$
- D) It depends on how many traders participate
Answer
**B) $\$17{,}329$ ($500 \times 50 \times \ln(2)$).** Each binary market has a maximum loss of $b \cdot \ln(2) = 50 \times 0.6931 \approx \$34.66$. With 500 markets: $500 \times 34.66 \approx \$17{,}329$. This bounded loss property allows the platform to budget precisely for its AMM subsidies, which is one of LMSR's most important practical advantages.Question 25
Which statement best describes the relationship between AMM subsidy cost and information value?
- A) Higher subsidies always produce better probability estimates
- B) The subsidy pays for guaranteed liquidity, which enables price discovery --- the value comes from the information revealed through trading
- C) The subsidy is wasted money because the AMM always loses
- D) Subsidies are only necessary for CPMM, not LMSR