Skip to content
QORECHAIN
Register

Post-Quantum dApp

Keel

A wallet where a stolen key gets pocket change, and anything bigger needs a post-quantum signature.

Share on X

About

Keel is a wallet account on QoreChain built on one assumption: the key your browser uses every day will leak, or a quantum computer will one day work it out. So that everyday key can only spend a small capped allowance, and only while you are logged in. Anything larger (withdrawing to a new address, big sends, raising limits, unfreezing) needs a second key, ML-DSA-87, held in a separate Approver window. QoreChain's pqcVerify precompile checks that signature on chain, over plain-language text the contract itself writes, so you approve words you can read rather than a hash. Large sends wait in a 24-hour hold the owner can cancel. A built-in "Thief view" pretends the everyday key leaked and runs real attacks so you can see what a thief gets. Everything runs on the Diana testnet with test tokens of no value; nothing is on mainnet and no independent audit has finished. Limits and untested parts are listed in the README.

How it's made

Keel starts from one assumption: the key a browser uses every day will leak, or a quantum computer will work it out from public information. So that key, an ordinary ECDSA wallet key, is given only small, capped powers inside a session. Anything that could empty the account needs a second key, ML-DSA-87, a post-quantum signature scheme, and that signature is checked on chain by QoreChain's pqcVerify precompile against the key registered with pqcKeyStatus. The base layer came first: a fail-closed Solidity wrapper for the two precompiles (any odd answer reverts, nothing is read as "valid"), bitmap nonces, and a baseline experiment showing that a thief with a standard wallet key takes 6,000 of 6,000 from an ordinary vault and exchange. On top of it, Keel's contract renders the text that gets signed. The Approver, a separate screen that holds the ML-DSA key, fetches that text from the contract, re-renders the same call with its own encoder, and signs only if the two match byte for byte. The text and the signed bytes cannot differ, because the contract verifies the text it renders itself from the call's arguments. Then we attacked our own rules with a reference model. It found holes the design had claimed were closed: a thief with both keys could take 19,159 instead of the claimed 1,110 by adding the victim's balance as liquidity at a pushed price, and the wallet key could take 5,559 a day under a price crash held over a day instead of 600. Rule changes brought those to at most 1,106.46 and 550.24. Savers had lost 5,853 against a stated maximum of 2,500; after the changes the worst case stays inside the stated figure. A second, formal review (docs/FORMAL_SAFETY.md) then read every storage write for a path that lowers a victim's claim and found counterexamples. The ones fixed: a safe account that never agreed to receive could be named (C1), liquidator mode let a stolen wallet key spend the owner's balance on someone else's debt (C2), the tripwire and sheetExit could remove exits (C3), duplicate token symbols could make two signing texts read the same (C5), and the admin quorum and price brake were roles that could block a borrower's exit (C6, C10). The fix for the last group was deletion: no admin, constants only, and KeelLedger.seal() ends the deployer's power. The deployment diana-m4 is that build. Next came measurements on QoreChain's Diana testnet: logged out, the chain itself refuses every transaction; the wallet key alone cannot open a window or swap the registered key (22 attempts refused, nothing charged); a verified action costs 217.6k to 268.1k gas. Then the whole story ran in a real browser: a new user registered the ML-DSA key from the page, logged in with one approval, was refused a wallet-key withdrawal, approved it in the Approver, and a "Thief view" with only the wallet key took 0.00 of 450.00 once logged out. QoreChain was awkward in specific ways, and the app is built around them: Cosmos-lane messages signed in the page with a hybrid signature, a 5,000,000-gas cap on gas estimates, a 10,000-block limit on log queries, and a billing floor of half the gas limit.

Timeline

KeelPost-Quantum dApp

Pushed 25 commits to main

  • a28cc8b README: one demo video · kceehackathon
  • 2620517 Keeper is started every 5 minutes by an outside timer · kceehackathon
  • 81488a4 State the measured keeper schedule · kceehackathon
  • 6d19f49 Live run on diana-m4 repeated with the current interface: new record, screenshots and documents · kceehackathon
  • ed44270 README: diagram names the scheduled keeper job · kceehackathon

and 20 more commits

KeelPost-Quantum dApp

Pushed 1 commit to main

  • 692f3ba README: record the scheduled keeper crediting a deposit · kceehackathon
KeelPost-Quantum dApp

New project.

Comments and questions

  • No comments yet.