Skip to content

LS-LMSR Engine

What is LS-LMSR?

Liquidity Sensitive Logarithmic Market Scoring Rule — our automated market maker (AMM) engine.

Unlike traditional order books, LS-LMSR always provides liquidity. Prices adjust automatically based on demand.

How it works

The cost function is:

C(q) = b × log(Σ exp(qᵢ / b))

Where:

  • q = quantity vector (shares held per outcome)
  • b = liquidity parameter
  • b(q) = α × Σqᵢ — scales with total volume

Key properties

Liquidity sensitivity

The parameter b grows with total volume. This means:

  • Early trades: Higher slippage (less liquidity)
  • Later trades: Lower slippage (more liquidity)

Prices always sum to 1

LS-LMSR uses softmax pricing, so outcome prices always sum to exactly 1.

Bounded loss

The operator’s worst-case loss is bounded:

L_max ≤ b(q) × log(n)

Where n is the number of outcomes.

Kelly Criterion

For position sizing on the tail (10%) side:

f* = (bp - q) / b

This helps prevent over-exposure on low-probability bets.

Numerical stability

LS-LMSR uses the log-sum-exp trick to prevent overflow with large share quantities:

log(Σ exp(xᵢ)) = max(x) + log(Σ exp(xᵢ - max(x)))