Skip to content
QORECHAIN
Register

Quantum Pass

Allowance

Pocket money the chain keeps honest: an allowance whose every spend is an ML-DSA-87 signature checked on chain.

Share on X

About

Allowance lets you give someone QOR to spend with a rule you set: so much a day, week or month, at most so much in one payment, and optionally only to people you name. They spend it themselves, one signed message per payment. AllowanceVault on QoreChain refuses anything the rule doesn't allow, and every spend and every change is an ML-DSA-87 signature the vault checks itself with pqcVerify. A stolen classical key spends nothing. Live: https://allowance-qore.vercel.app Try it in a minute: https://allowance-qore.vercel.app/try (a demo allowance to spend) Code (MIT): https://github.com/justhereandthere/allowance WHY Sending crypto means sending all of it. Give a sibling, a teammate or a helper some QOR and it's theirs to spend however they like: no "10 a week", no "only at these shops", no taking it back. Allowance hands it over with the rules attached, enforced by the chain rather than by trust. WHO IT'S FOR • Pocket money: 10 QOR a week for a younger sibling, spent where they like, never more than you gave. • A team budget: a weekly budget for a moderator or contractor, payable only to vendors you name. • Someone's errands: cover a helper's costs with a cap on every payment. • Your own spending: put your weekly budget in an allowance to yourself, and freeze it on a bad day. HOW IT WORKS 1. You give: write the rule and sign it in QoreX, then fund it with one transfer into the vault, signed with your secp256k1 and ML-DSA-87 keys together. 2. They spend: each payment is one message the spender signs in QoreX, naming who gets paid and how much. No gas. 3. The chain decides: the vault rebuilds the exact text, reads the signer's key with pqcKeyStatus (proof of possession required), checks the signature with pqcVerify, then the rule. Allowed, the money moves. Not allowed, it says why. 4. You stay in charge: top up, change the rule, freeze it, or close it and take back what's left, each signed with your own post-quantum key. WHAT THE VAULT REFUSES • More than this period's limit (OverLimit) or the per-payment cap (OverPaymentCap) • Paying someone not on the owner's list (RecipientNotAllowed), or anything while frozen (Frozen) • A payment signed by a stolen classical key, or a signed payment redirected or re-priced (BadSignature) • The same signed payment twice (NonceUsed) • The spender raising their own limit or closing it to pocket the rest (BadSignature) • Crediting QOR the vault never received, or one transfer twice (NotFunded, FundAlreadyUsed) The page warns before anyone signs; forced, the vault refuses on chain and the passbook stamps it REFUSED. TRY IT Switch QoreX to the testnet, open /try, and get a demo allowance: 1.5 QOR, 1 QOR a week, at most 0.5 a payment. Pay 0.3 (PAID), try 0.6 (refused: over the payment cap), and spend past the week's 1 QOR (refused: over the limit). Or use Give an allowance to be the owner. QUANTUM PASS EVIDENCE • create-qorechain-dapp 0.14.0: the first commit is the untouched viem-wagmi and foundry scaffolds. • QoreX: enable, getKey, signArbitrary and signAndBroadcast. • Deployed on testnet: AllowanceVault 0x724a3d08647c2F623c4Ed1187c5773ca2e5B2cDf (qor1wf9r6zry0shky0zw6yv8c4mnegh9ktxl82xr6n). • Hybrid-signed transaction: funding allowance #2 from QoreX, 8986F5CB3582F6AC99444596681F39991AF4F604125BBDCBD1C5C178C605DCE8, verified with inspectTransaction before the vault credited it. • 139 tests: 35 contract tests with real ML-DSA-87 signatures, 104 web and API tests.

How it's made

Started from create-qorechain-dapp 0.14.0: web/ from the viem-wagmi template, contracts/ from the foundry template. The first commit is the untouched scaffold; the template's window.ts registered the relayer's and demo owner's ML-DSA-87 keys (with proof of possession) and opened the deploy window. CONTRACT: AllowanceVault.sol (Foundry, no owner, no upgrade path) • openMessage / payMessage / changeMessage / closeMessage build the exact text a person signs (QoreSign message-signing v1). The page asks the vault for it, so the signed bytes are the vault's own. • Every check: expiry (at most an hour), nonce unused, pqcKeyStatus (0x…0a02: registered, ML-DSA-87, possessionProven), pqcVerify (0x…0a01) over "qorechain-msg-v1|qorechain-diana|" + text, then the rule: period limit, per-payment cap, recipient list, frozen, balance held. checkPay / checkOpen / checkChange / checkClose are free dry runs of exactly what the writes do. • Money in: QoreX transfers to the vault's qor1 address land as its EVM balance (proved on chain before any server code was written). The relayer can credit an allowance only with QOR the vault holds and has not allocated (balance − totalHeld), and each transfer only once. • Periods: day, week or month, counted from the rule's start; a new rule starts a fresh period. available() returns what's left and when the period ends. • 35 tests. The pqcVerify stand-in runs real ML-DSA-87 through vm.ffi (the QoreChain pqc kit) and every test signs with real keys: the life of an allowance, limits, caps, recipients, a thief's own key, redirected and re-priced payments, replays, expiry, keys without proof, the relayer crediting money that never arrived or one transfer twice, freezing, rule changes, closing, daily and monthly periods, and a fuzz test of single flipped bits. SERVER: Vercel Functions, no database • api/open, api/pay, api/change, api/close: QoreSign verifyMessageWithChain on both halves, the vault's dry run, then the relayer; progress streams back step by step (NDJSON). • Funding is checked with QoreSign inspectTransaction: committed, tier pqc with a verified ML-DSA-87 layer, sent to the vault, the memo naming this request (or allowance), from the owner, never used before. • The relayer is an eth-native account with its own ML-DSA-87 key; it opens its EVM window itself with a hybrid-signed MsgOpenEVMWindow scoped to the vault (allowed_targets = [vault]). • api/demo: a demo owner signs an allowance with its own ML-DSA-87 key and funds it with a real hybrid-signed transfer, so any visitor can try spending in a minute. WEB: Vite + React, reading the vault over the EVM JSON-RPC • A savings-passbook design: ruled ledger, a limit meter, PAID and REFUSED stamps. • The spender's form checks ruleAllows before signing; "Try anyway" shows the vault refusing on chain. • 104 tests: the API flows (every dry-run refusal stops before the relayer), the funding check, request parsing, QOR amounts, the refusal list checked against the Solidity enum, address encodings. KITS @qorechain/sdk, @qorechain/evm, @qorechain/qoresign, @qorechain/qorex-types, @qorechain/pqc, create-qorechain-dapp. WHAT WAS HARD • Ordinary QoreX accounts can't send EVM transactions, so payments are signed messages relayed to the vault, and funding is a plain QoreX transfer the vault can only count once and never over what it received. • Keeping the relayer harmless: it submits and pays gas, but cannot sign for anyone and cannot invent money; its window reaches only the vault. • macOS opens wallet popups on their own space, so the demo video composites the real QoreX approval over the page. Built with Claude Code; the workflow, the generated work and the human decisions are in AI_USAGE.md.

Timeline

AllowanceQuantum Pass

Pushed 1 commit to main

  • 4ec8c6e Test the step stream: progress, refusals, and no internal error text · justhereandthere
AllowanceQuantum Pass

Pushed 1 commit to main

  • d70f898 Test: refusals pass through, internal errors do not · justhereandthere
AllowanceQuantum Pass

Pushed 1 commit to main

  • 78b2d0b Add CHANGELOG.md · justhereandthere
AllowanceQuantum Pass

Pushed 1 commit to main

  • 6fea2e5 Add SECURITY.md: private advisories, scope, the review and the threat model · justhereandthere
AllowanceQuantum Pass

Pushed 1 commit to main

  • 551def0 Threat model: known limits from the AI security review · justhereandthere
AllowanceQuantum Pass

Pushed 2 commits to main

  • 1df8a32 Security: internal error text stays in the server log (AI review F-6) · justhereandthere
  • d1dba26 Docs: the AI security review; correct the claim that refused payments are refused on chain (they are refused by checkPay before anything is written) · justhereandthere
AllowanceQuantum Pass

Pushed 7 commits to main

  • e396c17 Demo video: give, spend, refused over the cap and the limit, freeze (recorded on the live site) · justhereandthere
  • c06a45a README with requirement-to-evidence map, threat model, try-it guide, AI usage, cover, licence, CI · justhereandthere
  • b090331 139 tests: vault periods and lifecycle, every API flow, the funding check · justhereandthere
  • 791f864 Web: passbook design, give, try, mine and the allowance page · justhereandthere
  • 927efc7 Server: open, pay, change, close, top up and a try-it-now demo, all streamed · justhereandthere

and 2 more commits

AllowanceQuantum Pass

Pushed 1 commit to main

  • dc31a7f AI_USAGE: the full record of how the agent built it, checked it, and what the human decided · justhereandthere
AllowanceQuantum Pass

Pushed 1 commit to main

  • 9ca77c3 Link the demo video: README, landing and footer · justhereandthere
AllowanceQuantum Pass

Pushed 1 commit to main

  • 49dbd00 README: Built on QoreChain badge and fest project page · justhereandthere
AllowanceQuantum Pass

New project.

Comments and questions

  • No comments yet.