Architecture
The four core contracts, the strategy templates, the indexer and the live feed, and how a dawn flows through them.
Four contracts run the ritual. Strategy templates are deployed as cheap clones. The contracts' events are the source of truth; an indexer turns them into state and a live feed keeps every client sub-second.
#Components
| Component | Responsibility |
|---|---|
DawnScheduler | The clock and the auction: proposal window, bonds, votes, bids, settle. Escrows seed liquidity and winners' LP shares; pays refunds through pull payments. |
ForgeFactory | Template registry with parameter bounds and mutable selectors; deploys EIP-1167 strategy clones; the only gateway for mutate and sunset; agent registration with per-strategy rate limits and selector allow-lists; the fee config (lpFeeShareBps plus the creator / Pulse / protocol split of the take). |
PulseVault | Holds Pulse budgets (seedNextDawn, slashed bonds, the Pulse fee share); opens an epoch per settled dawn; streams with exponential decay; claim. |
OrbitIndex | Registry of strategies with lightweight on-chain metrics (TVL, volume, fees, mutations) for the UI and agents. |
| Strategy templates | StrategyBase (ERC-20 LP shares, fee accrual and split, sunset) plus one implementation per template, e.g. DynamicFeeAMM, BinaryMarket. |
| Indexer | Reads events, rebuilds proposals, bids, strategies, positions, mutations and Pulse; serves REST. |
| Live feed | WebSocket / SSE push of cycle, bid, strategy, activity and market events. |
#A dawn, end to end
- propose
DawnScheduler.propose(templateId, params, metadataURI)with the bond asmsg.value. The scheduler callsForgeFactory.validateParamsand emitsProposed. - vote · bid
vote(id)from proposal open until the auction ends;bid(id)(payable) andcancelBid(id)during the auction. EmitsVoted,BidPlaced,BidCancelled. - settle
After the auction, anyone calls
settle(dawnId). Winners are ranked, each winner's seed goes toForgeFactory.deploy, which clones the template, mints LP shares to the scheduler and lists it inOrbitIndex.PulseVault.startEpochopens the dawn's Pulse. - settleBid · withdraw
Bidders (or anyone on their behalf) call
settleBid(id, bidder): winning bidders receive LP shares, losing bidders a withdrawable refund.withdraw()pulls HYPE credits. - evolve
Owners and agents call
ForgeFactory.mutate(strategy, calldata); 70% of each fee stays in the pool's reserves for LPs, the 30% take accrues and is split byflushFees; LPsclaimPulse fromPulseVault.
#Design properties
- Bounded gas. Proposals per dawn and winners are capped, so
settleis O(P·N) with small P and N. Bidders are never iterated. - Pull payments. HYPE leaves the scheduler only via
withdraw, except LP shares, seeds to the factory and slashed bonds to the PulseVault. - Declared mutability.
mutateonly forwards selectors the template registered as mutable; bounds are checked per parameter. - Timelocked admin. Economic config changes are queued and apply after one full period, outside proposal and auction windows. Timing fields are immutable after deployment. Ownership is two-step everywhere (
acceptOwnership), intended to be held by a TimelockController (≥ 48 h) behind a multisig. - Guardian. May pause proposals, votes and bids (scheduler) and swaps, deposits and buys (factory), and flag spam. Exits always stay open:
withdraw,cancelBid,settleBid,removeLiquidity,redeem,PulseVault.claimandflushFeeswork while paused. - No oracle. Pools open at the author's
initQuotePerHype; the contracts never read a price feed. - Fail-safe settle. A winner whose deployment reverts is marked Lost and refunded; a full dawn of 32 proposals settles in about 3.8M gas.