Pushed 1 commit to main
- 6cfa46c Fix dashboard keyboard navigation, recovery feedback and mobile overflow · hms1499

Post-Quantum AI Agents
An AI Guardian that rescues your tokens into a post-quantum vault when your ECDSA key leaks
When the classical (ECDSA) key behind a QoreChain account leaks, whether to malware, a phishing site or a future quantum attacker, whoever holds it can drain the account's ERC-20s while its EVM window is open. Blocks take 1.4 s, so a human notices too late. Q-Lifeboat gives each account an autonomous Guardian. It watches every Transfer and Approval from the account. The moment one goes somewhere the owner doesn't trust, it sweeps the remaining tokens into a GuardianVault that only the owner's ML-DSA-87 key can open. On diana the rescue lands 1–2 blocks after the attack and keeps 90% of the attacked token. The chain itself bounds the agent: its linked key may call only vault.rescue, which moves tokens from the owner to the owner's own vault and nowhere else. Fixed rules decide every rescue; the LLM only writes the incident summary. Each incident report is co-signed with the Guardian's post-quantum key and verified in the browser against the chain. Try it with nothing installed: https://q-lifeboat.fly.dev. Create a wallet, save your recovery code, turn on protection, attack yourself with 10 test fUSD, then withdraw with your recovery-code key. Testnet only (qorechain-diana).
Architecture - GuardianVault (Solidity, Foundry): owner and guardian are immutable. Only they may call rescue(), which only moves the owner's approved tokens into the vault. withdraw() needs an ML-DSA-87 signature over tag, chainId, vault, to, token, amount and nonce, checked on chain through the pqcVerify (0x…0a01) and pqcKeyStatus (0x…0a02) precompiles. Anyone may submit it; the post-quantum signature is what authorises. The nonce is bumped before any external call. - Guardian agent (TypeScript): watches the owner's Transfer and Approval logs every block (tip and logs in one batched RPC call). Fixed rules decide every rescue; an LLM only writes the incident summary, with a template fallback. The agent's linked ed25519 key carries an account spending rule that allows exactly vault.rescue and only uqor, so the chain itself stops it from moving tokens anywhere else. - Incident reports are signed twice: the agent's ed25519 key, plus a QoreSign hybrid co-signature (secp256k1 + ML-DSA-87) by the guardian. The dashboard verifies both in the browser against the chain. - Hosted product (Fly.io): a browser wallet whose ML-DSA-87 key comes from a QRC1 recovery code that is never stored. Hybrid txs (key registration, EVM windows, authenticator link) are signed in the tab. One Guardian runs per account, and every write to it carries the owner's ML-DSA signature. Network features used: hybrid accounts, MsgRegisterPQCKeyV2 with proof of possession, scoped EVM authorisation windows (targets, tx count, value, duration), authenticator links with spending rules (allowedEvmCalls / allowedDenoms), MsgExecuteEVM, and the pqcVerify / pqcKeyStatus precompiles. Kits: @qorechain/sdk, @qorechain/evm, @qorechain/qoresign, plus the build-before-qday workshop-2 vault and pq-agent patterns (credited in the README). What was hard - Testing assumptions on diana instead of trusting docs. 23 chain facts are recorded with tx hashes. One changed mid-build: token moves through the authenticator lane began to require listing the token in allowedDenoms, which would also let the key transfer it directly. We moved rescues to the guardian's own account, pinned as an immutable role in the vault. - Speed: a rescue must land within a block or two (1.4 s blocks). viem's 4 s block-number cache had to go. - A browser-only product: diana's REST and RPC send no CORS headers, so a same-origin proxy is needed, and the PQ key must never be stored. Measured on diana: rescue 1–2 blocks after the attack, 90% of the attacked token kept. Every claim has a tx hash in docs/EVIDENCE.md.
Pushed 1 commit to main
Pushed 1 commit to main
Pushed 1 commit to main
Pushed 4 commits to main
Pushed 4 commits to main
Pushed 198 commits to main
and 193 more commits
New project.