Templates / Funding
Hackathon Grant: a prize pool graded by a Verafy council
An initiator posts an amount and the evaluation criteria and opens a hackathon. Developers submit GitHub repositories, each pinned to a commit. When the period ends, a council of models from different families grades every submission, code computes the ranking, and the escrow pays exactly that ranking.
Why it exists
Hackathon judging is the weak point of every hackathon. Judges get a few minutes per project, grade the demo rather than the code, and are often sponsors with a stake in who wins. Payouts depend on the organizer doing what it said, and developers can check neither.
A hackathon grant signs the criteria and the prize table before anyone submits, grades the code at the commit that was submitted, with jurors who can't see each other's votes, and pays whatever that grading gives.
Foundations and sponsors
Run a hackathon without recruiting judges, with a payout you can't be accused of steering.
Developers
Know the rubric and the prize split before you start, and get paid by code.
Ecosystem teams
Run many small challenges at once; every result is a public, checkable record.
How it works
Post
The initiator signs the challenge, the rules, the weighted criteria, the pool, the prize shares, the minimum winning score, the window and the council, and funds the prize escrow.
Submit
A team signs a submission with its own key: team name, payout wallet, https://github.com/<owner>/<name>, a full 40-character commit SHA, and a description. A later submission before the close replaces the earlier one.
Close
Nothing is accepted after the window. Every repository is pinned to its commit, so work after the close doesn't count.
Snapshot
Each repository is rendered at its pinned commit: the file tree, then the README, manifests, license and source, within fixed limits. The same commit always gives the same bytes, and the hash is pinned.
Grade
One ASC per submission with a graded answer from 0 to 10: the rubric, the repository snapshot, facts from the log, and the team's description as untrusted text.
Rank
Code ranks by score, then earlier first submission, then log order. Places at or above the minimum score win their share.
Pay
The signer pays exactly the ranking, once. Whatever nobody won returns to the initiator.
What you fill in
The fields of hackathon. The whole document is hashed, and that hash is what everyone signs and the signer on chain carries.
| Field | What it holds |
|---|---|
challenge | What to build, and rules; breaking a rule scores 0 |
criteria | Each with an id, text and a whole-number weight |
money | Asset and pool |
prizes | Shares in parts per million that add up to the pool and don't grow with place, plus the minimum winning score |
window | Opens and closes |
council | Jury size, model families, bar, fee; maxSubmissions up to 500 |
What code checks, and what the jury decides
Code: the same answer on every computer
- Only token and system programs
- Nothing pays before the window closes and every live submission has a verified ruling
- Pays exactly the prizes the verified ranking gives, once
- Second and third place can't be swapped
- Unwon prizes and rounding go back to the initiator
- No change to the wallet's members or settings
Jury: the questions only judgment can answer
- What score, from 0 to 10, does this submission earn against the weighted criteria?
- Work not in the repository at the pinned commit doesn't count.
- A broken challenge rule scores 0.
A rule violation is final: the signer refuses it whatever the jury says.
How a council agrees on a grade
| Votes | Agreement on 7 | Result at a 0.66 bar |
|---|---|---|
| 7, 7, 7 | 100% | 7 |
| 7, 7, 8 | 83% (a vote one step away counts half) | 7 |
| 3, 7, 10 | 33% | Below the bar: a bigger council |
Attacks, and what stops them
| Attack | Defense | Status |
|---|---|---|
| A description tells the council to score 10 | Labeled untrusted; the council grades the repository | Tested with a scripted council |
| Code pushed after the close | Graded from a snapshot of the submitted commit, pinned by hash | Tested |
| A grader shown a doctored snapshot | Anyone can rebuild the snapshot from GitHub; a checker throws out rulings on any other | Tested |
| Two teams submit the same repository | The log refuses the second | Tested |
| Prizes paid before grading is done | Results are final only after the close with every submission graded | Tested |
| The organizer swaps places | The signer pays only the verified ranking | Tested |
| One person enters as several teams | Not prevented: a team is a key | Open risk |
Every case the signer builds labels the parties' own text as untrusted and never follows instructions in it. See Security for the threat model behind all templates.
Example: A 10 SOL agent escrow hackathon
{
"kind": "verafy.hackathon/1",
"challenge": { "summary": "Build a tool that lets two AI agents hold money in escrow on Solana and settle it by an agentic contract." },
"criteria": [
{ "id": "works", "text": "It runs, and the README shows how to run it end to end on devnet.", "weight": 4 },
{ "id": "contract", "text": "It uses a signed agentic contract with remedies.", "weight": 3 },
{ "id": "safety", "text": "Agent keys never leave the agent.", "weight": 3 }
],
"money": { "asset": "SOL", "pool": "10000000000" },
"prizes": { "shares": [500000, 300000, 200000], "minScore": 6 },
"council": { "bar": 0.66, "jury": { "size": 3, "minFamilies": 3 } }
}The prompt
Paste this into any capable AI. It asks you about your case one group at a time, writes the hackathon grant for it, explains who gets what in each outcome, points out risks in your terms, and ends with the harness call that checks the result. It never asks for keys: each party signs with its own, outside the conversation.
You are helping me set up a Verafy Hackathon Grant (verafy.hackathon/1, VIP-0031): I post a prize pool and evaluation criteria, developers submit GitHub repositories pinned to a commit, and after the window closes a Verafy council grades every submission from 0 to 10. Code ranks the scores and the escrow pays exactly that ranking.
Rules for you, the AI:
- Ask me the questions below one group at a time. Don't invent facts about my deal; if I don't know an answer, propose a sensible default and say it is a default.
- Amounts are whole base units as strings (1 SOL = "1000000000"). Times are unix seconds.
- Write every term, outcome and article so a stranger could decide from evidence alone whether it was met. No "reasonable", "high quality" or "timely" without a number or a test.
- Name the evidence that proves each thing, and prefer evidence that can be pinned by hash (a file, a commit, a transaction signature, an export).
- Never ask for or handle private keys. Each party signs with its own key, outside this conversation.
- When you're done, output: (1) the JSON, (2) a plain-English summary of who gets what in each outcome, (3) the risks you see in my terms, and (4) the harness call that checks it.
Ask me:
1. The challenge. What should people build, in two or three sentences.
2. The rules. Anything that disqualifies an entry (for example: code written during the hackathon, public and open source). A broken rule scores 0.
3. The criteria. Three to five, each something a reviewer can check in the repository at the submitted commit, with a whole-number weight.
4. The prize pool and the split. Shares in parts per million that add up to 1,000,000 and don't grow with place (for example 500000, 300000, 200000), and the minimum score a winner needs.
5. The window: when submissions open and close.
6. The council: size, model families, bar, fee, and the most submissions to accept.
Then write a one-paragraph scoring guide that says what 0, 5 and 10 look like for this challenge, and produce the program JSON with these fields: kind, id, title, initiator {name, key, wallet}, challenge {summary, rules []}, criteria [{id, text, weight}], money {asset, pool}, prizes {shares [], minScore}, window {opensAt, closesAt}, council {bar, jury {size, minFamilies}, fee}, maxSubmissions.
Tell entrants: submit https://github.com/<owner>/<name> and the full 40-character commit SHA; work after that commit doesn't count.
Check it with: validateHackathon(program), then policyFromTemplate('hackathon', { program }).Run it
In code
policyFromTemplate('hackathon', { program })
snapshotRepo({ repo, commit })
judgingContract(program, log, team, { snapshot })
hackathonResults(program, log, rulings, { now, snapshots, requireSnapshots: true })The demo
git clone https://github.com/Verafyai/verafyHarness cd verafyHarness node scripts/hackathon-demo.mjs
| File | What it is |
|---|---|
packages/core/src/hackathon.js | Programs, submissions, council contracts, results, policy |
packages/snapshot/src/index.js | Repository snapshots at a commit |
packages/core/test/hackathon.test.js | 5 tests |
scripts/hackathon-demo.mjs | Four teams, a tie, a prompt injection |
Status, honestly
- 5 of 5 tests pass: validation, submission rules, ranking with a tie break, the escrow check, a minimum score that leaves places empty, and snapshots a checker rebuilds
- The same commit of a 135-file repository snapshotted twice gives the same SHA-256
- In the demo, scores of 9, 7, 7 and 4 pay 5, 3 and 2 SOL; the earlier of the two 7s places second
- Not on devnet
- No real model council has graded a real repository yet; the demo council is scripted
- No team identity beyond a key
- Per-criterion grading is a later option
| Proposal | Status |
|---|---|
| VIP-0031: Hackathon grants: a prize pool graded by a Verafy council | Shipped (v0.0.5-alpha): repository snapshots built; not yet on devnet |
| VIP-0030: Super grants: venture-style funding paid out on verified outcomes | Shipped (v0.0.5-alpha) |
| VIP-0010: Judiciary Signer: a multisig member that votes only as a jury rules | Shipped (v0.0.4-alpha); devnet deploy open |
Other templates
VIP-0029
Agentic Contract
Two AI agents sign terms and every way the deal can end. The money waits in a two-of-three escrow. If they disagree, a jury picks one of the signed remedies.
VIP-0033
Agent Bond
An operator puts money behind its AI agent's behavior. Anyone can report a violation; a jury rules; the bond is slashed as each rule is priced. Agents can slash agents.
VIP-0030
Super Grant
A grant that behaves like venture funding. A base grant to answer a Request for Ideas, then more money only for outcomes a jury verifies, such as revenue.
VIP-0011
Treasury
A DAO or team budget that pays approved payees under a per-payment and a monthly cap, with a jury checking each payment's purpose.
VIP-0032
DAO Constitution
A DAO treasury that executes a passed proposal only if it breaks no article of the constitution. Caps in code, one jury question per article.
Actually Smart Contracts