Skip to Content

Contracts and audit

The savings vault, its post-quantum checks, its tests and the two-stage QCAI audit.

ContractAddress (testnet)
VaultFactory0x4aa36338cfd4467377bAF3ABC887d08F61c56a91
Demo SavingsVault0xC4aEb5DE32F010ee590d3B7f7feB4123fD1066E4

Where the post-quantum checks happen

Call siteChecks
QorePqc.provenKey → pqcKeyStatus (0x…0a02)the owner's ML-DSA-87 key is registered, possession proven, algorithm ML-DSA-87; fails closed without the precompile
QorePqc.requireSignature → pqcVerify (0x…0a01)the owner's ML-DSA-87 signature over a message bound to chain id, contract, action, arguments, nonce and deadline
VaultFactory.createVaultthe caller (the vault's owner) has a proven key
SavingsVault.withdraw / cancel / setDailyLimiteach needs the owner's post-quantum signature

The vault pays instantly within a daily limit; anything bigger is queued 24 hours (WAIT = 24 hours) and can be cancelled; raising the limit also waits 24 hours. Every state-changing function is nonReentrant and writes state before paying.

Tests

cd contracts && forge test: 40 tests, including every signature binding (recipient, amount, chain, action, deadline, single use), fail-closed precompiles, re-entrancy, the 24-hour wait and one regression test per audit finding. CI runs them on every push.

QCAI audit

Two stages, as the Post-Quantum dApp category asks. Stage 1 (1 Dec, QCAIA-1796155274801-35B84098): 85/100. Every finding, our verdict and its regression test are in docs/AUDIT.md; the flattened sources are in docs/audit/. Stage 2 on the fixed contract (2 Dec) scored 85/100 too, re-raising the same five patterns; each is answered with its test in docs/audit/stage2-2026-12-02.md.

On this page