TrussDocs

Immutability and upgradeability

Contracts that can be swapped

Which contracts bound to a Truss vault can be swapped for different or new ones after launch, at which tier, and under what conditions.

A vault is built from parts that plug in. Several of them can be replaced by a different or newer contract without touching the vault, as long as the new one meets the slot's checks. Each swap waits its tier, so holders see it coming.

Key points

  • Binding a new contract waits the CRITICAL tier, and changing the fee recipient waits HIGH.
  • Removing or narrowing is usually immediate.
  • A replacement must name the same vault and answer to the same access manager.
  • The vault itself, its oracles, its asset registry and its instant redemption policy cannot be swapped.

What can be swapped

PartSwap in withRemove or narrow withConditions
Deposit, holder and withdrawal policiessetDepositPolicy, setHolderPolicy, setWithdrawalPolicy (CRITICAL)The same setter with zero (CRITICAL)Removing the deposit policy, or replacing it with one that does not cap, removes the deposit cap
A sub-account's allocation policysetSubAccountAllocationPolicy (CRITICAL)The same setter with zero (CRITICAL)With none, pushes into the sub-account have no cap or rate limit
A module and its policyaddModule(module, policy) (CRITICAL)removeModule (Immediate)The module is owned by the sub-account, and the policy is of its type. Removal needs every asset but USDC at zero
An asset's price adaptersetOracleAdapterForAsset (CRITICAL)removeOracleAdapterForAsset (Immediate)The new adapter must price one whole unit first. USDC's can be replaced but not removed
An attested sub-account's NAV providersetNavProvider (CRITICAL)—The provider must value this account and answer a read
The instant path's default sourcesetDefaultSource (CRITICAL)clearDefaultSource (Immediate)An active tracked sub-account, its ERC-4626 lend module and a USDC venue it values
A sub-accountaddSubAccount (CRITICAL)initiateSubAccountRemoval, then finalizeSubAccountRemoval (Immediate)Finalizing needs a tracked account to hold no positions, and an attested one to answer canRemove()
An attested sub-account's call shapesallowCallShape (CRITICAL)revokeCallShape (Immediate)—
An operator keyA new multicall and a grantRevoking its roles (Immediate)See Operator multicalls
The fee recipientsetFeeRecipient (HIGH)—Fees accrued so far are turned into shares for the old recipient first

A module's tolerance ceiling is fixed in its policy. A different ceiling means a new policy, bound by removing the module and adding it back with the new one.

What a replacement must meet

  • A policy or sub-account must name this vault, which vault() reads.
  • It must answer to this vault's access manager. The vault checks this when it binds it.
  • A sub-account must also use the vault's NAV oracle, and a tracked one the vault's price oracle and asset registry. It counts toward the vault's most sub-accounts.
  • It must implement the slot's interface.

A custom contract's own restricted functions have no rows in the roles table today.

What cannot be swapped

  • The vault, its underlying and its deposit silo.
  • The NAV oracle, the price oracle and the asset registry.
  • The instant redemption policy, though its default source can change.
  • A tracked sub-account's price oracle and registry, and an attested one's call verifier.
  • The sub-account a module serves.

Changing any of these means a new vault, or for a sub-account's bindings, a new sub-account.

Where to read more

PageWhat it covers
What is immutableEvery setting fixed for good
Extending a vaultAdding sub-accounts, assets, modules and call shapes
Who can call whatThe tier and holders of every function
Bind a policyThe steps to bind or replace a policy