Protocol & contracts

Contract reference

Functions, events and custom errors of DawnScheduler, ForgeFactory, PulseVault, OrbitIndex and the strategy templates.

Last updated 4 min readv1.0

#DawnScheduler

FunctionWhoNotes
propose(bytes32 templateId, uint256[] params, string metadataURI) payableanyonePropose window; msg.value must equal the bond
withdrawProposal(uint256 id)proposerPropose window; bond credited back
flag(uint256 id, string reason)guardian / ownerBefore settle; slashes the bond to PulseVault
vote(uint256 id)anyonePropose or auction window; once per dawn per address
bid(uint256 id) payableanyoneAuction window; adds to your bid (minBid applies)
cancelBid(uint256 id)bidderAuction window; full refund credited
settle(uint64 dawnId)anyone, onceAfter the auction; ranks, deploys winners, starts the Pulse epoch
settleBid(uint256 id, address bidder)anyoneLP shares to winning bidders, refunds to losers
withdraw()anyonePull your HYPE credits (refunds, bonds)
queueConfig / applyConfig / cancelQueuedConfigowner (timelock)Economic config changes, delayed one full period
phase(), dawnTimes(dawnId), config()viewOn-chain phases: Evolve, Propose, Auction
getProposal, dawnProposals, biddersOf, scoreOf, previewWinnersviewRead state and the would-win set

#ForgeFactory

FunctionWhoNotes
registerTemplate(…), setTemplateActive, setCodehashAllowedownerTemplate implementation, parameter bounds, mutable selectors
validateParams(templateId, params), checkParam(templateId, i, v)viewRevert unless within bounds
deploy(templateId, params, owner, dawnId, proposalId) payableschedulerClone, initialise with the seed, list in OrbitIndex
mutate(address strategy, bytes data)strategy owner or registered agentForwards a mutable selector; rate-limited for agents
setAgent(strategy, agent, callsPerHour, bytes4[] selectors)strategy ownerRegister an agent with a rate and selector allow-list
setAgentSelector, revokeAgentstrategy ownerAdjust or remove an agent
sunset(address strategy)strategy ownerStops trading and deposits; LPs can still exit
setFeeConfig(FeeConfig)ownerLP fee share, creator / Pulse / protocol bps of the take, treasury
isStrategy, strategyInfo, strategiesCount, strategyAt, templateIds, getTemplate, agentOf, predictStrategyview

#PulseVault

FunctionWhoNotes
seedNextDawn() payableanyoneAdds HYPE to the next epoch's budget
startEpoch(dawnId, strategies, weights, window, halfLife)schedulerOpens a dawn's epoch; returns the budget
checkpoint(a, b)strategiesSettles accrual before LP balances change (transfer hook)
claim(address[] strategies)LPClaims accrued Pulse
rollover(uint64 dawnId)anyoneMoves an epoch's unallocated remainder forward
claimable(strategy, account), emittedAt(dawnId, ts), epochOf(dawnId)view

#OrbitIndex

FunctionWhoNotes
list(strategy, templateId, owner, dawnId)factoryAt activation
report(tvl, volumeDelta, feesDelta)strategiesMetrics update
recordMutation(strategy), delist(strategy)factoryOn mutate / sunset
metricsOf(strategy), count, strategyAt, page, livePageviewMetrics { templateId, owner, dawnId, listedAt, updatedAt, live, mutations, tvl, volume, fees }

#Strategies

Every strategy is an EIP-1167 clone of a template implementation inheriting StrategyBase, and is itself the ERC-20 LP-share token (transfer, approve, balanceOf, totalSupply). Common surface: initialize, sunset (factory only), flushFees, claimCreatorFees (owner), tvl, owner, templateId, dawnId, proposalId, isSunset.

TemplateTrading / liquidityMutable (via factory)
DynamicFeeAMMswapHypeForQuote(minOut, to) payable, swapQuoteForHype(amountIn, minOut, to), addLiquidity(maxQuote, minShares) payable, removeLiquidity(shares, minHype, minQuote), quote, currentFeeBpssetFeeBounds(base, max), setSensitivity(x10), setRange(pct)
OptionsVault (interface only)deposit(minShares) payable, withdraw(shares), roll()setStrikeOtm(x10), setImpliedVol(pct)
FeeCurveModule (interface only)feeBps(utilisationBps)setCurve(minFee, preKinkRise, kinkPct, slopeX10)
AgentRebalancer (interface only)rebalance(newCentre, minOut), setBand(x10)
BinaryMarketbuy(outcome, minShares) payable, redeem(), removeLiquidity(shares, minOut), priceYes(), resolve(outcome)setFee(bps)
Contract-level mutable functions take integer arguments (bps, x10 fixed-point). The app's template signatures (e.g. setFeeBounds(uint16,uint16)) map onto these. Template ids are bytes32 strings; see parameter order.

#Events

libraries/Events.sol (selection)Solidity
// DawnScheduler
event Proposed(uint64 indexed dawnId, uint256 indexed proposalId, address indexed proposer,
               bytes32 templateId, uint256[] params, uint256 bond, string metadataURI);
event ProposalWithdrawn(uint64 indexed dawnId, uint256 indexed proposalId, address indexed proposer);
event ProposalFlagged(uint64 indexed dawnId, uint256 indexed proposalId, address indexed guardian, string reason);
event BondReturned(uint256 indexed proposalId, address indexed proposer, uint256 amount);
event BondSlashed(uint256 indexed proposalId, address indexed proposer, uint256 amount);
event Voted(uint64 indexed dawnId, uint256 indexed proposalId, address indexed voter, uint256 votes);
event BidPlaced(uint64 indexed dawnId, uint256 indexed proposalId, address indexed bidder,
                uint256 added, uint256 bidderTotal, uint256 proposalTotal);
event BidCancelled(uint64 indexed dawnId, uint256 indexed proposalId, address indexed bidder,
                   uint256 amount, uint256 proposalTotal);
event DawnSettled(uint64 indexed dawnId, uint256 proposals, uint256 winners, uint256 seeded);
event ProposalWon(uint64 indexed dawnId, uint256 indexed proposalId, address indexed strategy,
                  uint256 rank, uint256 score, uint256 seed, uint256 shares);
event ProposalLost(uint64 indexed dawnId, uint256 indexed proposalId, uint256 score);
event LpClaimed(uint256 indexed proposalId, address indexed bidder, address indexed strategy, uint256 shares);
event BidRefunded(uint256 indexed proposalId, address indexed bidder, uint256 amount);

// ForgeFactory
event StrategyDeployed(bytes32 indexed templateId, address indexed strategy, address indexed owner,
                       uint64 dawnId, uint256 proposalId, uint256 seed);
event AgentSet(address indexed strategy, address indexed agent, uint32 callsPerHour);
event Mutated(address indexed strategy, address indexed caller, bool indexed byAgent, bytes4 selector, bytes data);
event StrategySunset(address indexed strategy, address indexed caller);
event FeeConfigSet(uint16 creatorBps, uint16 pulseBps, uint16 protocolBps, address treasury);

// PulseVault
event EpochStarted(uint64 indexed dawnId, uint256 budget, uint64 start, uint32 window, uint32 halfLife, uint256 strategies);
event PulseClaimed(address indexed account, address indexed strategy, uint256 amount);

// Strategies
event FeesAccrued(uint256 creator, uint256 pulse, uint256 protocol);
event Swap(address indexed trader, address indexed to, uint256 hypeIn, uint256 quoteIn,
           uint256 hypeOut, uint256 quoteOut, uint256 feeHype, uint256 feeBps);

#Errors

GroupCustom errors
GenericUnauthorized ZeroAddress ZeroAmount InvalidConfig TransferFailed Reentrancy Slippage Paused
ScheduleNotProposalWindow(dawnId) NotAuctionWindow(dawnId) NotVotingWindow(dawnId) AuctionNotOver(dawnId) AlreadySettled(dawnId) TimelockNotReady(eta)
Proposals & bidsWrongBond(sent, required) ProposerCapReached(cap) DawnFull(cap) UnknownProposal(id) ProposalNotActive(id) AlreadyVoted(dawnId) BidTooSmall(amount, minBid) NoBid NothingToClaim
FactoryUnknownTemplate TemplateInactive ParamCount(got, expected) ParamOutOfBounds(index, value, min, max) SelectorNotMutable(selector) SelectorNotAllowedForAgent(selector) RateLimited(calls, limit) UnknownStrategy StrategySunset MutationFailed(reason)
StrategiesInsufficientLiquidity InsufficientShares PriceMoveTooLarge(moveBps, maxBps) InvalidFeeBounds(base, max) MarketResolved MarketNotResolved TooEarly(at)
PulseEpochExists EpochNotOver EpochRolled UnknownEpoch LengthMismatch
All errors live in contracts/src/libraries/Errors.sol so clients decode reverts from one ABI fragment.

#Roles

RoleIntended holderCanCannot
Owner (each core contract)TimelockController ≥ 48 h behind a multisig; two-step transferRegister templates and bounds; allow-list implementation codehashes; set fee config for new strategies (LP share 50–95%); queue economic config; set guardian; emergency-sunset; resolve pm-binary; set the Pulse budget capMove user funds; change live strategies' fee split; change dawn timing; mint LP shares
GuardianFast multisigPause / unpause proposals, votes, bids, swaps, deposits, buys; flag a pending proposalBlock exits; touch bids or LP funds
Strategy ownerThe proposal authormutate within bounds; authorise / revoke agents; sunset; claim the creator share; two-step ownership transferExceed bounds; call non-mutable functions; withdraw LP funds
AgentAddress authorised per strategymutate allowed selectors, ≤ 120 calls/h token bucketAnything else
Anyonesettle, settleBid for others, flushFees, rollover
From contracts/SECURITY.md. The holders above are the intended end state: at deployment, the owner and guardian are both the deployer account.

#Gas

CallTypicalMax seen
propose358k412k
bid (first / raise)156k / 29k+156k
settle (3 winners)1.15M2.94M; 3.83M for a full dawn of 32 proposals
settleBid (LP claim)85k154k
swapHypeForQuote / swapQuoteForHype118k / 140k156k / 336k
addLiquidity / removeLiquidity113k / 97k113k / 153k
mutate (agent)79k90k
PulseVault.claim (1 strategy)135k218k
From forge test --gas-report (solc 0.8.28, via-IR, optimizer 1000 runs). Paid in HYPE on Elysium.

#Defaults (Config.sol)

Period
1 day (dawn slot 12:00 UTC)
Proposal lead / auction
60 min / 10 min
Pulse window / half-life
360 min from settlement / 45 min
Pulse budget cap
min(pending, 500 HYPE) per dawn; excess rolls over
Proposal caps
2 per proposer, 32 per dawn
Bond / vote weight
25 HYPE / 1 HYPE
Winners
3
LP fee share
lpFeeShareBps = 7000 (70% stays in the pool)
Protocol take split
4000 / 3500 / 2500 bps of the remaining 30%
Something unclear or wrong on this page? Report it.Updated Dec 1, 2026 · v1.0