TrussDocs

Guides

Rotate a key

How to replace each kind of key on a vault, from operator keys behind multicalls to the VaultAdmin, the fee recipient and the NAV keys.

Keys are replaced, not edited. An operator multicall's owner is fixed for its life, so a new operator key means a new multicall and a new grant. Each kind of key has its own delay before the replacement can act, so start early and revoke the old key last.

Key points

  • Revoke the old key last, unless it has leaked; then revoke it first.
  • An operator key needs a new multicall, which the VaultAdmin or a vault manager grants.
  • Replacing the VaultAdmin takes two CRITICAL windows, so a multisig VaultAdmin usually changes its signers instead.
  • A NavAdmin cannot be changed in place; the attested account moves to a new NAV provider.

How each key is replaced

KeyHow to rotateWhen the new key can act
Settler, DonorNew multicall; the VaultAdmin or a vault manager grants its roles, then revokes the oldAt once
AllocatorThe sameAfter the HIGH grant delay
TraderThe same, on each sub-account it runsReturns at once; executes after the HIGH grant delay
Vault managerNew multicall; the VaultAdmin grants the VaultManager profile and each sub-account's execute and return roles, then revokes the oldAfter the CRITICAL grant delay; its fee raises once their CRITICAL schedule runs
Sentry, NavGuardianThe VaultAdmin grants each of the profile's roles to the new address, then revokes the oldAfter the CRITICAL grant delay
VaultAdminSee belowAfter two CRITICAL windows
Fee recipientThe VaultAdmin calls setFeeRecipient(newRecipient) (HIGH)Once the change runs
NavManagerThe NavAdmin calls setNavManager(key, true), then setNavManager(oldKey, false)At once
NavAdminA new NAV provider under the new NavAdmin, bound with setNavProvider on the attested account (CRITICAL, VaultAdmin)Once the change runs

Each grant takes effect at the moment RoleGranted gives. Keys added after launch are not in the vault's address book, so track RoleGranted and RoleRevoked. Changing the fee recipient turns accrued fees into shares first, so what accrued until then goes to the old recipient.

Replacing the VaultAdmin

The VaultAdmin is the AccessManager's only admin, and its own admin changes wait the CRITICAL tier. To move to a new key:

  1. From the old key, schedule a grant of the admin role to the new key, and grants of every other role the VaultAdmin holds. Give each role its tier's delay as the execution delay, as the deployment did, or the new key would skip that role's timelock.
  2. Wait the CRITICAL tier and run the grants. The admin role then waits its own CRITICAL grant delay before the new key is a member. Immediate roles take effect after the same grant delay.
  3. Check the new key with hasRole for each role, then revoke the old key's roles.

In the first five days after deployment, grant delays are not yet in effect, so one CRITICAL window is enough. Holders can watch every scheduled step, because each one is public before it runs.

Where to read more

PageWhat it covers
ProfilesEach key and what it holds
Operator multicallsWhy an operator key needs its own multicall
A key has leakedRevoking first when a key is compromised
Change curatorReplacing every key a curator holds