vaultsDocumentation

Contract reference

Testnet only

Every deployed contract: purpose, address, read methods, write methods, events, errors.

Testnet. Addresses below come from the verified deployment configuration for the network the API reports. No mainnet addresses exist — the deploy script refuses chain 4663 outright. Nothing here renders an unresolved production address as though it were settled.

Live addresses for the running deployment are served by GET /v1/status and shown on the status page. Local Anvil addresses are deterministic for a given seed and mean nothing on any real network.

#MirrorVault

Holds custody, issues shares, decides syncs. One per source version. Not upgradeable.

#Read

MethodReturns
totalAssets()Conservative NAV in base-asset units. Reverts if any held position cannot be priced.
convertToShares(assets)Shares a given deposit would mint
convertToAssets(shares)Base-asset value of a share count
sourceAccount()The observed address
divergence(token)(snapshot, liveBalance)
trackedAssets()Every asset the vault tracks
trackedAssetCount()Length of that set
getConstitution()The full risk parameter set
sourceSnapshot(token)The accepted source balance
pendingSince(token)When an un-actioned divergence was first seen, or 0

#Write

MethodEffect
deposit(assets, receiver)Mint shares against NAV
redeemInKind(shares, receiver)Burn for a pro-rata basket. No pause check, no price feed.
requestBaseRedemption(shares)Escrow shares for epoch settlement
claimRedemption(requestId)Collect a settled redemption
sync(token)Evaluate one asset and act, or record why not

#Immutable references

baseAsset, sourceRegistry, assetRegistry, priceRouter, executionRouter, feeController, sourceVersionId, vaultVersion, keeperBountyBps, maxKeeperBounty.

Set at construction, never repointable — so no role can swap the price router for a friendlier one after depositors have committed.

#MirrorVaultFactory

MethodPurpose
vaults()Every deployed vault
vaultCount()How many
isVault(addr)Whether an address is a vault this factory deployed — the check the execution router uses to refuse foreign callers

#SourceRegistry

Records which address a source version observes. Versioned and immutable per vault.

Errors: ZeroAddress, ZeroIdentity, UnknownVersion(versionId), DuplicateSource(fomoUserIdHash, sourceAccount), AlreadyInState.

#AssetRiskRegistry

Approved assets, their decimals, per-asset pause, and the hard ceilings above every vault parameter.

Errors: ZeroAddress, UnknownAsset(token), ParameterOutOfRange(parameter, value, ceiling), DecimalsMismatch(declared, onChain), AlreadyInState.

Security. ParameterOutOfRange is the ceiling doing its job: no role can set a vault parameter above the registry constant, including the role that sets the value beneath it. DecimalsMismatch fires when a declared decimals value disagrees with the token contract — the cross-check that stops an asset being mispriced by orders of magnitude.

#PriceRouter

MethodReturns
priceInBase(token)Price, or reverts
tryPriceInBase(token)(ok, price, reason) — the non-reverting form
priceStatus(token)(ok, reason)

Errors: ZeroAddress, AdapterNotAllowed(adapter), CannotPrice(token, reason).

tryPriceInBase is what lets one unpriceable asset degrade a single row rather than failing a whole position read.

#ExecutionRouter

Builds and routes orders to allowlisted adapters. The order struct has no calldata field and no recipient field; the recipient is forced to the calling vault.

Errors: ZeroAddress, NotAVault(caller), VaultMismatch(caller, orderVault), AdapterNotAllowed(adapter), PairNotAllowed(tokenIn, tokenOut), SourceStateAlreadyConsumed(sourceStateId), DeadlinePassed(deadline, nowTs).

#FeeController

Fee policy only. Holds no custody and cannot claim any asset.