Smart contracts
This section documents the public-facing smart contracts in the 4626 protocol.
Contract taxonomy
Core
The foundational contracts that implement the vault system:
| Contract | Purpose |
|---|---|
| CreatorOVault | ERC-4626 vault for creator coins |
| CreatorOVaultWrapper | Converts ▢TOKEN ↔ ■TOKEN |
| CreatorShareOFT | LayerZero OFT for cross-chain |
| CreatorRegistry | Global registry of vaults and tokens |
Strategies
Capital deployment strategies:
| Contract | Asset | Purpose |
|---|---|---|
| CCALaunchStrategy | ■TOKEN | Fair launch via CCA |
| CreatorCharmStrategy | TOKEN | V3 LP via Charm |
| AjnaStrategy | TOKEN | Lending pools |
| V4 Strategies | TOKEN | V4 liquidity |
Governance
ve(3,3) governance system:
| Contract | Purpose |
|---|---|
| CreatorGaugeController | Fee distribution |
| VaultGaugeVoting | Epoch voting |
| ve4626 | Vote-escrowed tokens |
| VoterRewardsDistributor | Voter rewards |
| BribeDepot | External bribes |
Services
Supporting infrastructure:
| Contract | Purpose |
|---|---|
| CreatorLotteryManager | Jackpot system |
| CreatorOracle | Price feeds |
| SolanaBridgeAdapter | Solana bridge |
Helpers
Deployment and automation:
| Contract | Purpose |
|---|---|
| VaultActivationBatcher | 1-click activation |
| CreatorVaultDeployer | Full deployment |
| Create2Deployer | Deterministic addresses |
Architecture
┌─────────────────────┐
│ CreatorRegistry │
│ (global state) │
└─────────────────────┘
│
┌────────────────────┼────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ CreatorOVault │ │ CreatorShareOFT │ │ Governance │
│ (ERC-4626) │ │ (LayerZero) │ │ Contracts │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
▼ ▼ │
┌─────────────────┐ ┌─────────────────┐ │
│ Strategies │ │ GaugeController │◄─────────┘
└─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ LotteryManager │
└─────────────────┘
Sections
| Section | Contents |
|---|---|
| Core | Vault, Wrapper, ShareOFT |
| Strategies | CCA, Charm, Ajna, V4 |
| Governance | GaugeController, Voting, ve4626 |
For lottery mechanics, see Concepts: Lottery.
Deployment
For deployment guides, see:
API reference
For complete function signatures and NatSpec documentation, see:
- Contract API - Auto-generated from NatSpec
- Frontend API - TypeScript interfaces