TrussDocs

Policies

Policies that could be built

Policies each slot could support, how each would work, and where the hooks limit them. None is implemented today.

Each policy slot accepts any contract that implements its hook, so a vault can take on rules that do not exist yet. This page describes policies that could be built for each slot, and where each hook's inputs limit what it can express. None of them is implemented today, and listing one here is not a plan to build it.

Key points

  • Every policy below fits a slot the vault already has. It needs a new policy contract and a binding, not a change to the vault.
  • The deposit hook sees the caller, the owner, the controller and the amount. The holder and withdrawal hooks see only an address.
  • A slot holds one policy, so several rules for one slot go in one contract.
  • Binding a new policy on a live vault waits the CRITICAL tier. A holder or withdrawal policy can also be bound at deployment.

Deposit policies

PolicyHow it would workLimits
Depositor allowlistRefuse a request unless the owner or the caller is approved, such as your app's own contractCovers who requests, not who holds later. Pair it with a holder policy
Per-depositor or per-period limitsKeep a limit per owner, used up by each requestThe policy is not told when a request is cancelled
Subscription windowsRefuse requests outside set datesNone
Scheduled capReturn headroom that rises on a scheduleNone
Cap plus other rulesKeep the deposit cap and add rules of its ownNeeded, because replacing the cap policy drops the cap

Holder policies

PolicyHow it would workLimits
Verified-customer allowlistcanHold reads an identity registry or an on-chain credentialRefuses arrivals only
Screening denylistcanHold reads a screening listA listed holder keeps its shares, and can still send or redeem them
Closed vaultOnly your own custody or omnibus addresses may holdSuits an owner that keeps customer ledgers off chain
Collateral integrationsAdmit a lending market and every address it sends shares to, such as liquidatorsEach of those addresses has to be admitted, or a liquidation reverts

Withdrawal policies

PolicyHow it would workLimits
Verified payout addressesPay only approved receivers, such as an off-rampA refused owner can still name an approved controller
Screening on payoutscanWithdraw reads a screening listA refused controller's request still settles, and the USDC waits unclaimed

The withdrawal hook sees an address and nothing else: no amount, no request and no date. It cannot express a lock-up per request or a limit per amount.

Sub-account policies

SlotPolicyHow it would work
AllocationConcentration limitCap each sub-account at a share of the vault's NAV rather than a fixed amount
AllocationCo-signed pushesRequire a second approval, signed off chain and passed in policyData
AllocationTime windowsAllow pushes only at set times
ExecutionLoss bound in valueRefuse an execution whose measured loss exceeds a set amount, in recordExecutionOutcome
ExecutionLoss or trade budgetsCap the total loss or the number of executions per period
ExecutionVenue concentrationCap supply to a venue at a share of that venue's size

A new execution policy is installed by removing a module and adding it back with the policy. See Building a policy.

Where to read more

PageWhat it covers
Vault policiesWhere each vault hook is called, and who it is asked about
Sub-account policiesWhere each sub-account hook is called
Building a policyWhat a policy must satisfy, and what no policy can do
Using policies for complianceWhich hook fits which compliance need