Skip to content
QORECHAIN
Register

Post-Quantum dApp

FIRM

Firm Dutch offers the classical key cannot pull.

Share on X

About

FIRM is a settlement book for firm Dutch offers on QoreChain Diana. A maker locks an input token and signs one ML-DSA-87 price line. Anyone can fill the whole offer at the price the contract computes from that line and the block time; the output goes to the recipient named in the signature. A leaked classical key can pay gas for a relayer, but it cannot cancel, reprice, or redirect the inventory. The maker can cancel only with the post-quantum key, after a delay they signed. A fill that lands before that block still clears. On 30 November 2026 we ran the real workflow on Diana: Offer 4 was opened, cancelled at block 11,000,704, and filled at 11,000,707, 37 blocks before the delay matured. Offer 5 is live for the judges until 7 December 2026. The contract has no owner and no upgrade. The page reads the book live, shows the block sequence and every receipt, and keeps opening, cancelling, and withdrawing in the signed scripts. Testnet only. No real funds. The filler of the recorded offers is our second key.

How it's made

FIRM is one Solidity 0.8.28 contract, OfferBook, with a linear Curve library and domain-separated OfferBytes messages. There is no owner and no upgrade. The maker, cancel, and withdraw authority is an ML-DSA-87 signature verified by the Diana PQC precompiles at 0x0000000000000000000000000000000000000a01 (pqcVerify) and 0x0000000000000000000000000000000000000a02 (pqcKeyStatus); the classical key can pay gas but is not an authority in the book. The book is deployed at 0x9faf23f3014c0922ca7d70da87b6783a3d2b5619. Two QCAI reports score the build: stage 1 is 72/100 and stage 2 is 78/100, both medium. Every finding is mapped in docs/AUDIT.md, and the PDFs are in docs/audit/. The open, cancel, fill, approve, and deposit flow uses QoreChain hybrid MsgCrossVMCall transactions signed with @qorechain/sdk, @qorechain/pqc, and @noble/post-quantum. The frontend is Vite, TypeScript, and viem; it reads offers, block times, balances, and receipts directly from Diana and never holds a key. Browser deposit/fill needs an EVM authorization window; the page states that, and the scripts open the window. Opening, cancelling, and withdrawing stay in scripts. Foundry covers the curve, replay, classical-key rejection, and a balance invariant (32 tests). Forge uses a mock PQC precompile; npm run spike exercises the real ML-DSA-87 precompile. The hard parts were the cross-VM transaction path, the 512-byte signed payload, and making the block-order story readable without hiding the trust boundary. The book uses fETH and fUSD; fBTC is not used.

Timeline

FIRMPost-Quantum dApp

Pushed 237 commits to main

  • 7a167b4 Index the FIRM evidence. · U-GOD
  • cc87dfc Record the FIRM decisions. · U-GOD
  • dd3dbf9 Add the current workflow status. · U-GOD
  • b00813d Add the post-submission plan. · U-GOD
  • 210d128 Add the FIRM project brief. · U-GOD

and 232 more commits

FIRMPost-Quantum dApp

New project.

Comments and questions

  • No comments yet.