Roles and permissions
Roles and permissions
How authority over a Truss vault is split into profiles, how each key holds its roles, and how long each kind of change waits.
Every Truss vault has its own access manager: an OpenZeppelin AccessManager contract that decides who may call
each restricted function. Authority is split into profiles, so each key holds only what its job needs. Changes
that add risk wait a delay first, so holders can see them coming.
Key points
- Every restricted function on every contract of a vault answers to one role on that vault's access manager.
- Roles are bundled into eight profiles, from the VaultAdmin, which holds every role, to single-purpose ones such as the Settler.
- Every vault from one environment has the same roles at the same tiers. Only the seconds each tier waits differ between vaults.
- Operator keys hold their roles through an operator multicall, a small contract each key owns for good.
How authority is split
A role is permission to call one function. The access manager maps each restricted function to one role and grants roles to addresses. A profile is a fixed bundle of roles, given to one kind of key when the vault is deployed.
| Profile | What it is for |
|---|---|
| VaultAdmin | Every role at its own tier, the access manager's admin role and both cancellers |
| VaultManager | Day-to-day operation: settlement, moving capital, fees within their ceilings, lowering risk |
| Settler | Settling deposit and redemption requests, and nothing else |
| Allocator | Sending idle USDC into sub-accounts, within their caps |
| Donor | Adding USDC to the vault without minting shares |
| Trader | Executing on, and returning USDC from, the sub-accounts that name it |
| Sentry | Pausing and lowering limits, never unpausing or raising |
| NavGuardian | Invalidating and re-anchoring an attested sub-account's NAV |
The roles table, a contract deployed once per environment, fixes which roles exist, which profiles hold each one and each role's tier. One address may hold several profiles.
How keys hold their roles
The VaultAdmin, the Sentry and the NavGuardian hold their roles directly. Each vault manager, settler, allocator,
donor and trader key acts through its own OwnedMulticall instead. The factory deploys one for each key, and the
roles are granted to the multicall, not to the key.
Three kinds of key sit outside the access manager, and the contracts that use them check them directly:
- the NavAdmin, which appoints the keys that report an attested sub-account's value;
- the NavManagers, which post those reports;
- the fee recipient, which receives the vault's fees as shares.
How long a change waits
Each role sits at one of five tiers: Immediate, LOW, MEDIUM, HIGH or CRITICAL. A holder of a role above Immediate cannot call its function straight away. It schedules the exact call, waits the tier's delay, then runs it. Every lower, tighten and pause is Immediate, so risk can always be reduced at once. A vault deployed with timelocks off gives every tier zero seconds.
Where to read more
| Page | What it covers |
|---|---|
| Profiles | What each profile can do, and what a leaked key could do |
| Operator multicalls | How operator keys hold their roles, and how keys are added and rotated |
| Tiers and timelocks | How long each kind of change waits, and how it is scheduled |
| Who can call what | Every restricted function, its tier and who holds it |