Proposals & auction endpoints
Read proposals and the live auction; the on-chain calls behind proposing, voting, withdrawing and bidding.
Reads are public. Proposing, voting, withdrawing and bidding are wallet-signed transactions to DawnScheduler: the REST routes below answer 409 onchain_required and document the contract call to make. They are gated by the dawn cycle; check GET /api/cycle first, or expect a revert such as NotProposalWindow.
#GET/api/proposals
List proposals, as indexed from DawnScheduler events. Proposal ids are the on-chain proposal ids.
| Query / path | Type | Description |
|---|---|---|
cycle | "current" | <cycleId> | "all" | Which cycle, e.g. daily-5 (default current) |
status | ProposalStatus | Optional filter: pending, in-auction, won, lost, flagged, withdrawn |
Proposal[]curl "https://$HOST/api/proposals?cycle=current&status=in-auction"[ {
"id": "17",
"cycleId": "daily-5",
"author": "0x9a3f…c41b",
"authorName": "dawnbuilder",
"template": "clamm-dyn",
"name": "Calm-weather CL-AMM",
"description": "Tight range, low base fee; widens fees fast when HYPE gets volatile.",
"params": { "baseFee": 12, "maxFee": 120, "range": 18, "sens": 4 },
"mutable": ["setFeeBounds(uint16,uint16)", "setRange(int24,int24)", "setSensitivity(uint32)"],
"bond": 25,
"bondStatus": "locked",
"status": "pending",
"createdAt": 1796643131000,
"totalBid": 0,
"bidders": 0,
"votes": 0,
"hue": 196
} ]#GET/api/proposals/:id
One proposal with its bids and, once activated, its strategy.
{ proposal: Proposal, bids: Bid[], strategy?: Strategy }curl https://$HOST/api/proposals/17{ "proposal": { "id": "17", "status": "won", "strategyId": "0x5c2e…8f2c", "…": "…" },
"bids": [ { "id": "17-0x9a3f…c41b", "amount": 150, "status": "won", "…": "…" } ],
"strategy": { "id": "0x5c2e…8f2c", "…": "…" } }- 404
not_foundUnknown proposal id
#POST/api/proposals
Wallet-signed on-chain action. The API never submits proposals; it answers 409 onchain_required. Submit the proposal from your wallet with DawnScheduler.propose(templateId, params, metadataURI), sending the bond (25 HYPE, exactly) as msg.value. The proposal then appears in GET /api/proposals once the transaction is indexed.
| Field | Type | Description |
|---|---|---|
templateId | bytes32 | The template id as bytes32, e.g. bytes32("clamm-dyn") (only clamm-dyn and pm-binary are registered) |
params | uint256[] | Template parameters in the on-chain order; out-of-bounds values revert |
metadataURI | string | Off-chain name and description (ipfs://, https://, or the data: URI the app builds and the indexer decodes) |
`409 onchain_required` from the API; on-chain, the new proposal idcurl -X POST https://$HOST/api/proposals -H "Content-Type: application/json" -d '{}'{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }- 409
onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)
#POST/api/proposals/:id/vote
Wallet-signed on-chain action. Answers 409 onchain_required. Cast your one vote per dawn with DawnScheduler.vote(id); it adds 1 HYPE of weight to the proposal's score. Reverts with AlreadyVoted on a second vote and NotVotingWindow outside the propose and auction phases.
`409 onchain_required` from the APIcurl -X POST https://$HOST/api/proposals/17/vote{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }- 409
onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)
#POST/api/proposals/:id/withdraw
Wallet-signed on-chain action. Answers 409 onchain_required. The author withdraws a pending proposal before the auction opens with DawnScheduler.withdrawProposal(id). The bond is credited to withdrawable and pulled with withdraw().
`409 onchain_required` from the APIcurl -X POST https://$HOST/api/proposals/17/withdraw{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }- 409
onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)
#GET/api/auction
The live auction view: every ranked proposal with score, rank and whether it is currently winning (the indexed equivalent of previewWinners), the recent bid tape and N. Outside the auction, last carries the previous dawn's cleared results.
{ cycle, ranked: { proposal, score, rank, winning }[], tape: Bid[], winnersN, last? }curl https://$HOST/api/auction{
"cycle": { "id": "daily-5", "phase": "auction", "…": "…" },
"ranked": [
{ "proposal": { "id": "17", "name": "Calm-weather CL-AMM", "…": "…" }, "score": 1240, "rank": 1, "winning": true },
{ "proposal": { "id": "19", "…": "…" }, "score": 1211, "rank": 2, "winning": true }
],
"tape": [ {
"id": "17-0x9a3f…c41b",
"cycleId": "daily-5",
"proposalId": "17",
"bidder": "0x9a3f…c41b",
"bidderName": "dawnbuilder",
"amount": 150,
"createdAt": 1796645001000,
"updatedAt": 1796645033000,
"status": "active"
} ],
"winnersN": 3
}#POST/api/bids
Wallet-signed on-chain action. Answers 409 onchain_required. Bid with DawnScheduler.bid(id), sending HYPE as msg.value (at least the minimum bid). Calling it again on the same proposal raises your total by the new msg.value; bids cannot be lowered, only cancelled with cancelBid. Bid state is readable from GET /api/auction and GET /api/proposals/:id.
| Field | Type | Description |
|---|---|---|
id | uint256 | On-chain proposal id (a proposal with status in-auction) |
`409 onchain_required` from the APIcurl -X POST https://$HOST/api/bids -H "Content-Type: application/json" -d '{}'{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }- 409
onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)
#DELETE/api/bids/:id
Wallet-signed on-chain action. Answers 409 onchain_required. Cancel your whole bid with DawnScheduler.cancelBid(id); the amount becomes withdrawable and is pulled with withdraw(). Winning bids are settled with settleBid(id, bidder) after settle(dawnId).
`409 onchain_required` from the APIcurl -X DELETE https://$HOST/api/bids/17-0x9a3f…c41b{ "error": "This action is an on-chain transaction; sign it with your wallet.", "code": "onchain_required" }- 409
onchain_requiredThis action is an on-chain transaction. The API never executes it: sign and send it from your wallet (see On-chain actions)