TrussDocs

Architecture

Architecture

The contracts that make up a Truss vault, how money and value move between them, and which contract release is in use.

A Truss vault is a small group of contracts, not one. A share token takes deposits and pays redemptions. Sub-accounts hold the capital that is put to work. Other contracts price that capital, limit how fast it moves, and decide who may move it. Every restricted function answers to the vault's own AccessManager. This page shows how the pieces fit, how a dollar moves through them, and which release is in use.

Key points

  • The vault holds idle USDC and the books, and sub-accounts hold the capital that is put to work.
  • A NAV oracle adds the vault's idle USDC to each sub-account's value, and requests settle at that NAV.
  • Policies cap and meter what can move: deposits, each sub-account, swaps, lending and instant withdrawals.
  • No contract can be upgraded in place, so each vault keeps the release it was deployed with.

How the pieces fit

Idle USDC is cash the vault holds but has not sent to a sub-account. NAV (net asset value) is what everything the vault holds is worth, in USDC.

FromToWhat moves
DepositorVaultA deposit request; the USDC waits in the deposit silo, outside NAV
SettlerVaultSettlement at NAV; holders then claim shares or USDC
VaultTracked sub-accountUSDC, within its cap and push limit
Tracked sub-accountModulesSwaps and supplies, each checked against oracle prices
VaultAttested sub-accountUSDC, within its cap and push limit
Attested sub-accountVenue or another chainCalls of approved shapes only
NAV providerAttested sub-accountA reported value, used only inside the deviation band

Components

ContractOne perWhat it does
TrussVaultvaultThe share token: requests, settlement, fees, the list of sub-accounts, idle USDC
DepositSilovaultHolds pending deposits outside NAV
NavOraclevaultAdds idle USDC and each sub-account's value; stores nothing
PriceOraclevaultPoints each asset to a price adapter
AssetRegistryvaultLists what each tracked sub-account may hold
TrackedSubAccountsub-accountHolds registered tokens, valued at oracle prices
SwapModule, ERC4626LendModuletracked sub-accountSwap through a router; lend to ERC-4626 venues
AttestedSubAccount, BitmaskVerifierattested sub-accountMakes approved calls only, valued from a reported figure
AttestedNavProviderattested sub-accountHolds the value its NavManagers post
Policiesvault or sub-accountCaps and limits on deposits, pushes, swaps, lending and instant withdrawals
AccessManagervaultEvery role, restricted function and scheduled change
OwnedMulticalloperator keyHolds one key's roles and batches its calls
TrussVaultFactory, RolesTable, price adaptersnetworkDeploy vaults, name each function's tier, price assets

How a dollar moves

  1. A depositor requests a deposit, and the USDC waits in the deposit silo.
  2. A settler settles the request at NAV. The USDC becomes vault idle, and the depositor claims shares.
  3. A vault manager or an allocator sends USDC to a sub-account, within its cap and push limit.
  4. The sub-account puts it to work: a swap or a loan through a module, or an approved call.
  5. A vault manager, the VaultAdmin or one of the sub-account's traders brings it back to the vault.
  6. A settler pays a redemption from vault idle, and the holder claims the USDC. An instant withdrawal pays at once, from vault idle and then a default lending venue.

Flow of funds has a page for each flow.

How value is measured

NAV is vault idle plus each sub-account. A tracked sub-account counts its USDC at face value and its other tokens at oracle prices. An attested sub-account supplies one figure, net of what it owes. Pending deposits are not part of NAV. If any input is stale, the whole NAV is stale: settlement, instant withdrawals and fee changes wait, while requests, cancellations and claims still work. NAV parameters has the detail.

The factory's version() gives the release it deploys, and the roles table's rolesVersion() gives the version of its roles. The current release is 1.0.0, with roles version 1.

Where to read more

PageWhat it covers
Tracked sub-accountsRegistered assets, oracles and modules
Attested sub-accountsApproved calls and reported value
Rate limitsHow fast money can move
Flow of fundsEach flow, its functions and who calls them
ImmutabilityWhat is fixed and what can be swapped