
Encrypted Apps
chancery
post-quantum dark RFQ and atomic OTC settlement on QoreChain: rival desks cannot read your quote, rogue makers get slash
About
Chancery is a post-quantum dark RFQ and sealed OTC block-trading desk deployed live on QoreChain Diana (Chain 9800). When a DAO treasury, validator, or RWA fund needs to move a large block of QOR, fETH, or fUSD, public DEXs leak intent to MEV sandwichers and Telegram OTC chats leak order size to rival desks ("desk shading") while exposing permanent Harvest-Now-Decrypt-Later (HNDL) risk. Chancery solves this end-to-end with QoreChain's native post-quantum stack: - Multi-recipient ML-KEM-1024 QoreSeal envelopes: Takers seal RFQs only to selected Maker Desks and a Compliance Auditor. The stateless blind relay holds zero decryption keys and forwards opaque ciphertext in <200ms. - Cryptographic blindness between competing desks: Each Maker signs a gasless firm quote with ML-DSA-87 and seals it exclusively to the Taker and Auditor. Rival Makers cannot decrypt competing quotes (proven live in the 3-Perspective Cryptographic Inspector via QoreSealError). - Atomic DvP, Split-Tranche Stealth Escrow, and Netted Epoch Clearing: Winning quotes settle on-chain in QoreDarkDesk.sol (0xeEB70eda747159DC88dDF5698DD7E6F098469540), verifying raw ML-DSA-87 signatures via precompile 0x...0a01 and checking active Cosmos PQC key registration via precompile 0x...0a02. - Economic enforcement: Makers post slashable collateral bonds. If a rogue maker pulls liquidity after signing a firm quote, the Taker submits the signed quote on-chain and slashes 5% (50% to the Taker, 50% to the Treasury). - Hash-anchored Compliance Audit: Every fill anchors keccak256(auditBundle) on-chain. Auditors decrypt {rfq, allQuotes, winningFill} locally, and flipping a single ciphertext byte triggers AuditHashMismatchError before decryption.
How it's made
Architecture: Chancery is a TypeScript + Solidity monorepo (Foundry + pnpm workspaces) with four layers: 1. On-chain Settlement (contracts/src/QoreDarkDesk.sol, live at 0xeEB70eda747159DC88dDF5698DD7E6F098469540, Block 11091241): Verifies raw ML-DSA-87 digests through QoreChain's 0x0000000000000000000000000000000000000a01 precompile (pqcVerify) and enforces active post-quantum key registration via 0x0000000000000000000000000000000000000a02 (pqcKeyStatus). Supports three settlement rails: Instant Atomic DvP, Split-Tranche Stealth Escrow (multi-chunk delivery to fresh stealth addresses), and Netted Epoch Clearing (batching offsetting fills into net deltas with zero fill prices in calldata), plus slashable maker bonds and room-epoch-gated Institutional RWA rooms. 2. Shared Post-Quantum Protocol (packages/shared): Canonical domain-separated signing digests matching Solidity byte-for-byte, @qorechain/qoresign ML-DSA-87 signing/verification, and @qorechain/qoreseal multi-recipient ML-KEM-1024 + X25519 hybrid encryption and tamper-checked audit bundles. 3. Stateless Blind Relay & Autonomous Maker Desks (apps/relay, packages/maker-sdk): Zero-key WebSocket/HTTP relay with strict TTL memory eviction and 3 autonomous quoting desks (Atlas, Bastion, Vanguard) seeded live on qorechain-diana (each registered a Cosmos ML-DSA-87 key via MsgRegisterPQCKeyV2, opened an EVM Authorisation Window via MsgOpenEVMWindow, bound its desk key, deposited QOR, and posted a slashable bond across 15 live on-chain txs). 4. Editorial Desk UI (apps/web, Next.js 15 + Tailwind + Wagmi + RainbowKit + @qorechain/qorex-rainbowkit): Built for 1-click judge testing with live relay mode, 3-Perspective Cryptographic Inspector (Taker / Rival Wiretap / Compliance Auditor), 1-byte tamper test, and rogue-maker slash proof. Kits & Network Features Used: - @qorechain/sdk and @qorechain/evm (unified Cosmos/EVM derivation, EthNativeSigner, MsgRegisterPQCKeyV2, MsgOpenEVMWindow) - @qorechain/qoreseal (multi-recipient ML-KEM-1024 + X25519 envelope encryption) - @qorechain/qoresign (ML-DSA-87 signing and verification) - @qorechain/qorex-rainbowkit (QoreX wallet integration) - @qorechain/qorescan (generated CycloneDX 1.6 CBOM at docs/cbom.json) - Precompiles 0x...0a01 (pqcVerify) and 0x...0a02 (pqcKeyStatus) What Was Hard: - Matching Solidity ABI-encoded digest packing byte-for-byte with TypeScript @qorechain/qoresign raw ML-DSA-87 digests (no EIP-191 prefix) across Instant DvP, Split-Tranche, Netted Epoch, and Slash payloads. - Wiring QoreChain's dual-lane EVM authorization flow in our testnet seeder: every autonomous Maker Desk had to register a hybrid Cosmos ML-DSA-87 key with proof of possession and open an EVM window before submitting EVM bond and deposit transactions. - Proving cryptographic blindness and tamper detection interactively in the browser without leaking any plaintext or keys to the relay. Verification: 78 deterministic automated tests passing (41 Foundry contract tests + 37 Vitest tests across shared, maker-sdk, relay, and web), live Chain 9800 deployment evidence in docs/evidence/chain-9800-deployment.json, and CycloneDX 1.6 CBOM in docs/cbom.json.
Timeline
Pushed 29 commits to main
- cc20892 chore(deploy): fix Vercel Google Fonts build and publish live URL · faroukobayanju
- 4ccebba chore(brand,deploy): add Chancery vector SVG marks and Vercel monorepo config · faroukobayanju
- e9ec38f feat(web): upgrade Chancery to Light Editorial Swiss-Institutional UI · faroukobayanju
- 99f412d chore(brand): rebrand to Chancery with Chain 9800 proof evidence and new 16:9 cover · faroukobayanju
- 4806f67 docs(brand): rebrand to SealDesk with new 16:9 cover, PRODUCT.md, and DESIGN.md · faroukobayanju
and 24 more commits
New project.
Comments and questions
- No comments yet.