Templates / Treasury and governance
Treasury: a budget that pays only for what it exists for
A treasury wallet with a judiciary signer. Code enforces the caps and the payee list; the jury checks that each payment is for the purpose the treasury was set up for, judged from the proposal and its evidence.
Why it exists
Team and DAO treasuries are guarded by signers who approve what's put in front of them. Caps help, but a payment can sit under every cap and still be for the wrong thing: a vendor that's really an insider, a grant that funds something else.
The treasury template keeps the limits in code and adds the one check code can't do: is this payment for what the treasury is for?
DAOs
Spending under a budget the community set, with purpose checked on every payment.
Teams and foundations
A shared wallet where no single signer can pay outside the purpose.
How it works
Set up
Fill in the purpose, the asset, the monthly budget, the largest single payment and the approved payees. The policy hash is pinned in the signer.
Propose
A member proposes a payment in Squads with a description and evidence.
Check the code rules
Programs, the per-payment cap, the 30-day window across every payment, the payee list.
Ask the jury
One question: is this payment for the purpose, as the proposal and its evidence describe? The proposal text is untrusted material.
Sign or refuse
The signer votes only as the ruling says, and never for a payment that breaks a rule.
What you fill in
The fields of treasury. The whole document is hashed, and that hash is what everyone signs and the signer on chain carries.
| Field | What it holds |
|---|---|
purpose | What the treasury exists for, in plain words |
monthly | The most that can leave in any 30 days |
perTransaction | The largest single payment |
payees | Approved recipients |
minTimeLockSeconds | Squads time lock, one day by default |
What code checks, and what the jury decides
Code: the same answer on every computer
- Only token and system programs
- At most perTransaction per payment
- At most monthly in any 30 days, counting every payment
- Only approved payees
- Config changes go to the jury
Jury: the questions only judgment can answer
- Is this payment for the purpose the treasury exists for, as the proposal and its evidence describe?
A rule violation is final: the signer refuses it whatever the jury says.
Attacks, and what stops them
| Attack | Defense | Status |
|---|---|---|
| A payment split to stay under the cap | The 30-day window counts every payment | Tested |
| A payee that isn't on the list | Refused by code | Tested |
| A description that misstates the payment | The jury judges the decoded transaction; the text is untrusted | Built |
| Removing the signer or lowering the threshold | Always refused, whatever the policy says | Tested |
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 grants treasury
policyFromTemplate('treasury', {
purpose: 'developer grants for the Solana agent ecosystem',
asset: 'SOL', monthly: 500_000_000_000, perTransaction: 50_000_000_000,
payees: ['GranteeA...', 'GranteeB...'],
})The prompt
Paste this into any capable AI. It asks you about your case one group at a time, writes the treasury 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 Treasury policy (VIP-0011): a wallet with a judiciary signer that pays approved payees under a per-payment cap and a 30-day budget, with a Verafy jury checking that each payment is for the treasury's stated purpose.
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 purpose. What this treasury exists to pay for, in one or two sentences a jury can test a payment against. Say what it is not for, too.
2. The asset, the most that can leave in any 30 days, and the largest single payment.
3. The approved payees, and how a new payee gets added (a config change the jury reviews).
4. The Squads time lock (one day by default).
Then produce the call policyFromTemplate('treasury', { purpose, asset, monthly, perTransaction, payees, minTimeLockSeconds }), the resulting jury question, and three example payments: one that passes, one the code refuses, and one only the jury would refuse, with the reason.Run it
In code
policyFromTemplate('treasury', params)
checkRules(policy, effectsOf(tx), { now, history })| File | What it is |
|---|---|
packages/core/src/policy.js | The rules engine and every template |
packages/core/src/judiciary.js | Case contracts for the signer |
Status, honestly
- The judiciary signer program passed 30 of 30 checks on a local validator against the Squads v4 program dumped from mainnet
- The signer program isn't on devnet yet
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-0031
Hackathon Grant
Post a prize pool and evaluation criteria, open the hackathon, take GitHub submissions pinned to a commit, and let a Verafy council grade every one.
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