Skip to content
QORECHAIN
Register

Post-Quantum AI Agents

Tollgate

Pay-per-call payment channels for AI agents: 1,000 calls, 2 settlements, limits the model cannot override.

Share on X

About

AI agents pay for APIs one call at a time. Settling each call on chain is too costly, and giving an agent a wallet means trusting the model. Tollgate gives the agent a payment channel: it signs a cumulative ML-DSA-87 voucher per call (off chain, no gas), and the provider settles whenever it likes. On testnet, 1,000 paid calls were settled with just 2 claims (about 311k gas each, one triggered automatically when the agent exited), with 1000/1000 ML-DSA-87 receipts verified. The agent never holds the owner's keys. It spends through a linked ed25519 key whose limits the chain enforces (2 QOR per tx, 5 QOR per day, only four escrow calls). It can only pay providers the owner approved with an ML-DSA-87 signature, and it cannot choose who signs its vouchers. In a real Claude Sonnet session over MCP, the model refused a prompt injection, the chain refused its 5 QOR deposit, and one claim settled its 3 paid calls. Before paying, Tollgate checks the chain through QoreChain's own MCP server. Paid calls can also be sealed with QoreSeal: ML-KEM-1024 encryption both ways, to keys both sides publish in QoreChain's KEM key registry, so a paid call stays private after Q-Day. Try it: the live demo reads the channels from testnet, lets you run four attacks against the escrow, and verifies real vouchers in your browser.

How it's made

ChannelEscrow.sol (Foundry: 37 tests with real ML-DSA-87 via pqc-forge, including a stateful invariant suite). x/abstractaccount (MsgUpdateSpendingRules, MsgRegisterAuthenticator, MsgExecuteEVM) through @qorechain/sdk. Signed bytes (vouchers, receipts, approvals) are QoreSign message-signing-v1, built with @qorechain/qoresign and byte-identical to the contract's texts. The provider is a Node HTTP API (402 without a voucher, ML-DSA-87 receipts, persisted vouchers, auto-claim on exit). The MCP server is built on @modelcontextprotocol/sdk; its preflight uses QoreChain's read-only MCP server (@qorechain/mcp). Demo page: Vite + React + viem on Vercel, read-only, no keys. Crypto inventory: QoreScan CBOM (docs/cbom.json). Two real Claude sessions are in docs/claude-session and docs/claude-session-2. An independent review found a high-severity bug (key rotation could void earned vouchers); it is fixed and regression-tested. Platform finding: MsgExecuteEVM logs aren't indexed by eth_getLogs. Full run: docs/TESTNET_RUN.md; threat model: docs/THREAT_MODEL.md. Built with Claude Code; see AI_USAGE.md. Sealed calls use @qorechain/qoreseal (ML-KEM-1024 only, keys from the on-chain KEM registry; the voucher is the request's associated data and the receipt signs the sealed bytes); see docs/TESTNET_RUN.md section 14.

Timeline

TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • b9e5f22 Sealed calls with QoreSeal: ML-KEM-1024 both ways, keys from QoreChain's KEM key registry · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • da965d1 Link the updated demo video · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • 96cc9f1 Build signed bytes with the official QoreSign package (@qorechain/qoresign) · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Newly verified on chain: MCP server or qore CLI, QoreScan

TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • a7158eb Live demo page, QoreChain MCP preflight, QoreScan CBOM · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 7 commits to main

  • 3efcce5 docs: link the demo video · JahanzaibMohsin9
  • b12ea58 agent: live demo scripts; MCP server resumes the open channel · JahanzaibMohsin9
  • 904d911 docs: make explorer links resolve on testnet · JahanzaibMohsin9
  • 2676f06 docs: live testnet re-run (1,000 calls, 2 claims incl. auto-claim), threat model, review notes · JahanzaibMohsin9
  • 0e998d7 fix(agent, provider, mcp): fresh channel state, persisted vouchers, exit auto-claim · JahanzaibMohsin9

and 2 more commits

TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • 72eb53a claude-session: strip local environment details from the raw stream · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • ae1f892 a real Claude session over MCP; provider opens its own scoped window · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • 56fc2cd agent: harden provider and MCP after second review; offline tests; injection re-run · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • 5fcb20e tests: deeper invariant runs (64 x 64); MIT in agent/ · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

Pushed 1 commit to main

  • 1f8b33d docs: QoreChain Build badge · JahanzaibMohsin9
TollgatePost-Quantum AI Agents

New project.

Comments and questions

  • No comments yet.