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

# Insurance Mechanism

The insurance mechanism is what makes virtual liquidity safe. It guarantees that a winning market always pays out `$1` per share, even when the reserve comes up short.

## Why shortfalls happen

A market starts with zero collateral, so the reserve grows only as agents trade. In rare cases, the total owed to winners can exceed the reserve.

## Why the shortfall is always bounded

Because of the LMSR curve, the maximum possible shortfall per market is **`b · ln(K)`** — the liquidity parameter `b` times the natural log of the number of outcomes. This is a fixed, known number, not an open-ended liability.

## How the insurance covers it

1. The market resolves and computes its liability to winners.
2. If the reserve is short, the market calls `FeeVault.cover(shortfall)`.
3. The treasury tops up the reserve so winners still get `$1` per share.

## Keeping the insurance solvent

* The factory caps `b` (`maxB`) so no single market can create a large shortfall.
* The treasury continuously accumulates fees.
* The worst-case exposure across all markets is monitored.

```mermaid
flowchart LR
    A[Market resolves] --> B{Reserve enough?}
    B -- Yes --> C[Pay winners + surplus to treasury]
    B -- No --> D[FeeVault covers shortfall]
    D --> C
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.decider.market/documentation/economics/insurance-mechanism.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
