CCreate Pair
PROTOCOL SPECIFICATION // QUANTUM DEX (QNTM)WOpen Live WOTS+ Verifier

Post-Quantum WOTS+ RFQ Protocol on Elysium

Quantum DEX replaces elliptic-curve custody and order authorization with hash-based Winternitz One-Time Signatures Plus (WOTS+) authenticated inside Merkle trees. Security reduces solely to the preimage and second-preimage resistance of Keccak256 — a symmetric hash primitive unaffected by Shor's algorithm.

1. WOTS+ Cryptographic Parameterization

Both the Solidity verifier (WOTSPlusVerifier.sol) and the TypeScript browser/server engine (src/lib/wots.ts) share an exact 1:1 domain-separated Keccak256 layout verified by automated cross-language parity vectors.

ParameterValuePurpose
Hash Primitivekeccak256EVM-native 256-bit sponge; 128-bit post-quantum security margin under Grover
Winternitz Base (w)16 (MAX_STEP = 15)4-bit nibble encoding balancing signature size vs. EVM gas cost
Message Chains (LEN1)64256-bit digest split into 64 big-endian 4-bit nibbles
Checksum Chains (LEN2)3sum(15 - m_i) in [0..960], encoded as 3 big-endian nibbles to prevent chain-forwarding forgery
Total Chains67Fixed bytes32[67] signature array per proof
Merkle Tree Height4..8 (default 6 = 64 leaves)Single-slot uint256 leaf-burn bitmap tracks up to 256 one-time signatures per epoch
// Exact 71-byte domain-separated chain step (Solidity <-> viem encodePacked 1:1)
chainStep(pubSeed, leafIndex, chainIdx, step, x) =
    keccak256(abi.encodePacked(
        bytes32 pubSeed,     // 32 bytes
        uint32  leafIndex,   //  4 bytes (big-endian)
        uint16  chainIdx,    //  2 bytes (big-endian, 0..66)
        uint8   step,        //  1 byte  (0..14)
        bytes32 x            // 32 bytes
    ))

// Leaf & Merkle interior domain separation
leafHash = keccak256(0x00 || pk[0] || pk[1] || ... || pk[66])   // 2,145 bytes
nodeHash = keccak256(0x01 || left  || right)                    //    65 bytes

2. Honest EVM Threat Model

Standard EVM chains still require an outer transaction sender to pay execution gas. Quantum DEX separates gas transport from custody and trade authorization so a compromised ECDSA private key cannot steal vaulted assets or forge maker quotes:

  • Relayer-Agnostic Withdrawals: QuantumQuoteVault.withdrawWithPQProof accepts proofs submitted by any third-party relayer or fresh EOA. Funds release only when WOTSPlusVerifier.verify reconstructs the registered Merkle root over the domain-separated withdrawal digest and burns an unused leaf bit.
  • Balance-Guarded Keyset Rotation: Calling registerKeyset with ECDSA alone reverts with RotationRequiresPQProof() whenever nonZeroBalanceCount[account] > 0. Rotating an active funded keyset requires a valid WOTS+ proof from the current keyset via rotateKeysetWithPQProof.
  • Vault-Locked Maker Proceeds: When a taker settles an RFQ order through QuantumDexRouter.fillQuantumQuote, the taker's payment tokens are pulled directly into QuantumQuoteVault and credited to the maker's quantum-locked balance — never sent to an unprotected EOA.
  • Strict Replay Protection: Every burned leaf sets its bit in usedLeafBitmap[account][epoch] before external token transfers (Checks-Effects-Interactions + reentrancy guard), and every quote digest is marked in consumedQuotes[digest].

3. Smart Contract Architecture & Gas Benchmarks

Compiled with solc 0.8.24 (via_ir = true, optimizer_runs = 200) and verified via Foundry gas reports:

Contract / FunctionRoleMedian Gas
WOTSPlusVerifier.verify67-chain Winternitz reconstruction + Merkle path check95,254 gas
QuantumQuoteVault.withdrawWithPQProofVerify WOTS+ proof, burn leaf, debit vault, transfer ERC-20 / unwrap HYPE173,192 gas
QuantumQuoteVault.rotateKeysetWithPQProofPQ-authenticated epoch bump and Merkle root replacement203,052 gas
QuantumDexRouter.fillQuantumQuoteVerify maker WOTS+ quote, swap vault/ERC-20 legs atomically, update pair stats198,665 gas
QuantumDexRouter.cancelQuoteWithPQProofVerify cancel-domain WOTS+ proof and mark quote digest consumed214,325 gas

4. Elysium (Chain ID 99901) Registry

RPC: https://rpc.elysium.kinetiq.xyz | Explorer: https://elysium.kinetiq.xyz

Asset / ContractDecimals / TypeElysium Address
WHYPE (Wrapped HYPE)18 decimals0xbA876237B0F021A6c6D852d6c26E107997cC5E81
USDC (USD Coin)6 decimals0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65
kHYPE (Kinetiq Staked HYPE)18 decimals0x248888D396A546A69A188f3Deb476964e581E9d0
MONTRA (Montra)18 decimals0x063F7Cc5339f92a5FD7BaF3D22233044FdA1F327
Aerodrome CL kHYPE/WHYPE PoolSlipstream 6-word slot0()0x180Aa783D1cFFc984CECb27B710686146A8905Db
QuantumQuoteVaultPQ Custody Vault0x1957f8eA5E6bbcF26d5D06C735CF9231FF4Eb05f
QuantumDexRouterRFQ Settlement & Pair Factory0xEd547718Cc99e322fbD777363CeE88a75dD2C06c