ποΈ FULL PLATFORM ARCHITECTURE (Canonical)
π Core decisionβ
There is no onchain βmega factoryβ in the canonical design.
- Deployments happen via Account Abstraction (one-signature) or Foundry scripts
- Onchain contracts (
CreatorOVaultFactory,CreatorRegistry) store/serve canonical addresses
This keeps contracts deployable (24KB limit) and the system easier to evolve.
β Shared infrastructure (deploy once)β
CreatorRegistry: canonical lookups (token β vault/wrapper/shareOFT/oracle/gauge)CreatorOVaultFactory: registry of deployments (registerDeployment(...))VaultActivationBatcher: shared batcher to deposit + wrap + launch CCAStrategyDeploymentBatcher: shared batcher to deploy Charm/Ajna strategy stack (optional)
β Per-creator contracts (deployed per vault)β
CreatorOVault(ERC-4626 vault)CreatorOVaultWrapperCreatorShareOFT(LayerZero share token)CreatorGaugeControllerCCALaunchStrategyCreatorOracle- Strategies (Charm/Ajna) depending on configuration
π Canonical creator flowβ
Step 1: One-signature deploy (recommended)β
Use the repoβs AA flow:
- Frontend:
frontend/src/components/DeployVaultAA.tsx - Script:
script/deploy-with-aa.ts
This flow:
- deploys the full vault stack
- wires permissions (including
CCALaunchStrategy.setApprovedLauncher(VaultActivationBatcher, true)) - registers addresses (
CreatorOVaultFactory.registerDeployment(...)+CreatorRegistrywiring)
Step 2: Launch CCA (also can be in the same AA batch)β
Use VaultActivationBatcher.batchActivate(...) (or the AA flow that calls it).
Step 3: Strategiesβ
- If you want onchain strategy deployment, deploy via
StrategyDeploymentBatcher.batchDeployStrategies(...) - Otherwise strategies can be added/wired by scripts/AA and then funded via vault calls (e.g.
deployToStrategies())
π Where to look in this repoβ
- Deploy (AA):
frontend/src/components/DeployVaultAA.tsx - Activate (batcher):
contracts/helpers/VaultActivationBatcher.sol - Deploy strategies (batcher):
contracts/helpers/StrategyDeploymentBatcher.sol - Registry:
contracts/factories/CreatorOVaultFactory.sol,contracts/core/CreatorRegistry.sol