# NAV Calculation

NAV (Net Asset Value) is the intrinsic value per vault token.

### NAV formula

```solidity
function getNAV() public view returns (uint256) {
  uint256 total = getTotalAssets();
  uint256 supply = totalSupply();

  // Stabilize NAV for small vaults using virtual assets/shares.
  uint256 totalWithVirtual = total + navVirtualAssets;
  uint256 supplyWithVirtual = supply + navVirtualShares;

  return (totalWithVirtual * PRECISION) / supplyWithVirtual;
}
```

### Total assets

`getTotalAssets()` includes:

* EVM USDC balance held by the core contract.
* Hyperliquid L1 spot account balance.
* Hyperliquid L1 perp account value (includes unrealized P\&L and funding).
* Pending sells (subtracted).

```solidity
function getTotalAssets() public view returns (uint256) {
  uint256 l1SpotValue = getL1SpotBalance() * 1e12;
  uint256 l1PerpValue = getL1AccountValue() * 1e12;
  uint256 evmUsdcBalance = IERC20(USDC).balanceOf(address(this)) * 1e12;
  uint256 pendingOut = totalPSUsdc * 1e12;

  uint256 total = l1PerpValue + l1SpotValue + evmUsdcBalance;
  return total > pendingOut ? total - pendingOut : 0;
}
```

### NAV stabilization

Used to reduce volatility in small vaults:

```solidity
navVirtualAssets = 1_000 * 1e18; // $1,000 virtual assets
navVirtualShares = 1_000 * 1e18; // 1,000 virtual shares
```


---

# Agent Instructions: 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://hyper-fun.gitbook.io/hypers.fun/tokenomics/nav-calculation.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.
