TrussDocs

Integrating with a vault

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.

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?

ViewReturns
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?

ViewReturns
maxDeposit, maxMint, maxRedeem, maxWithdraw (controller)What the controller can claim now
The pending and claimable views, getRequestEach request's state; see Deposits and redemptions
depositCapacity()The deposit cap's headroom, unbounded when no deposit policy is bound
previewInstantRedeem, maxInstantRedeem, on the instant policyAn instant quote for any holder
paused(), and instantPaused() on the instant policyWhether new requests, or instant exits, are stopped

What are the fees and limits?

ViewReturns
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 policyThe cap and its fixed ceiling
subAccountCap, availableRateLimit, on the allocation policyEach sub-account's cap and push meter
availableWindow(), freshnessGate(), defaultSource(), on the instant policyThe instant path's limits

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

ViewReturns
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-accountIts value, and its holdings or last accepted attestation
bookOf(vault), delaysOf(vault), maxima(), minimumDelays(), on the factoryThe vault's contracts, its delay tiers in seconds, and the factory's limits
getTargetFunctionRole, hasRole, canCall, getRoleGrantDelay, on the AccessManagerWhich 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.

Where to read more

PageWhat it covers
Deposits and redemptionsThe request and claim calls
NAV parametersWhat makes the NAV fresh or stale
Deployment parametersThe factory's limits on each setting