> LS-LMSR Deep Dive

Evergreen
planted Feb 17, 2026tended May 6, 2026
#research#web3#defi#prediction-markets#amm#lmsr#market-making#math

LS-LMSR Deep Dive

A reference on the Liquidity-Sensitive Logarithmic Market Scoring Rule β€” the AMM math that underlies most non-CLOB prediction markets β€” with concrete application to bot-strategy work.

Academic foundation

Origins

The Logarithmic Market Scoring Rule (LMSR) was invented by Robin Hanson in his 2003 paper "Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation." The LS-LMSR extension was developed by Abraham Othman and Tuomas Sandholm at CMU in 2010.

Key papers:

  • Hanson (2003, 2007) β€” original LMSR formulation.
  • Othman & Sandholm (2010) β€” "A Practical Liquidity-Sensitive Automated Market Maker."

Design goals

LMSR addresses fundamental prediction-market challenges:

  1. Bounded loss β€” market maker has provably limited worst-case exposure.
  2. Continuous liquidity β€” guaranteed ability to trade without counterparty matching.
  3. Proper scoring β€” prices converge to true probabilities under rational trading.
  4. Low-liquidity operation β€” functions effectively even with minimal trading activity.

Core mathematical formulas

Cost function

The foundational LMSR equation tracks cumulative trading state:

C(qβƒ—) = b Β· ln( Ξ£α΅’β‚Œβ‚βΏ exp(qα΅’ / b) )

Where:

  • C(qβƒ—) β€” total cost function (cumulative subsidy paid out)
  • b β€” liquidity parameter (controls market depth / sensitivity)
  • qβƒ— β€” vector of net shares sold for each outcome
  • qα΅’ β€” shares outstanding for outcome i
  • n β€” total number of outcomes

Marginal price (probability)

The instantaneous price for outcome i is the partial derivative of the cost function:

pα΅’(qβƒ—) = βˆ‚C/βˆ‚qα΅’ = exp(qα΅’ / b) / Ξ£β±Όβ‚Œβ‚βΏ exp(qβ±Ό / b)

Properties:

  • pα΅’ ∈ (0, 1) β€” always strictly between 0 and 1.
  • Ξ£α΅’ pα΅’ = 1 β€” prices sum to unity (interpreted as probabilities).
  • It's a softmax over outstanding shares.

Trade cost

When buying Ξ” shares of outcome k:

TradeCost = C(qβƒ— + Δ·eβ‚–) βˆ’ C(qβƒ—)

Where eβ‚– is a unit vector (1 in position k, 0 elsewhere).

Cost is path-independent β€” only current state and final state matter. Larger Ξ” causes increasing marginal price (slippage).

Worst-case loss bound

Maximum market-maker subsidy required per market:

MaxLoss ≀ b Β· ln(n)

Implications:

  • Loss is bounded and known at market creation.
  • Required funding: F = b Β· ln(n) collateral.
  • Inverted: b = F / ln(n).

LS-LMSR extensions

Adaptive liquidity parameter

The key innovation of LS-LMSR is making b dynamic:

b = Ξ± Β· Q

Where Ξ± is a sensitivity parameter set at market creation, and Q is the total trading depth / cumulative liquidity in the market. b grows automatically as trading volume increases.

Liquidity-scaling behaviour

Early market (low Q):

  • Small b β†’ sensitive prices.
  • Small trades create large price movements.
  • Rewards early conviction and signal revelation.
  • Higher slippage on trades.

Mature market (high Q):

  • Large b β†’ deep liquidity pool.
  • Prices become "sticky" and smooth.
  • Large trades execute with minimal slippage.
  • Self-adjusting depth without manual intervention.

Key properties

  1. Positive homogeneity β€” prices depend only on share ratios, not absolute quantities.
  2. Unbounded maximum loss β€” unlike fixed-b LMSR, max loss grows with activity.
  3. Liquidity contribution β€” traders automatically deepen the pool by trading.
  4. No manual rebalancing β€” liquidity adjusts organically.

Precog v7 implementation

Parameter calculation

From the Precog v7 contracts, the implementation uses:

alpha = (overround / 10000) / (n * ln(n))
beta  = totalShares * alpha

Where:

  • overround β€” basis points above 100% (creates house edge)
  • n β€” totalOutcomes in the market
  • totalShares β€” cumulative shares across all outcomes
  • beta corresponds to the b parameter in academic literature

Cost-function implementation

cost = beta * ln( sum( exp(shares[i] / beta) ) )

Direct implementation of C(q⃗) = b · ln(Σ exp(qᡒ / b)).

Pricing

buyPrice  = cost_after_purchase βˆ’ current_cost
sellPrice = current_cost βˆ’ cost_after_sale βˆ’ 0.001% dust_fee

Liquidity sensitivity (the load-bearing detail)

beta is recalculated on every trade based on totalShares:

  • Each trade increases totalShares.
  • That automatically increases beta.
  • Higher beta β†’ deeper liquidity for subsequent trades.
  • A positive feedback loop: more trading = better liquidity.

Overround mechanism

The overround parameter creates market-maker profit:

  • Set in basis points (e.g., 200 = 2% overround).
  • Adjusts alpha so the sum of implied probabilities exceeds 100%.
  • Example: YES + NO might sum to 102% instead of 100%.
  • That spread is the market-maker's revenue source.

Market-making strategies

Arbitrage opportunities

1. Same-market rebalancing

YES + NO prices not summing to $1.00 in the same market.

  • YES at $0.52, NO at $0.46 β†’ total $0.98.
  • Buy both for $0.98 β†’ guaranteed $1.00 at resolution = ~2% return.

Reality: these windows close in roughly 200 milliseconds due to bot competition. Retail rarely captures them.

2. Combinatorial arbitrage (cross-market)

Logical inconsistencies between related markets.

  • "Trump wins presidency" β†’ 55% probability.
  • "Republican wins presidency" β†’ 50% probability.
  • Logical impossibility: Trump winning implies Republican win.
  • Strategy: long Trump, short Republican-party-win.

Documented profits: roughly $40M extracted from Polymarket between April 2024 and April 2025 via combinatorial arb across linked markets.

3. Cross-platform arbitrage

Profit = $1.00 βˆ’ (Yes_Price_Platform_A + No_Price_Platform_B) βˆ’ Total_Fees

Typical fees:

  • Polymarket β€” ~2%
  • Kalshi β€” up to 3%
  • Minimum viable spread: ~6% for reliable profit.

Polymarket leads price discovery; Kalshi typically lags by minutes β€” that's the exploit window.

Optimal bid-ask spread

In traditional market making, spread depends on:

  1. Price volatility (Οƒ) β€” higher volatility β†’ wider spread.
  2. Order-flow volatility β€” unpredictable trading β†’ wider spread.
  3. Inventory position β€” larger net position β†’ wider spread to hedge.
  4. Capital costs β€” higher inventory holding costs β†’ wider spread.

In LMSR, spread is implicit in the convex cost function β€” it's not manually set, it emerges from b. Higher b β†’ tighter implicit spreads (more liquid market). Lower b β†’ wider implicit spreads (more sensitive pricing).

Strategy: early-market entry

Low Q β†’ low b β†’ high sensitivity β†’ large price movements from small trades.

  1. Enter early when liquidity is thin.
  2. Establish position at favourable prices.
  3. As market matures and Q grows, b increases.
  4. Exit at tighter spreads in the deeper market.
  5. Capture the liquidity premium.

Risk: market may not attract sufficient volume β†’ stuck in an illiquid position.

Strategy: slippage arbitrage

LMSR displays marginal price, but trades execute at average price.

Displayed_Price  = p(q⃗)         // instantaneous marginal price
Execution_Price  = Ξ”C / Ξ”q        // average price over trade size
Slippage         = Execution_Price βˆ’ Displayed_Price

Strategy:

  • Identify markets where external probability estimates differ from LMSR price.
  • Calculate optimal trade size accounting for slippage.
  • Execute when true_probability βˆ’ execution_price βˆ’ fees > 0.

Strategy: overround exploitation

In Precog v7, the overround creates a guaranteed spread:

  • If overround = 200 bps, sum of probabilities β‰ˆ 102%.
  • The market-maker always quotes above fair value.
  • Counter-strategy: only trade when your information edge > overround spread.
  • Use external data (polls, prediction models) to identify mispriced markets.

Edge cases and failure modes

Prices near 0 or 1

Pushing price toward extremes becomes exponentially expensive. Required shares grow as:

Ξ”q β‰ˆ b Β· ln( p / (1 βˆ’ p) )

As p β†’ 1, ln(p / (1 βˆ’ p)) β†’ ∞, requiring infinite shares.

Practical implications:

  • Don't chase extreme prices β€” capital-inefficient.
  • Markets near 0 or 1 have poor liquidity and high slippage.
  • Manipulation resistance β€” moving price from 95% β†’ 99% is prohibitively expensive (this is a feature, not a bug).
  • CDA (Continuous Double Auction) outperforms LMSR for extreme probabilities.

Low-liquidity markets

  • Small Q β†’ small b β†’ high price sensitivity.
  • Large percentage moves from small trades.
  • Wide implicit bid-ask spreads.
  • "Light and sensitive" β€” good for price discovery, bad for execution.
  • Death spiral risk: high costs β†’ low volume β†’ stays illiquid.

Bot strategy: avoid providing liquidity in chronically low-Q markets. Focus on markets with catalysts (upcoming events, news). Size positions small to avoid moving price excessively.

Large trades moving the market

Convexity impact on a binary YES/NO:

  • First share costs β‰ˆ current price.
  • Last share costs > current price.
  • Average cost increases with trade size.
  • This is "pure price impact" β€” not fees, but AMM mechanics.

Bot implications:

  1. Split large orders β€” break into smaller chunks to reduce slippage.
  2. Calculate breakeven β€” slippage must be less than your information edge.
  3. Monitor b β€” higher-b markets can absorb larger trades.

Resolution edge cases

Deep, balanced markets often resolve at slightly above $1.00 per winning share β€” slippage and spreads get redistributed to winners at settlement.

Thin, lopsided markets may resolve slightly below $1.00 per winning share β€” market-maker subsidy was insufficient to cover extreme positions.

Precog v7 mitigates this via overround β†’ revenue pool β†’ backs payouts.

LMSR vs constant-product AMMs

| Feature | LMSR | Constant Product (Uniswap-style) | |---------|------|-----------------------------------| | Cost function | C = b Β· ln(Ξ£ exp(qα΅’ / b)) | C = k^(1/n) Β· Ξ£ xα΅’, with Ξ  xα΅’ = k | | Pricing | Softmax: p = exp(q / b) / Ξ£ exp | Ratio: p = y / x | | Invariant | None (subsidized) | x Β· y = k | | Math complexity | High (exp, ln) | Low (multiplication) | | Dynamic funding | Difficult | Easy (LP tokens) |

Subsidy model

LMSR β€” subsidized; market maker commits capital upfront. Bounded maximum loss b Β· ln(n). Cannot easily crowdfund liquidity dynamically. Use case: prediction markets where bootstrapping liquidity is hard.

Constant product β€” unsubsidized; LPs provide both sides. No theoretical loss bound (impermanent loss instead). Easily crowdfunded via LP tokens. Use case: asset swaps with two-sided markets.

Coherence across outcomes

LMSR β€” automatic coherence. Probabilities always sum to 100%. Buying YES automatically adjusts NO price downward. Single liquidity pool per market. No arbitrage opportunities within the same market (assuming no overround).

Constant product β€” no inherent coherence if multiple pools exist. YES and NO could have separate pools with incoherent pricing. Relies on arbitrageurs to maintain coherence. Can have temporary sum β‰  100%.

Multi-outcome suitability

LMSR is native multi-outcome β€” single formula scales to n outcomes, all priced jointly. Constant-product is binary by nature; extending to n outcomes requires multi-token pools (Balancer-style) and is less elegant for 5+ outcomes.

Bot-strategy implications

When to provide liquidity

βœ… Market has upcoming catalyst (event, news). βœ… Current Q is growing β€” sign of increasing activity. βœ… Your information edge > overround spread. βœ… Price is near 50% β€” most liquid region of the curve.

❌ Chronically low Q with no catalyst. ❌ Price near extremes (0% or 99%). ❌ Overround too high relative to your edge. ❌ High competition (arb opportunities close in milliseconds).

Position sizing

Given:

  • p_current β€” current market price
  • p_fair β€” your estimated fair probability
  • b β€” current liquidity parameter
  • fee β€” overround + platform fees

Optimal trade size (binary outcome):

Ξ”q = b Β· ln( ( p_fair Β· (1 βˆ’ p_current) ) / ( (1 βˆ’ p_fair) Β· p_current ) )

Profit check:

Expected_profit = (p_fair βˆ’ execution_price) Β· Ξ”q βˆ’ fees

Only trade if Expected_profit > 0 accounting for slippage.

Slippage management

Pre-trade calculation:

def calculate_slippage(current_shares, trade_size, beta, outcome):
    """Returns execution price and slippage for a trade."""
    current_cost = beta * ln(sum(exp(q / beta) for q in current_shares))

    new_shares = current_shares.copy()
    new_shares[outcome] += trade_size
    new_cost = beta * ln(sum(exp(q / beta) for q in new_shares))

    trade_cost = new_cost - current_cost
    avg_price = trade_cost / trade_size

    marginal_price = (
        exp(current_shares[outcome] / beta)
        / sum(exp(q / beta) for q in current_shares)
    )

    slippage = avg_price - marginal_price
    return avg_price, slippage

Strategy: for large positions, split across multiple trades; monitor beta growth between trades; wait for opposing trades to increase Q and deepen liquidity.

Risk management

Max_position = kelly_fraction Β· bankroll Β· edge / odds
  • Don't concentrate in a single market.
  • Spread across uncorrelated events.
  • Account for correlation (e.g., election markets).

Stop-loss triggers:

  • Market-maker subsidy depleted (rare but catastrophic).
  • Q declining rapidly β†’ liquidity drying up β†’ exit.
  • Price moves against you beyond statistical confidence.

Arbitrage-bot architecture

  1. Price monitor β€” track LMSR markets and external data sources.
  2. Spread calculator β€” compute overround and implicit bid-ask.
  3. Opportunity detector β€” find fair_price βˆ’ execution_price > threshold.
  4. Slicer β€” break large trades into optimal chunks.
  5. Executor β€” submit trades atomically (prevent front-running).
  6. Risk monitor β€” track exposure, correlations, worst-case loss.

Latency requirements:

  • Same-market arb β€” under 200 ms (extremely competitive).
  • Cross-market arb β€” under 5 seconds (more viable).
  • Information-based β€” minutes to hours (most accessible for retail).

Connection points

  • This is the AMM-side companion to Polymarket CLOB Deep Dive β€” Polymarket itself uses an order book, not LMSR, but most of the other prediction-market venues you'd cross-arb against do, and the slippage / position-sizing math here applies to any LMSR-based venue.
  • The arbitrage architecture sketched in the last section is the design behind polycli's arb subcommands.

Sources

Academic

  • Hanson, R. (2003). Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation. PDF
  • Othman, A. & Sandholm, T. (2010). A Practical Liquidity-Sensitive Automated Market Maker. PDF

Technical

Market making and arbitrage

Platform comparisons