Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

SpendGate: chain-enforced spending limits for agents

The chain enforces the agent's spending limits — per-tx, daily, and revocation — not the bot's own code.

Share on X

About

SpendGate is a fixed-bill payment agent for the QoreChain testnet (qorechain-diana). The Owner links an agent key to their account with an on-chain SpendingRule (per-transaction limit, daily limit, allowed denom, expiry). The agent attempts every bill; it deliberately contains no limit checks of its own, so enforcement is left entirely to the chain. Bills the chain refuses are recorded with the chain's refusal reason verbatim in an Owner approval queue. The Owner can revoke the agent key at any time; after revocation the chain refuses further payments. Demonstrated on-chain (2026-12-01, all tx hashes in the repo): 0.8 QOR paid; 5.0 QOR refused by the chain (per-tx limit 1 QOR); 0.5 and 1.0 QOR paid; 0.9 QOR refused after 2.3 QOR spent (daily limit 3 QOR); post-revocation payment refused ("linked key is unbound or revoked"). The uqor-only denom, send-only permission, and expiry are configured rule parameters, not claimed as tested refusals; no payee-allowlist claim is made (SpendingRule cannot express one). Anyone can re-check: node src/live.mjs verify re-reads every evidence transaction from the testnet and compares the inner result and refusal reason verbatim (allMatch: true). Raw REST responses are bundled in the repo so the evidence stays inspectable if the testnet endpoint changes.

How it's made

Original implementation written for this hackathon on the published @qorechain/sdk 0.14.0 authenticator helpers (no workshop repository code). The agent fetches the authenticator nonce from chain before every payment; signatures are nonce-bound. Outcomes are read from the inner authenticator execution result, never the outer tx code alone (spending-limit refusals land with outer code 0), and the client-side classifier fails closed. Evidence was collected live on qorechain-diana on 2026-12-01 and re-verified on 2026-12-02 (npm test 7/7, verify allMatch: true). AI assistance is documented in AI_USAGE.md.

Timeline

SpendGate: chain-enforced spending limits for agentsPost-Quantum AI Agents

Pushed 9 commits to master

  • c4a362a Cover image at 1920x1080 (form spec 16:9, min 1200x675) · luozhi0129(not counted: no real change)
  • f147145 Round-3 acceptance fixes: client-side fail-closed wording, review evidence · luozhi0129
  • 35c19bc Round-2 adversarial fixes: raw evidence bundle, committed queue snapshot, cover PNG, exhaustive-evidence and reproduce clarifications · luozhi0129
  • 020a136 Round-1 cross-review fixes: qualify denom/send-only as configured parameters, outer-code nuance, framing, video queue cut · luozhi0129
  • 34367d0 Fix status key wording in README and video script (P2 from package check) · luozhi0129

and 4 more commits

Comments and questions

  • No comments yet.