About
Paying for a child's education is an eighteen-year promise. The keys that guard crypto savings today were not built to last that long: quantum computers are expected to break them, and NIST plans to retire today's public-key signatures by 2035. AI agents that move money add a second risk: they can be talked into paying the wrong person.
Burse is an education trust on QoreChain with an AI agent that runs it.
- A family funds a vault for one child, Amara. The agent reads invoices sealed to its post-quantum key, checks them, and pays listed schools within each term's cap.
- The agent cannot name an address or an amount. No tool takes one. It can only point at a school's own ML-DSA-87 signed invoice, and the vault checks that signature itself, on chain.
- If the signatures we trust today ever break, Q-Day mode stops trusting any new signature. A Playbook the parent signed beforehand keeps paying the school, and a paper Last Key (hash-based, keccak256 only) can still move the trust.
- The child's pocket money is a QoreChain smart account with spending rules. The chain refuses anything over the limit.
- At 18 the child becomes the guardian. Whatever is left after school goes only to the child.
What we measured on Diana:
- Q-Day drill: an attacker holds the parent's own ML-DSA-87 key. 5 of 5 thefts refused, 0 fUSD taken. The same key drains an ordinary pqcVerify-only vault.
- 54 hostile inbox cases (prompt injection, forged invoices, fake tool calls) against a model that obeys every injection: 0 moved wrongly, 12 of 12 real invoices still paid. With a live Gemini model: 50 of 54 right actions, still 0 moved wrongly.
- Amara's whole school life, ages 10 to 22: 41 events and 120 Diana transactions, re-verifiable with no keys.
Try it with no wallet and no sign-up: be the school, be a pushy uncle, spend the float, or step through the Q-Day drill. Every result links to its Diana transaction.
How it's made
Architecture
- Contracts (Solidity on Diana's EVM): BurseVault (payments, caps, sunsets, Last Keys) with BurseAdmin (setup and admin, via delegatecall); BurseFactory (EIP-1167 clones and migration); BurseRegistry (schools and their payout addresses, with a 14-day delay on changes); LastKey (WOTS, w = 16, 67 chains, keccak256 only).
- Agent (Node): a fixed payment policy, a tool list where no tool takes an address or an amount, a swappable model (Gemini), and a journal that is ML-DSA-87 signed, hash-chained and anchored on chain.
- Web app: plain ES modules, no build step. The school's browser signs each invoice with ML-DSA-87 and seals it to the agent's ML-KEM-1024 key.
- Server: one process that sends the agent's Diana transactions one at a time, plus a judges' sandbox trust on the v4 contracts.
QoreChain features used
- Hybrid ML-DSA-87 transactions for every native message. Keys registered with proof of possession. MsgRotatePQCKey for the handover at 18.
- Scoped EVM window: each agent run opens MsgOpenEVMWindow aimed at this vault only, with maxTxs equal to the payments due, 200 blocks and a gas budget, then pays inside it.
- Solidity pqcVerify and pqcKeyStatus: the vault checks every invoice, approval, Playbook and handover against the signer's current key.
- QoreSeal and the x/pqc encryption key registry: invoice details are sealed to the agent's ML-KEM-1024 key.
- Smart account (x/abstractaccount): the child's float, with per-payment and daily limits and an expiring term key, relayed with MsgExecuteEVM.
- x/feegrant: the guardian pays the agent's gas, capped and expiring. Governance reads: the watcher spots MsgDeprecateAlgorithm proposals (it found Diana's proposal 4).
- fUSD test token.
- Kits: @qorechain/pqc, @qorechain/qoreseal, @qorechain/qoresign, @qorechain/wallet-adapter, @qorechain/sdk.
Testing and audit
- Foundry: 47 tests with real ML-DSA-87 through ffi; stateful invariants (money is conserved, an attacker never gains, caps hold, nothing pays in Q-Day mode); 18 of 18 deliberate bugs caught by the mutation check.
- QCAI: three audit runs. One finding was real: the school list had no cap, so a stolen key could make entering Q-Day mode run out of gas. Fixed in v4 (at most 16 schools, one-pass clean-up) and redeployed. Every other finding is answered in docs/AUDIT.md.
What was hard
- Making Q-Day mode safe when the attacker holds a valid key: every ML-DSA path refuses before it verifies, and only what was signed before Q-Day still pays.
- Fitting a hash-based Last Key into EVM gas: WOTS with w = 16, 67 chains, keccak256 only.
- Keeping time on a testnet: the vault refuses a fee paid two terms late, by design, and Diana's public endpoints sometimes took minutes a call.
- Being honest about the chain: on 2 Dec the smart account enforced its amount limits but executed an approve call its rule did not list. We documented it in the README.
Honest limits: Q-Day is a drill, the demo schools are labelled "(demo)", and the 18-year life ran on the v2 contracts. All of this is in the README.