Security, Legal & FAQ

Security Audit & Invariants

Security is the foremost priority of the QanVault architecture. This document provides a summary of the security audit methodology, static analysis results, and formal invariant test suites.


Security Verification Checklist#

Security DimensionDefense MechanismVerification Status
Reentrancy ProtectionOpenZeppelin ReentrancyGuardTransient on all state-mutating methodsPASS
Solvency InvariantsHardcoded 10,000 bps accounting vector; mathematical equality checksPASS
Integer ArithmeticNative Solidity 0.8.24 overflow and underflow checks enabledPASS
Frontrunning MitigationTwo-phase commit-reveal protocol with block-hash anchoringPASS
Access ControlOpenZeppelin Ownable2Step with explicit two-step transfersPASS
Token SafetySafeERC20 used for all external token transfersPASS
Unclaimed Prize SafetyAutonomous 72-hour rollover without operator discretionPASS

Invariant Fuzzing Results#

The test suite uses Foundry and Echidna property-based fuzzing to verify core invariants across millions of randomized transactions:

Invariant 1: Total Escrow Conservation

\forall S: \quad \text{Vault Balance} \ge \text{Sum of All Unclaimed Pots}
  • Fuzzing Runs: 500,000 randomized state sequences
  • Violations Found: 0

Invariant 2: Disjoint Ticket Ranges

\forall i \ne j: \quad [T_{\text{start}}^{(i)}, T_{\text{end}}^{(i)}] \cap [T_{\text{start}}^{(j)}, T_{\text{end}}^{(j)}] = \emptyset
  • Fuzzing Runs: 500,000 ticket mint simulations
  • Violations Found: 0

Invariant 3: Rollover Zero-Loss Transition

\forall \text{Rollover}: \quad \Delta \text{Total Liabilities} = 0
  • Fuzzing Runs: 100,000 expired draw simulations
  • Violations Found: 0

Static Analysis (Slither & Mythril)#

Static analysis was performed using Slither v0.10.0 and Mythril:

  • High Severity Findings: 0
  • Medium Severity Findings: 0
  • Low Severity Findings: 2 (addressed in final release: added explicit event emissions on all administrative parameter updates).

Bug Bounty Program#

QanVault encourages white-hat security researchers to examine the protocol codebase. Responsible disclosure guidelines and bounty tiers for critical vulnerabilities can be found in our security contact repository or by emailing [email protected].


Next Steps#