The Subvault contract represents a modular, permissioned vault component designed to manage delegated asset strategies within a parent Vault. It enables curated logic for permissioned calls and asset management without exposing external deposit or redemption interfaces.
This contract combines callable and verifiable logic to serve as a secure, controlled execution unit within a system.
contract Subvault is IFactoryEntity, CallModule, SubvaultModule
The Subvault inherits:
CallModule: Enables arbitrary low-level calls to external contracts (used by curator of the vault), and verification through a verifier module.SubvaultModule: Handles vault linkage and liquidity handling.IFactoryEntity: Standard initialization interface for factory deployment compatibility.The constructor explicitly calls:
VerifierModule(name_, version_)
SubvaultModule(name_, version_)
This indicates that both modules rely on deterministic storage and versioned deployment identifiers via SlotLibrary.
constructor(string memory name_, uint256 version_)
name_: A unique string identifier for the deployment (e.g., “Mellow”).version_: A version number used to derive storage slots and allow upgradeable logic.Passes the name_ and version_ arguments into the constructors of VerifierModule and SubvaultModule.