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

# Formulas

Share accounting and performance formulas, with units and rounding rules.

These formulas explain how the vault prices shares and applies fees. Each uses the contract's integer units and rounding rules. Start with the short explanation above each calculation, and use the deployed contract result when quoting a transaction.

## Shareholder NAV

NAV is the value left for shareholders after the contract deducts fees and money reserved for settlement or closing trades.

Amounts below use integer micro-USDC, where `1_000_000` means one USDC. Let E be tracked EVM USDC, C Core spot USDC, P signed perpetual equity, and R the configured bridge reserve:

```
funded reserve = min(R, C + max(P, 0))
gross NAV = E + C + max(P, 0) - funded reserve       [confirmed Standard mode]
gross NAV = max(E + C + P - funded reserve, 0)      [unattested mode]
```

Confirmed Standard mode treats perpetual and spot balances as separate ledgers. Without that owner attestation, negative perpetual equity remains a liability. Deposits and ordinary redemptions require confirmed Standard mode.

For positive aggregate Core notional N, permitted price band b in basis points, and execution-fee estimate e in basis points:

```
unwind cost bps = b + ceil((10000 + b) × e / 10000) + 1
unwind reserve = ceil(N × unwind cost bps / 10000)
```

In Standard mode the reserve is capped by positive P. It is zero when N is nonpositive, or when Standard mode has nonpositive P. Shareholder NAV deducts this reserve, accrued fees, and pending management fees from gross NAV, with a floor of zero. Builder liabilities are already included in accrued fees.

## Management fees

The management fee grows with time. The contract remembers amounts too small to charge yet and carries them into the next calculation.

For saved fee-net assets A\_c in micro-USDC, annual rate m scaled by `10^18`, elapsed seconds dt, and carried rounding remainder q:

```
D = 10^18 × 31557600
z = A_c × m × dt + q
pending fee = min(floor(z / D), available NAV)
next remainder = z mod D                           [unless capped]
```

The contract uses a 365.25-day year. A capped fee clears the remainder. Deferred reward checkpoints split the interval when its fee base changes.

## NAV per share

The price of a share depends on the value held by the vault and the number of shares. Small fixed adjustments keep that calculation defined when the vault is empty.

For fee-net NAV A in micro-USDC and raw 18-decimal share supply S:

```
p = floor((A + 10^6) × 10^30 / (S + 10^18))
```

The offsets are one USDC and one share. The result p is the WAD-scaled USDC price of one whole share. The deployed vault result is authoritative.

## Deposit shares

A deposit receives shares for its USDC amount after the deposit fee, rounded down.

Assets and fees below use micro-USDC; shares use raw 18-decimal units. The rate uses `10^18` scaling, where `10^15` means 0.1%:

```
deposit fee = floor(assets × deposit fee rate / 10^18)
estimated shares = floor((assets - deposit fee) × 10^30 / p)
```

The first deposit has a separate $10 gross minimum. Capacity and account-specific fee exemptions are checked at execution.

## Redemption assets

A redemption converts shares to gross USDC, rounds down, and then deducts the withdrawal fee.

```
gross assets = floor(redeemed shares × p / 10^30)
withdrawal fee = floor(gross assets × withdrawal fee rate / 10^18)
estimated assets = gross assets - withdrawal fee
```

An estimate does not guarantee immediate liquidity. Exact-share mint and exact-asset withdrawal solve the inverse calculations with upward rounding.

## Configured basket return

This comparison asks how the chosen basket moved, then applies the vault's intended direction and leverage. It leaves out the cost and timing of running the strategy.

```
basket return = Σ(asset percentage return × configured weight)
configured benchmark return = basket return × direction × target leverage
```

Use fractional weights that sum to one and leverage as a multiple, such as `3` for 3x. Direction is `+1` for long and `-1` for short. This simplified benchmark excludes funding, buffers, fees, execution, rebalancing, and compounding. Use the configuration that applied during the measured period, and explain any changes.

## Tracking residual

Tracking residual measures the difference between the observed vault return and its configured benchmark.

```
tracking residual = actual vault return - configured benchmark return
```

Subtract returns on the same percentage basis; the resulting gap is in percentage points. See [Performance methodology](/data-and-transparency/performance-methodology.md).
