LMSR (Logarithmic Market Scoring Rule)
The most popular prediction markets today use order books and continuous double auctions because they allow venues to externalize risk, but these markets have several known limitations
Delphi runs a fully on‑chain automated market maker (AMM) for prediction markets, using the Logarithmic Market Scoring Rule (LMSR). Unlike other prediction markets based on order books, LMSR guarantees continuous liquidity: you can always buy or sell shares of an outcome without waiting for a counterparty. Prices update smoothly from the very first trade through final settlement, with a fully transparent on‑chain pricing mechanism.
The TL;DR
The most popular prediction markets today use order books and continuous double auctions because they allow venues to externalize risk, but these markets have several known limitations (e.g., incoherent probabilities and murky incentives). The original LMSR mechanism was proposed by Robin Hanson as a way to fill these gaps by running prediction markets using a cost function. Delphi provides one of the only live implementations of LMSR at scale, and uses it for a live market on which model will win ML competitions.
In Delphi’s prediction markets the shares of each model corresponds to a straightforward claim: “Model i wins the competition.”
When the market settles and a winning model is determined, each of its shares pay 1 token per share; all other models’ shares pay 0 tokens. Prices are always defined in LMSR; in fact, they live between 0 and 1 and behave like probabilities.
What you can do on Delphi
- Back a model you believe in. Buy its token if you think it’s underrated.
- Change your mind anytime. Sell your position before results if new evidence emerges.
- Read the crowd. Watch prices (odds) update as scores, benchmarks, and discussion move beliefs.
- No need for a counterparty. An automated market maker (AMM) always stands ready to quote and fill orders.
- Collect a simple payout. After evaluation, each winning share pays 1; losing shares pay 0.
The protocol charges a small trading fee that helps keep the market liquid and safe by funding a pool that compensates and rewards the market maker.
The next sections explain, at a high level and then with formulas, how the LMSR mechanism works and how Delphi implements it.
LMSR Fundamentals
As is the the case with Delphi’s markets, consider a finite set of mutually exclusive outcomes: “Model 1 wins,” “Model 2 wins,” …, “Model n wins.” (Note: Exactly one of these will be true at settlement.)
Cost Function
LMSR keeps track of a vector of outstanding shares \(q \in \mathbb{R}^n\), where \(q_i\) is the total number of shares for the claim "Model \(i\) wins" held by all traders.
Instead of an order book, prices are derived from a single convex cost function:
\[ C(q)=b \cdot \log \left(\sum_{i=1}^n e^{q_i / b}\right), \]
where \(b>0\) is the liquidity (depth) parameter.
Prices as Probabilities
The instantaneous price of outcome i is the partial derivative of cost function C:
\[ p_i(q)=\frac{\partial C}{\partial q_i}=\frac{e^{q_i / b}}{\sum_{j=1}^n e^{q_j / b}} . \]
These prices always ensure \(p_i(q) \in(0,1)\) and \(\sum_i p_i(q)=1\), which allows you to read \(p_i(q)\) as the market‑implied probability that Model \(i\) will win.
Trading & Trade Cost
If a trader buys \(\Delta > 0\) shares of outcome \(k\) (or, equivalently, sells if \(\Delta < 0\)), the total cash outlay is the change in the cost function:
\[ \text { TradeCost }=C\left(q+\Delta e_k\right)-C(q) \text {, } \]
where \(e_k\) is the unit vector for outcome \(k\). This structure automatically yields:
- Always‑available liquidity. The AMM can always quote a price.
- Smooth price impact. Larger trades move prices more, and in a predictable way.
- Path independence of the midprice. Sans fees, a round trip that brings \(q\) back to its original value has net zero cost.
Bounded Risk (Platform Exposure)
A key property of LMSR is that it caps the worst‑case loss of the market maker, regardless of the sequence of trades. In particular, each market provably satisfies:
\[ \text { WorstCaseLoss } \leq b \cdot \log n \text {. } \]
That’s the maximum shortfall the market maker could face at settlement if the least‑favored outcome ends up winning. This closed‑form bound is what lets us reason clearly about risk.
How Delphi Implements LMSR
Market Objects & Settlement
As mentioned previously, each outcome corresponds to a claim “Model i wins the competition.” When you buy \(\Delta\) shares it mints new “Model k wins” tokens; selling burns them. Buying or selling shares changes the total outstanding quantity \(q_i\) for outcome \(i\). At settlement our ML evaluation pipeline selects a single winner (no ties) — winning shares pay 1 token whereas non‑winning shares pay 0.
Pricing & Execution
At any market state \(q\), prices \(p(q)\) are computed via the formula given above. For a market order of size \(\Delta\) on outcome \(k\), we compute
\[ \Delta C=C\left(q+\Delta e_k\right)-C(q) \]
The average fill price is \(\Delta C / \Delta\) and, because C is convex, larger trades move the price more (known as slippage).
Liquidity parameter \(b\)
The liquidity parameter \(b\) controls how “sticky” prices are:
- Higher \(b\) → deeper market. Prices are harder to move; you need more volume (i.e. more cost) to shift probabilities.
- Lower \(b\) → more sensitive market. Prices move more from smaller trades.
Practically, we choose \(b\) to balance between good price responsiveness for informed traders and a reasonable risk budget backing each individual market on Delphi.
Trading Fees & the Revenue Pool
The protocol charges a proportional fee \(\tau \in [0,1)\) on the notional value of each trade. For a trade with cost \(\Delta C\) (equation above), we define \(|\Delta C|\).
- If \(\Delta C > 0\) (net buy) then the trader pays \((1 + \tau)\,\Delta C\), where \(\Delta C\) goes into the LMSR cost function (the AMM’s “bank”) and \(\tau \,\Delta C\) is skimmed into a separate Revenue Pool.
- If \(\Delta C < 0\) (net sell) then the trader receives \((1 - \tau)\,|\Delta C|\), where \(|\Delta C|\) is taken out of the AMM and \(\tau\,|\Delta C|\) goes to the Revenue Pool.
These fees accumulate in the Revenue Pool over the life of the market. At settlement, this pool helps offset any LMSR shortfall and could even produce net profit.
LMSR Vault: Community‑Supplied Market Making
The LMSR Vault is the capital pool that backs the market maker. Users can stake tokens into the Vault to act as passive market makers. In return, they receive a pro‑rata share of trading fees and ****any residual market‑maker profit after settlement.
If, at settlement, the AMM owes more to winning traders than it collected from them, the shortfall is paid from the Vault.
Lifecycle of staking:
- Deposit. You stake supported tokens into the LMSR Vault and receive a Vault receipt token representing your share of the pool.
- During the market. Your stake backs the AMM, and fees from every trade flow into the Vault (via the Revenue Pool).
- Settlement. The competition resolves and one model wins. The AMM pays out winners. If there’s a net shortfall, it comes out of the Vault balance.
- Distribution/Withdrawal. After settlement, fee income and realized P&L are reflected in the Vault’s value. You can withdraw your share or keep it staked for future events (subject to posted windows).
Economics at a glance:
- Fee revenue. With a proportional trading fee \(\tau\) (e.g., 0.5%–2%), the Vault’s fee income over a period is roughly \(\text{Fee income} \approx \tau \times V\), where \(V\) is total trading volume (sum of absolute trade notionals).
- Bounded exposure. The AMM’s worst‑case shortfall per market is \(b\). We size \(b\) so that the theoretical LMSR loss bound fits comfortably inside the Vault.
- Break‑even turnover intuition. Let \(L\) be the risk budget and \(\tau\) the fee rate. A simple heuristic is \(V^{} \approx L/\tau\). If actual trading volume \(V\) is well above \(V^{}\), fee income alone is expected to cover the shortfall, even before considering any extra trading P&L.
- Why competitive events help. Information‑rich competitions generate two‑sided flow (traders both buying and selling as new evidence appears). That churn increases \(V\), which increases fee income and thus improves expected returns for Vault stakers.
Risk controls:
To keep the system robust, Delphi uses several controls:
- Coverage target. It tracks a coverage ratio (Vault capital vs. risk budget) and keep it above a posted threshold. If coverage tightens it can decrease b (reducing depth), throttle max order sizes, or temporarily pause new market creation.
- Per‑market caps. Only a bounded fraction of the Vault is allocated to any single market.
- Lock/withdraw windows. Deposits and withdrawals follow announced windows, so capital can’t be pulled at the last second just before settlement.
Transparency:
We publish the current fee \(\tau\), the liquidity parameter \(b\), the Vault’s coverage ratio, cumulative fees, and per‑market allocations. After settlement, we report fee income, realized shortfall (if any), and net results to the Vault.
Example (illustrative) numbers:
Suppose we have n = 10 models and have set depth so the market‑maker’s risk budget \(L = 40k\). Let \(\tau = 1\%\) be the fee and the total trading volume be \(V = 8M$ over the duration of a market. Then the fee income \(\approx \tau V = 80{,}000\) tokens. Even if the realized shortfall at settlement hits the full \(40{,}000\) loss budget, the Vault would be ahead by about \(40{,}000\) tokens before operational costs and any additional AMM P&L.
Note that this is not a prediction or guarantee—just sizing intuition.
Why LMSR & How Delphi Differs from Popular Prediction Market Implementations
Theoretical Foundations
LMSR has been studied extensively and has various rigorous guarantees that other mechanisms don’t provide for prediction markets:
- Proper scoring rule foundation.LMSR is the cost‑function version of the log score. Under standard assumptions, it incentivizes risk‑neutral traders to report their true probabilities when trading, aligning incentives with information revelation.
- Convexity → unique, arbitrage‑free prices.Because the cost function \(C\) is convex, the gradient (i.e. our price vector \(p(q)\)) is well‑defined and unique for every state \(q\). The resulting probabilities always sum to 1, preventing “probabilities add up to more (or less) than 100%” arbitrage.
- Bounded worst‑case loss.The clean bound \(\text{WorstCaseLoss} \le b \log n\) supports principled risk budgeting and simplifies audits and operational controls.
- Information‑theoretic structure.LMSR’s geometry is closely related to entropy. Pushing a probability closer to 0 or 1 becomes exponentially more expensive. This helps resist manipulation and ensures that big moves require real conviction (backed by capital).
Practical Fit for “Winning Model” Markets
Beyond having these desirable properties, LMSR is practically well suited for the episodic and specialized model competitions in Delphi. Specifically, LMSR brings the following benefits to Delphi:
- Always‑on liquidity in thin markets.Order‑book (or auction-based) markets can be empty for long stretches. By contrast, LMSR guarantees a quote at every moment.
- Intuitive UI: Price ≈ Probability.Users can mostly treat prices as probabilities, without learning complex payoff diagrams.
- Simple, robust implementation.A small set of pure functions powers quoting, execution, and settlement. That makes the on‑chain code easier to test, reason about, and monitor.
- Clear risk controls.One parameter \(b\) dials depth; one fee \(\tau\) funds the Vault. Our exposure can be explained succinctly to users, risk managers, and auditors.
- Built for “only one winner.”LMSR naturally handles mutually exclusive outcomes, which matches our setting: exactly one model wins; all others lose.
- Scales to many models.Adding more models is straightforward; probabilities remain normalized and engineering costs scale linearly at worst.
How Delphi differs from popular prediction‑market implementations
At a glance:
- It uses an automated market maker; many are order‑book or auction based.
- Prices are coupled across outcomes; others use separate yes/no markets.
- It settles by machine (once fully implemented); others on human or oracle adjudication.
Liquidity model:
Delphi uses an LMSR AMM. You always get a quote and an instant fill—no need to match with another trader. Liquidity is continuous by design, and price impact is predictable (bigger orders move prices more). Our proportional fee funds the Vault that cushions and rewards market making.
By contrast, the most popular prediction platforms today use an order book or double-sided auction. Your order executes only if an appropriate counterparty exists. Liquidity can appear or vanish depending on participation, and spreads can widen when activity drops.
Ultimately LMSR empowers you to trade when you have information, not just when someone else happens to be online.
Outcome structure:
In Delphi each market has mutually exclusive outcomes—“Model A wins,” “Model B wins,” …—whose probabilities always sum to 100%. Prices are jointly coherent: if one model’s implied probability goes up, others automatically adjust downward.
Other platforms will typicaly list independent yes/no markets for each outcome (e.g., “Yes: Model A wins,” “Yes: Model B wins,” etc.). Coherence across those markets is left to arbitrage, so the implied probabilities might not sum to 100% at any moment.
As a result Delphi odds are always normalized and directly comparable across models; you know exactly what belief over the outcomes your buy/sell decisions correspond to.
Market Resolution/Settlement:
Delphi will settle by machine, once it is feature complete. This means the competition’s evaluation pipeline will reproducibly and verifiably picks a single winner then pays 1 per winning share; all others pay 0.
Other prediction platforms depend on human resolution, committee votes, or external oracles to interpret event descriptions. That can introduce delay, discretion, and sometimes controversy—especially for technical or nuanced outcomes.
With Delphi you know why the market settled a certain way and can verify the outcome yourself.
Conclusion
If you’re just here to trade on Delphi’s model‑winner markets, you don’t need to remember the formulas. What matters is:
- Prices behave like probabilities,
- You can enter and exit positions any time,
- Liquidity is always available,
- And the system’s risk is bounded and transparently managed.
The LMSR math is how we make those guarantees precise, and builds on a deep literature on scoring rule markets. For a more technical treatment of LMSR and our implementation in Delphi check out: