1 · Act as
The template checks who is calling. Pick a role — the demo enforces the same rules on-chain.
You are acting as: sponsor. The sponsor creates the bounty; the hunter submits; the referee resolves disputes; anyone can call timeout after the deadline.
2 · Chain epoch (simulated)
Current epoch: 1000 · deadline is an epoch, not a date — a mainnet epoch is about 20 minutes.
3 · Create a bounty
scope_hash: —
Bounty status
- State
- — no bounty yet —
- Vault balance
- —
- Sponsor
- —
- Referee
- —
- Deadline epoch
- —
- Scope hash
- —
- Submission
- —
4 · Act on the bounty
report_hash: —
Event log
- No events yet.
How it works
- Create. The sponsor locks the full bounty in the component vault. State:
Open. - Submit. A hunter submits a
report_hash(SHA-256 of the report). The report itself never goes on chain. State:Submitted. - Approve pays the whole vault to the hunter. Reject clears the submission and reopens the bounty. State:
Paid/Open. - Dispute. If the hunter disagrees with a rejection path, they dispute. Funds stay locked. State:
Disputed. - Resolve. The referee — fixed at creation, never changeable — pays the hunter or refunds the sponsor. State:
Paid/Refunded. - Cancel / timeout. The sponsor can cancel while Open; anyone can call
timeoutonce the deadline epoch passes. Both refund the whole vault to the sponsor. State:Refunded.
Only hashes go on chain. The scope text and the report stay off-chain — that is the point: a public bounty board that does not leak what was found, or where.