Protocol design
CookLab is governed by one canonical Solana program. The implemented state machine launches tokens, executes curve trades, settles creator and protocol fees, releases vested creator allocations, activates native permanent liquidity, and enforces atomic graduation postconditions. Referral payout remains gated work.
InitializeCreates global protocol configuration and safety controlsLaunchAllocates fixed supply, initializes market state, and revokes mint authoritiesTradeExecutes deterministic buys and sells against canonical reserve stateSettleRoutes creator and protocol fees atomicallyVestReleases only the creator allocation unlocked by timeGraduateAtomic native-pool activation, overflow swap, burn, and vest activationOne program does not mean one undifferentiated instruction. CookLab is a single security boundary containing specialized state transitions whose shared invariants can be evaluated consistently.
Core accounts
Global configuration defines protocol-wide authorities and fee destinations. Each market records its mint, creator, reserve, tokens sold, lifecycle status, vesting state, and the parameters needed to reproduce settlement outcomes.
- Deterministic program-derived addresses
- Explicit account ownership checks
- Signer and authority validation
- Canonical clock for time-based release
Protocol invariants
A valid transition preserves total supply, prevents unauthorized minting, bounds arithmetic, respects slippage, routes fees exactly once, and cannot release more tokens than have vested.
- Checked integer arithmetic
- No floating-point state transitions
- Atomic failure on invalid accounts
- Event emission for indexable outcomes
Administrative surface
Administrative powers should be narrow, observable, and incapable of rewriting user balances. Emergency pause exists to stop affected activity, not to confiscate assets or create supply.
- Single canonical program identity
- Visible configuration changes
- Scoped pause behavior
- Production authority protected by multisignature controls