> For the complete documentation index, see [llms.txt](https://docs.diversifi.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diversifi.trade/index-token-price-calculation/general-case.md).

# General Case

1. Vault TVL (Total Value Locked)
   * The vault holds a basket of assets (for example: a Blue Chip strategy with $BONK - 22%, $JLP - 20%, $JUP - 20%, $JITO -20% and $PYTH - 18%)
   * The value of these assets is calculated in USD using oracle (Switchboard)
   * Example:
     * $2,200 of $BONK
     * $2,000 of $JLP
     * $2,000 of $JUP
     * $2,000 of $JITO
     * $1,800 of $PYTH
     * TVL = $10,000
2. Supply of dTokens
   * When users deposit, they mint new dTokens.
   * Total supply = all dTokens minted (minus those burned on withdrawal).
   * Example:
     * Vault started with 10,000 dTokens minted.
3. NAV (Net Asset Value) Formula (per dToken value)

```python
{Token Price (NAV)} = {Vault TVL (USDC)} / {Total Supply of dTokens}
```

* Using the example:
  * TVL = 10,000 $USDC
  * Supply = 10,000 tokens
  * dToken price = 1.00 $USDC

4. When Deposits Happen

* User deposits 1,000 $USDC.
* Vault TVL = 11,000 $USDC.
* dToken supply increases by 1,000 new tokens at 1 $USDC each.
* Token price = still 1 $USDC (no dilution).

5. When Assets Move in Price

* Suppose BONK doubles in value.
* Vault TVL = 12,200 $USDC (up from 10,000 $USDC).
* Supply still = 10,000 tokens.
* New token price = 1.22 $USDC.

6. When Withdrawals Happen

* User burns 500 tokens (worth 650 $USDC at new price).
* Vault swaps assets back into USDC and sends them to the user.
* Supply drops by 500.
* Price per token stays unchanged (still 1.30 $USDC).
