- Whether the asset is authorized for use
- The initial deposit amount the factory should pull and burn during deployment
initialDepositSize in their SpawnParams — the registry is the source of truth. A caller with FACTORY_SPAWN cannot deploy a Vehicle for an unauthorized asset, and cannot override the initial deposit size set by the registry admin.
What it stores
Each asset has anAssetConfig:
| Method | Returns |
|---|---|
getAssetConfig(asset) | Full AssetConfig struct |
isAssetAuthorized(asset) | true if authorized |
getInitialDepositAmount(asset) | Configured initial deposit (reverts with AssetNotAuthorized if not authorized) |
Why the initial deposit size matters
Vehicles wrap underlying yield protocols (Aave V3, Compound V3, ERC-4626 vaults), creating two independent layers of integer share math. Each layer rounds in the protocol’s favor (floor on deposit, ceil on withdraw), and because the Vehicle’s share math and the underlying protocol’s share math round independently, per-operation dust accumulates non-deterministically on the Vehicle’s balance. Two outcomes per operation:- Erosion — the underlying protocol rounds harder against the Vehicle than the Vehicle rounds against the user. The Vehicle ends up with slightly less underlying value, dragging the share price down for all holders.
- Accretion — the Vehicle rounds harder against the user. The Vehicle retains extra dust, lifting the share price.
totalAssets. The shares minted from the initial deposit are burned to a permanent burn address, so the underlying buffer stays in the Vehicle forever, absorbing rounding losses without affecting any real user.
Authorization
Managing registry entries requires theASSET_REGISTRY_SET_ASSET role.
| Role | Purpose |
|---|---|
ASSET_REGISTRY_SET_ASSET | Authorize, deauthorize, or reconfigure assets in the registry |
AssetNotAuthorized(address) from FactoryLib. Factories that are pointed at a missing or invalid registry revert with InvalidAssetRegistry.
Deploy and configure
The registry is typically deployed once per environment, pre-populated with the assets you expect to support.How factories use the registry
Every Vehicle and Conduit factory is constructed with a pointer to the registry. Onspawn:
- The factory reads
getInitialDepositAmount(asset)— reverts if the asset is not authorized. - It pulls that amount from the caller and performs the initial deposit into the new Vehicle.
- The initial shares are minted to the burn address.
Next steps
Create a Conduit
Factory flow that reads the registry at spawn time.
Create an Allocation Strategy
Walk through a MultiVehicle deployment end-to-end.