Architecture Deep Dive
System Overview
ckBoost is designed as a modular, secure, and scalable protocol with clean separation of concerns.
Canister Architecture
Core Modules
1. Main Canister (main.mo)
Purpose: Orchestration layer and public API Responsibilities:
Expose public functions defined in Candid interface
Coordinate between modules
Handle authentication and authorization
Manage system state
2. State Management (state.mo)
Purpose: Centralized state storage with persistence Responsibilities:
Store all boost requests
Store all booster accounts
Provide atomic updates
Handle canister upgrades
3. Ledger Operations (ledger.mo)
Purpose: All ICRC-1 token operations Responsibilities:
Handle ckBTC transfers
Manage transaction fees
Account balance queries
Error handling and logging
4. Validation Module (validation.mo)
Purpose: Input validation and business rules Responsibilities:
Validate amounts and fees
Check business logic constraints
Sanitize inputs
5. Booster Account Management (booster_account.mo)
Purpose: Liquidity provider operations Responsibilities:
Register new boosters
Manage deposits and withdrawals
Track available balances
Handle pool operations
6. Minting Operations (minting_operations.mo)
Purpose: Complex ckBTC minting workflows Responsibilities:
Two-phase minting processes
Cross-canister call management
Error recovery and retry logic
Fund reclamation flows
Data Architecture
Type System
State Transitions
Security Architecture
Trust Boundaries
Fund Isolation Strategy
Every operation uses isolated subaccounts to prevent fund mixing:
Security Benefits:
Request funds cannot be mixed with other requests
Booster funds cannot be mixed with user funds
Clear audit trail for every satoshi
Isolated failure domains
Next: API Reference →
Last updated