> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleopetra.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# How it works

> Pricing, NAV, and the mechanics of a Thesis Index

## Index architecture

A Thesis Index is an on-chain vault that holds prediction market positions and issues shares to depositors.

* The publisher defines the composition (markets, directions, weights).
* Traders deposit stablecoin and receive shares.
* The index holds the underlying positions.
* Shares represent a proportional claim on whatever market value the index holds at any moment.

<Frame>
  <img src="https://mintcdn.com/cleopetra/eFURqK4PzZq9AABz/images/index_architecture.png?fit=max&auto=format&n=eFURqK4PzZq9AABz&q=85&s=5b0e9179be91ff971121e1717b4e2625" alt="Thesis Index model" width="1624" height="1184" data-path="images/index_architecture.png" />
</Frame>

<Note>In v1, Indices are vault-based. Tokenisation of shares is on the roadmap.</Note>

## Index NAV

The NAV (Net Asset Value) of a Thesis Index is the total market value of every position it holds, marked to current prices, plus any idle stablecoin in reserve.

$$
\text{NAV} = \left( \sum_{i=1}^{n} \text{Balance}_i \times \text{Price}_i \right) + \text{Stablecoin reserve}
$$

Where:

* **balance** is the number of contracts held in position *i*
* **price** is the current market price of that contract
* **n** is the number of positions in the index
* **Stablecoin reserve** is any stablecoin (USDC/USDT/USDG) held, typically from a resolved market that paid out, or held between a rebalance

## Index price

The price of one share is NAV divided by total shares outstanding.

$$
\text{Index price} = \frac{\text{NAV}}{\text{Total shares}}
$$

At creation, index price is set to **\$1.00**. The first depositor receives shares 1:1 with USDC. After that, as NAV moves, new depositors receive shares at the current index price:

$$
\text{Shares minted} = \frac{\text{USDC deposited}}{\text{Index price}}
$$

<Note>
  Shares are not the same as prediction market contracts. Shares are a claim on the entire index. The index separately holds the underlying contracts on the trader's behalf.
</Note>

## Index lifecycle

A full lifecycle, from creation to final resolution.

### 1. Index creation

A publisher creates an index with three positions:

| Market   | Direction | Weight | Current price |
| -------- | --------- | ------ | ------------- |
| Market A | YES       | 40%    | \$0.70        |
| Market B | YES       | 40%    | \$0.80        |
| Market C | YES       | 20%    | \$0.40        |

The publisher seeds the index with **\$100**. Each position is sized proportional to its weight at the current price:

* Market A: $(100 \times 0.40) / 0.70 = $ **57.14 contracts**
* Market B: $(100 \times 0.40) / 0.80 = $ **50 contracts**
* Market C: $(100 \times 0.20) / 0.40 = $ **50 contracts**

Checking NAV: $57.14 \times 0.70 + 50 \times 0.80 + 50 \times 0.40 = $100.

* Total NAV: **\$100**
* Shares issued: **100**
* **Index price: \$1.00**

### 2. Prices move

A week later, Market A rallies from \$0.70 to \$0.85. The other two are unchanged.

$$
\text{NAV} = (57.14 \times 0.85) + (50 \times 0.80) + (50 \times 0.40) = \$108.57
$$

$$
\text{Index price} = \frac{108.57}{100} = \$1.086
$$

The index is up **8.6%**, driven by Market A. No market has resolved yet, just mark-to-market movement.

### 3. New trader deposits

A second trader deposits **\$35** at the current index price of \$1.086.

$$
\text{Shares minted} = \frac{35}{1.086} = 32.23
$$

Total shares: $100 + 32.23 = $ **132.23**.

The \$35 is deployed at *current* prices (A is now \$0.85, not \$0.70):

* Market A: $57.14 + (35 \times 0.40)/0.85 = $ **73.61 contracts**
* Market B: $50 + (35 \times 0.40)/0.80 = $ **67.5 contracts**
* Market C: $50 + (35 \times 0.20)/0.40 = $ **67.5 contracts**

Index price stays at **\$1.086**. The new trader buys in at the current price; existing holders aren't diluted.

### 4. Markets A and B resolve YES

Resolution dates arrive. Markets A and B resolve in the publisher's favor. Each YES contract redeems for \$1.00.

* A: \$73.61 × \$1.00 = \$73.61 → USDC reserve
* B: \$67.5 × \$1.00 = \$67.50 → USDC reserve

Total USDC reserve: **\$141.11**. Market C is still active at \$0.40.

$$
\text{NAV} = 0 + 0 + (67.5 \times 0.40) + 141.11 = \$168.11
$$

$$
\text{Index price} = \frac{168.11}{132.23} = \$1.271
$$

The index is up **27.1%** from launch.

### 5. Market C resolves NO

Market C resolves against the thesis. Each YES contract redeems for \$0.

$$
\text{NAV} = 0 + 0 + (67.5 \times 0) + 141.11 = \$141.11
$$

$$
\text{Index price} = \frac{141.11}{132.23} = \$1.067
$$

The index closes at **\$1.067 per share: up 6.7%** from launch.

Two of three markets resolved YES and they were the heavier-weighted ones. The index ended up despite Market C resolving against the thesis. Sizing matters as much as direction.

### 6. Withdrawals

Both participants withdraw their full position at the final index price of \$1.067.

| Participant      | Shares | Withdrawn | Deposited | PnL             |
| ---------------- | ------ | --------- | --------- | --------------- |
| Publisher        | 100    | \$106.70  | \$100.00  | +\$6.70 (+6.7%) |
| Second depositor | 32.23  | \$34.39   | \$35.00   | -\$0.61 (-1.7%) |

The publisher is up because they were in from the start. The second depositor is slightly down as they bought in at \$1.086 after Market A had already rallied, and the final index price of \$1.067 settled below their entry.

***

An index's price appreciates as its underlying markets move in the thesis' favor, depreciates when they resolve against it, and compounds across both.

<Note>
  Publishers can rebalance the index at any point to add and remove markets or redeploy USDC reserves. Rebalancing changes composition, not the index price.
</Note>
