vaultsDocumentation

Contracts

Implemented

The contract topology, what each one owns, and which roles can touch it.

#Topology

flowchart TB
  F[MirrorVaultFactory] -->|deploys| V[MirrorVault]
  V --> SR[SourceRegistry]
  V --> AR[AssetRiskRegistry]
  V --> PR[PriceRouter]
  V --> FC[FeeController]
  V --> ER[ExecutionRouter]
  ER --> AD["IExecutionAdapter<br/>(allowlisted)"]
  PR --> PA["IPriceAdapter<br/>(allowlisted)"]
  F -.->|"isVault() — only vaults may route"| ER

#What each contract owns

ContractOwnsCannot
MirrorVaultCustody, shares, snapshots, sync decisionsBe upgraded; accept arbitrary calldata; send proceeds elsewhere
MirrorVaultFactoryDeployment, the isVault registryTouch a deployed vault's assets
SourceRegistryWhich address a source version observesChange a live vault's source
AssetRiskRegistryApproved assets, decimals, per-asset pauseMove an asset
PriceRouterAdapter allowlist, conservative valuationReturn a price it does not stand behind
ExecutionRouterAdapter allowlist, order constructionChoose a recipient
FeeControllerFee policyHold or claim any asset

#Roles

Roles gate configuration, never custody. No role can move a depositor's assets, rewrite a snapshot, or block a withdrawal — those functions do not exist.

RoleCanCannot
RISK_ROLEApprove assets, set parameters beneath the registry ceilings, allowlist adaptersRaise a ceiling; touch vault balances
PAUSER_ROLEPause deposits or executionPause in-kind redemption
CuratorPropose and activate a source for future vaultsChange a live vault's source
KeeperCall sync(token)Choose what the sync does

Security. In production the admin and pauser roles must be a multisig or timelock. A single EOA holding PAUSER_ROLE across the protocol is a single point of failure, and is called out as such in the production gates.

#The one-way doors

Three properties are structural rather than policy, which is what makes them worth relying on:

  1. No upgrade path. No proxy, no delegatecall to a mutable implementation. What is deployed is what runs.
  2. No arbitrary execution. The order struct has no calldata field and no recipient field.
  3. No pausable exit. redeemInKind has no pause check and consults no price feed.

#Reference

Per-contract methods, events and errors are in Contract reference.