# Reading vault state

> The views an integration reads on a Truss vault and its factory, from the share price and NAV to limits, fees, policies and authority.

Source: https://docs.trusslabs.io/vaults/developers/reading-state

Everything an integration needs to show about a Truss vault can be read on chain. This page groups the views by the
question they answer. Unless a row says otherwise, the view is on the vault contract. The vault's other contracts are
listed in its address book, which the factory returns from `bookOf(vault)`.

> **Key points**
>
> - The share price views keep answering while the NAV is stale, at the last fresh price, and `nav()` says when that is the case.
> - Pending and claimable amounts are read per request and per controller.
> - Fees, limits and bound policies each have their own views, so a reader never has to assume a vault's settings.
> - Authority is read from the vault's AccessManager, the factory and the roles table.

## What is a share worth, and is the price fresh?

| View | Returns |
|---|---|
| `convertToAssets(shares)`, `convertToShares(assets)` | The share price, net of accrued fees |
| `totalAssets()`, `totalSupply()` | Net assets in USDC, and the share supply |
| `nav()` | Net assets, whether the NAV is stale, and `observedAt`, when its oldest input was observed |
| `highWaterMark()` | The performance fee's mark, per whole share at 18 decimals, where 1e18 is par |

While the NAV is stale, the price views answer the last fresh price at today's supply, so a market reading them
keeps working; check `nav().isStale` and `observedAt` before relying on the figure. They revert during one of the
vault's own calls, and while an attested sub-account's NAV waits to be re-anchored.

## What can a holder do now?

| View | Returns |
|---|---|
| `maxDeposit`, `maxMint`, `maxRedeem`, `maxWithdraw` (controller) | What the controller can claim now |
| The pending and claimable views, `getRequest` | Each request's state; see [Deposits and redemptions](https://docs.trusslabs.io/vaults/developers/deposits-and-redemptions.md) |
| `depositCapacity()` | The deposit cap's headroom, unbounded when no deposit policy is bound |
| `previewInstantRedeem`, `maxInstantRedeem`, on the instant policy | An instant quote for any holder |
| `paused()`, and `instantPaused()` on the instant policy | Whether new requests, or instant exits, are stopped |

## What are the fees and limits?

| View | Returns |
|---|---|
| `feeRates()`, `feeCeilings()`, `feeRecipient()` | The five rates, their ceilings and the round-trip ceiling, and who is paid |
| `accruedFees()`, `queuedFeeAssets()` | Fees owed and not yet minted. `accruedFees()` reverts while the NAV is stale |
| `limits()` | The minimum deposit and redemption, the sub-account count and the batch size, fixed at deployment |
| `depositCap()`, `depositCapCeiling()`, on the deposit cap policy | The cap and its fixed ceiling |
| `subAccountCap`, `availableRateLimit`, on the allocation policy | Each sub-account's cap and push meter |
| `availableWindow()`, `freshnessGate()`, `defaultSource()`, on the instant policy | The instant path's limits |

## What is bound, what does it hold, and who can act?

| View | Returns |
|---|---|
| `depositPolicy()`, `holderPolicy()`, `withdrawalPolicy()`, `instantRedemptionPolicy()` | Each bound policy, or zero for none |
| `forcedTransfersEnabled()` | Whether this vault was deployed with forced transfers |
| `subAccounts()`, `subAccountState(subAccount)` | The listed sub-accounts and each one's state |
| `accountedIdle()`, `reservedForClaims()`, `totalPendingDepositAssets()`, `netDeployedPrincipal(subAccount)` | Idle USDC, USDC owed to claims, deposits waiting, and USDC sent to each sub-account |
| `nav()`, `positions()` or `lastAcceptedNav()`, on a sub-account | Its value, and its holdings or last accepted attestation |
| `bookOf(vault)`, `delaysOf(vault)`, `maxima()`, `minimumDelays()`, on the factory | The vault's contracts, its delay tiers in seconds, and the factory's limits |
| `getTargetFunctionRole`, `hasRole`, `canCall`, `getRoleGrantDelay`, on the AccessManager | Which role a function needs, who holds it, and any wait |

The roles table lists every role and each profile's roles; see [Who can call what](https://docs.trusslabs.io/vaults/roles/function-permissions.md).

## Where to read more

| Page | What it covers |
|---|---|
| [Deposits and redemptions](https://docs.trusslabs.io/vaults/developers/deposits-and-redemptions.md) | The request and claim calls |
| [NAV parameters](https://docs.trusslabs.io/vaults/overview/nav-parameters.md) | What makes the NAV fresh or stale |
| [Deployment parameters](https://docs.trusslabs.io/vaults/reference/deployment-parameters.md) | The factory's limits on each setting |
