> For the complete documentation index, see [llms.txt](https://docs.choice.markets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.choice.markets/lmsr-explained.md).

# LMSR Explained

#### What LMSR Is

LMSR stands for **Logarithmic Market Scoring Rule**.

It is a cost-function-based automated market maker designed for prediction markets. Instead of requiring a live counterparty for every trade, LMSR uses a mathematical rule to price outcomes continuously.

Key properties:

* always-on liquidity
* prices behave like probabilities
* smooth repricing after trades
* bounded loss for the market maker

#### Intuition

Each outcome has an outstanding quantity of shares, denoted by `q_i`.

The LMSR cost function is:

```
C(q) = b * ln(sum_i exp(q_i / b))
```

Where:

* `q_i` is the quantity of shares for outcome `i`
* `b` is the liquidity parameter

The instantaneous price for outcome `i` is:

```
p_i(q) = exp(q_i / b) / sum_j exp(q_j / b)
```

This formula ensures that:

* each outcome price stays between `0` and `1`
* all outcome prices sum to `1`
* more demand for one outcome raises its price

#### Cost of a Trade

If the market state changes from `q` to `q'`, the trader pays:

```
Trade Cost = C(q') - C(q)
```

This is the amount required to move the market from the old state to the new state.

#### The Role of `b`

The liquidity parameter `b` controls price sensitivity.

* larger `b` means deeper liquidity and smaller price movement per trade
* smaller `b` means thinner liquidity and sharper price movement per trade

For a market with `n` outcomes, LMSR gives a bounded worst-case loss of:

```
b * ln(n)
```

This bounded-loss property is one reason LMSR is so useful for long-tail prediction markets.

#### Why LMSR Fits Choice Markets

Choice Markets is designed to support a large number of socially sourced markets, including markets that may not immediately attract dense liquidity.

LMSR is a strong fit for that environment because it:

* keeps new markets tradable from the start
* supports long-tail market supply
* turns social attention into executable pricing quickly


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.choice.markets/lmsr-explained.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
