
Post-Quantum dApp
Darwin
Crypto baskets that survive Q-Day: one token, a whole strategy, priced and rebalanced only with ML-DSA-87 signatures
About
Darwin turns a crypto portfolio into a single token. Four baskets are live on qorechain-diana: Blue Chip (70% BTC, 30% ETH), Balanced (35% BTC, 35% ETH, 30% USD), Qore Ecosystem (60% QOR, 25% ETH, 15% QWAKK) and Degen (70% QWAKK, 30% QOR). You buy a basket with fUSD from QoreX in one signature, and you exit by selling it back for fUSD. No EVM window, no grant, no gas to pay. A basket protocol has three keys worth stealing: the one that sets prices, the one that trades the vault, and the one that administers it. On Q-Day, a quantum computer can derive a secp256k1 private key from its public key. Darwin puts all three behind ML-DSA-87, verified on chain by QoreChain's pqcVerify precompile against keys registered with proof of possession. Every oracle round carries the reporter's ML-DSA-87 signature, checked before a single price is stored, with a 15% circuit breaker. Every rebalance carries the curator's signature over the exact trades, and reverts if it would lose more than 1% of NAV. Every admin action needs the admin's ML-DSA-87 signature. No admin power trusts msg.sender. Every user trade is a plain text message the user signs in QoreX with both keys. It is executed by the user's own DarwinAccount, a contract that only obeys the user's registered ML-DSA-87 key: it rebuilds the message (account, single use nonce, deadline, hash of the exact calls) and verifies it with pqcVerify before it touches the router. Darwin's relayer only pays the gas. It cannot change a trade and it cannot replay one. Every transaction Darwin itself sends is a MsgCrossVMCall signed with secp256k1 and ML-DSA-87. None of Darwin's accounts holds an EVM window, so the chain refuses any ECDSA only transaction from them: a stolen classic key moves nothing. QoreChain's explorer shows every kind of Darwin transaction as quantum-safe, verified on chain. You do not have to take our word for it. Every transaction page in the app verifies the ML-DSA-87 signature again in your browser, and shows that the same signature fails for the next nonce. Darwin is not new, it is already live on mainnet on another chain, Miden, with more than 150 user wallets. This project is its post-quantum port to QoreChain, built during the fest.
How it's made
Contracts. Solidity 0.8.28 with Foundry and OpenZeppelin. PqcAuth is the only place that calls pqcKeyStatus (0x0A02) and pqcVerify (0x0A01), and PqcAdmin puts every admin power behind it. DarwinOracle stores signed price rounds with a circuit breaker and a staleness limit. DarwinBasket is the ERC-20 share, with in kind mint and redeem and curator signed rebalances. DarwinReserve holds the inventory at oracle prices, because the EVM cannot call the native AMM. DarwinRouter buys or sells a whole basket for fUSD. DarwinAccount and DarwinAccountFactory give each QoreX user an account controlled only by their ML-DSA-87 key. Operations. TypeScript with the QoreChain SDK. Keys for every role come from one mnemonic, and each ML-DSA-87 key is registered with proof of possession. A keeper posts a signed oracle round every 10 minutes or on a 0.25% move, and runs the weekly rebalance on Mondays at 12:00 UTC. Each of its transactions is a hybrid signed MsgCrossVMCall, simulated first so a refusal is caught before sending. App. Next.js, forked from our mainnet front. It reads everything from the chain and trades through QoreX with the wallet adapter. Its server is the relayer: a pool of four hybrid signing accounts, idempotent, so a double click never sends a trade twice. The Security tab lists the oracle feeds and rounds, who can do what, and how Darwin signs. Each transaction page shows the chain's post-quantum evidence and the browser's own ML-DSA-87 verdict, computed with qorechain-pqc. Prices. BTC and ETH come from four spot APIs, QOR from its market price, and QWAKK from its only market, the QWAKK/QOR pool. The real testnet supply capped buys at tens of dollars, so the baskets hold fQOR and fQWAKK, test tokens that track the same prices and can only be minted with the admin's ML-DSA-87 signature. Tests. 110 contract tests (unit, fuzz, invariant). 28 on chain checks against the real precompiles: forged, tampered, replayed, stale and expired signatures are all refused. A signing audit found 519 of 519 Darwin transactions hybrid verified by the chain. A production battery with users trading in parallel ran 45 of 45 operations with 36 of 36 attacks refused. The browser suite passed 4 runs in a row on production. Every report, with its transaction hashes, is in docs/e2e. Hard parts. QoreX cannot sign EVM transactions, so trades go through an account that checks the user's ML-DSA-87 signature itself. The keeper first posted prices as EVM transactions, which the explorer labels not quantum-safe, so every Darwin transaction moved to the native lane. A cross-VM call costs about 2.5 times the EVM gas and leaves no EVM logs, so Darwin writes a memo on each transaction and decodes the calldata to read it back. Other surprises: an EVM window lasts at most 17,280 blocks; the ERC-20 conversions need about 2M gas and otherwise fail with a misleading balance error; the REST endpoint sends no CORS headers; and the testnet AMM priced QOR about 10 times above its market, so the oracle switched to market prices.
Timeline
Pushed 300 commits to main
- 9b68842 App: the Documentation button opens the QoreChain docs (docs.darwin.market/qorechain), not the Miden docs root · edenbd1
- 6422083 README: the proof on screen (Security tab, a round re-verified in the browser, one real trade on Darwin and on the QoreChain explorer), screenshots script · edenbd1
- c502472 README: a structure of its own (the numbers, the five keys, a trade from click to chain, claims with their proofs) · edenbd1
- 828029e Final runs: on-chain e2e 28/28, account check 9/9 (a replay is answered with its own transaction), pq-audit 519/519, explorer 11/11 · edenbd1
- 2ab0395 README for jurors and agents (in one minute, why, verify it yourself, evidence, measured gas, honest scope), llms.txt, keyless pq-audit, findings of the 2026-11-21 hardening, idempotent relayer docume · edenbd1
and 295 more commits
Newly verified on chain: AMM pools, Cross-VM, EVM to Native, EVM window (incl. scoped), Hybrid ML-DSA-87 transactions, PQC key registration with proof of possession, Test tokens fUSD, fETH, fBTC
New project.
Comments and questions
- No comments yet.