TrussDocs

Roles and permissions

Who can call what

Every restricted function on every contract of a Truss vault, its tier, and which profiles can call it.

This page lists every restricted function in a vault, the tier it waits, and the profiles that hold it. The tables are generated from the roles table, the contract that fixes these facts for every vault in an environment. They are never edited by hand.

Key points

  • The VaultAdmin holds every role on this page. The tables show who else does.
  • Every function that lowers risk is Immediate, so it can act at once.
  • Each sub-account's execute and return roles are separate roles, so a trader on one sub-account has nothing on another.
  • A few functions sit outside the table: the contracts check their callers themselves, or anyone may call them.

How to read the tables

There is one table per contract type. A role covers its function on every contract of that type in the vault, except the roles under "On each sub-account", which are one role per sub-account.

ColumnWhat it means
TierHow long a holder waits before the call runs. Immediate means no wait. See Tiers and timelocks
RiskWhether the function can raise risk, only lower it, or neither
Can move or revalue fundsWhether the function can move, redirect or change the value of what the vault holds
Also held byThe profiles other than the VaultAdmin that hold the role

Risk also decides who may cancel a scheduled call. The admin canceller cancels one that raises risk, and the operational canceller any other. The VaultAdmin holds both.

The functions, contract by contract

Generated from RolesTable version 1: 71 roles that cover every instance of a contract type, and 2 roles on each sub-account. The VaultAdmin holds every role in these tables.

TrussVault

FunctionTierRiskCan move or revalue fundsAlso held by
addSubAccountCRITICALRaisesYesVaultAdmin only
initiateSubAccountRemovalImmediateLowersNoVaultAdmin only
finalizeSubAccountRemovalImmediateNeitherNoVaultAdmin only
setDepositPolicyCRITICALRaisesYesVaultAdmin only
setHolderPolicyCRITICALRaisesYesVaultAdmin only
pushToSubAccountImmediateNeitherNoVaultManager, Allocator
requestAssetsFromSubAccountImmediateNeitherNoVaultManager
settleDepositImmediateNeitherNoVaultManager, Settler
settleRedeemImmediateNeitherNoVaultManager, Settler
crystalliseFeesImmediateNeitherNoVaultManager
donateImmediateNeitherNoVaultManager, Donor
pauseImmediateLowersNoSentry
unpauseHIGHRaisesNoVaultAdmin only
raiseEntryFeeMEDIUMRaisesNoVaultManager
lowerEntryFeeImmediateLowersNoVaultManager
raiseExitFeeMEDIUMRaisesNoVaultManager
lowerExitFeeImmediateLowersNoVaultManager
raiseManagementRateMEDIUMRaisesNoVaultManager
lowerManagementRateImmediateLowersNoVaultManager
raisePerformanceRateMEDIUMRaisesNoVaultManager
lowerPerformanceRateImmediateLowersNoVaultManager
setFeeRecipientHIGHRaisesYesVaultAdmin only
resetHighWaterMarkHIGHRaisesYesVaultAdmin only
rescueTokensImmediateRaisesYesVaultAdmin only
rescueNativeImmediateRaisesYesVaultAdmin only
setWithdrawalPolicyCRITICALRaisesYesVaultAdmin only
raiseInstantRedeemFeeLOWRaisesNoVaultManager
lowerInstantRedeemFeeImmediateLowersNoVaultManager
forceTransferImmediateRaisesYesVaultManager

Sub-accounts

FunctionOnTierRiskCan move or revalue fundsAlso held by
pausebothImmediateLowersNoSentry
unpausebothHIGHRaisesNoVaultAdmin only
setSubAccountAllocationPolicybothCRITICALRaisesNoVaultAdmin only
addModuletrackedCRITICALRaisesYesVaultAdmin only
removeModuletrackedImmediateNeitherNoVaultAdmin only
rescueTokenstrackedImmediateRaisesYesVaultAdmin only
setNavProviderattestedCRITICALRaisesYesVaultAdmin only
invalidateNavattestedImmediateLowersNoNavGuardian
anchorDeviationToLatestAttestationattestedImmediateRaisesYesNavGuardian

BitmaskVerifier

FunctionTierRiskCan move or revalue fundsAlso held by
allowCallShapeCRITICALRaisesYesVaultAdmin only
revokeCallShapeImmediateLowersNoVaultAdmin only

AssetRegistry

FunctionTierRiskCan move or revalue fundsAlso held by
registerAssetCRITICALRaisesYesVaultAdmin only
initiateDeregistrationImmediateLowersNoVaultManager
finalizeDeregistrationImmediateNeitherNoVaultManager

PriceOracle

FunctionTierRiskCan move or revalue fundsAlso held by
setOracleAdapterForAssetCRITICALRaisesYesVaultAdmin only
removeOracleAdapterForAssetImmediateRaisesYesVaultAdmin only

SubAccountSwapPolicy

FunctionTierRiskCan move or revalue fundsAlso held by
raiseRateLimitCapacityHIGHRaisesNoVaultAdmin only
lowerRateLimitCapacityImmediateLowersNoSentry
raiseRateLimitRefillRateHIGHRaisesNoVaultAdmin only
lowerRateLimitRefillRateImmediateLowersNoSentry

SubAccountLendPolicy

FunctionTierRiskCan move or revalue fundsAlso held by
raiseRateLimitCapacityHIGHRaisesNoVaultAdmin only
lowerRateLimitCapacityImmediateLowersNoSentry
raiseRateLimitRefillRateHIGHRaisesNoVaultAdmin only
lowerRateLimitRefillRateImmediateLowersNoSentry

SubAccountAllocationPolicy

FunctionTierRiskCan move or revalue fundsAlso held by
raiseRateLimitCapacityHIGHRaisesNoVaultAdmin only
lowerRateLimitCapacityImmediateLowersNoSentry
raiseRateLimitRefillRateHIGHRaisesNoVaultAdmin only
lowerRateLimitRefillRateImmediateLowersNoSentry
raiseSubAccountCapHIGHRaisesNoVaultAdmin only
lowerSubAccountCapImmediateLowersNoSentry

DepositCapPolicy

FunctionTierRiskCan move or revalue fundsAlso held by
raiseDepositCapHIGHRaisesNoVaultAdmin only
lowerDepositCapImmediateLowersNoVaultManager, Sentry

InstantRedemptionPolicy

FunctionTierRiskCan move or revalue fundsAlso held by
setDefaultSourceCRITICALRaisesYesVaultAdmin only
clearDefaultSourceImmediateLowersNoVaultManager, Sentry
raiseWindowCapacityHIGHRaisesNoVaultAdmin only
lowerWindowCapacityImmediateLowersNoVaultManager, Sentry
raiseWindowRefillRateHIGHRaisesNoVaultAdmin only
lowerWindowRefillRateImmediateLowersNoVaultManager, Sentry
loosenFreshnessGateHIGHRaisesNoVaultAdmin only
tightenFreshnessGateImmediateLowersNoVaultManager, Sentry
pauseInstantImmediateLowersNoVaultManager, Sentry
unpauseInstantHIGHRaisesNoVaultAdmin only

On each sub-account

Each of these is a separate role on every sub-account, so holding it on one sub-account gives nothing on another.

FunctionOnTierRiskCan move or revalue fundsHeld by
executeModuletrackedImmediateNeitherNoVaultAdmin, VaultManager, Trader
returnAssetsToVaultbothImmediateLowersNoVaultAdmin, VaultManager, Trader
executeCallsattestedImmediateNeitherNoVaultAdmin, VaultManager, Trader

AccessManager

The manager's own roles guard no vault function. The VaultAdmin holds all five.

RoleWhat it doesTierAlso held by
AdminAdministers the manager: grants and revokes every delayed role, maps functions to roles, closes targetsCRITICALVaultAdmin only
Admin cancellerCancels a scheduled call against a role that raises riskImmediateVaultAdmin only
Operational cancellerCancels a scheduled call against any other roleImmediateVaultAdmin only
Operational adminGrants and revokes the immediate roles the delegation admin does notImmediateVaultAdmin only
Delegation adminGrants and revokes the Settler, Allocator and Donor roles and each sub-account's execute and return rolesImmediateVaultManager

Functions outside the table

These functions answer to no role on the access manager:

FunctionContractWho may call it
crystalliseFeesThe vaultThe fee recipient, always, with no role. Anyone else needs its role, which the VaultManager holds
setNavManagerAn attested NAV providerThe NavAdmin
attestAn attested NAV providerThe NavManagers
syncNavAn attested sub-accountAnyone. It only takes up an attestation the account would use anyway
multicall(bytes[])The vault and each sub-accountAnyone. Each inner call is checked against the original caller
sweepA moduleAnyone. It sends a stray token to the module's sub-account

Requests, cancellations, request transfers and claims are the holder's own. The vault checks each against the request's controller or an operator it has approved. Anyone may claim a fill for its controller, who is then paid.

Checking it on chain

Every fact on this page can be read from the vault's access manager, the factory and the roles table:

  • getTargetFunctionRole(target, selector) gives the role a function answers to.
  • hasRole(roleId, account) gives membership and the holder's delay. A grant still waiting its grant delay reads as not a member.
  • canCall(caller, target, selector) says whether a call runs now or after a delay.
  • getRoleAdmin(roleId) and getRoleGrantDelay(roleId) give who grants a role and how long a new holder waits.
  • On the factory, delaysOf(vault) gives the vault's tiers in seconds.
  • On the roles table, allTypeScoped(), allSubAccountScoped(subAccount) and one view per profile list every role with its tier and risk. rolesVersion() gives the table's version.

Where to read more

PageWhat it covers
ProfilesWhat each profile is for, and what a leaked key could do
Tiers and timelocksHow long each tier waits, and how a delayed call is scheduled
Reading vault stateThe views an integration reads