SecurityAudits

Audits

GX Chain Security Assessment

DetailValue
EngineGX Chain v0.1.0 (Rust, single binary)
Assessment DateMarch 25, 2026
Total Tests73 (SS-GX-001 to SS-GX-073)
Rounds4 testing rounds
ResultAll 73 tests passed

Test Priority Breakdown

PriorityCountStatus
Critical14All Passed
High14All Passed
Medium27All Passed
Standard18All Passed

Scorecard

AreaRatingNotes
Access ControlsStrongEIP-712 with low-s normalization, gap-tolerant nonces, per-account rate limiting
Architecture / DesignSufficientClean module separation, BTreeMap orderbook, crossbeam SegQueue
Arithmetic SafetyStrongoverflow-checks = true, no floating point, integer-only matching
ScalabilitySufficientMillions of operations per second sustained, single binary vertical scaling
UpgradeabilityModerateRequires process restart, no live upgrade mechanism
DocumentationSufficientAPI follows industry standard /v4/ format
Testing and VerificationStrongComprehensive test suite, benchmarks, strict linting
Operational ReadinessModerateDocker multi-stage build works, 3-validator testnet script exists

Modules Assessed

ModuleDescriptionRisk Level
orderbook/BTreeMap orderbook, price-time priority matchingCritical
api/auth.rsEIP-712 signature verification, domain separatorCritical
state/ledger.rsBlock application, state transitions, state hashCritical
api/rest.rsREST API handlers (place_order, cancel_order)High
node/validator.rsWebSocket handlers, block production loopHigh
state/accounts.rsAccount management, nonces, rate limitingHigh
state/positions.rsPosition tracking, PnL calculationHigh
risk/Margin, liquidation, circuit breakers, fundingHigh
consensus/Block production, RocksDB persistence, P2PMedium
config.rsNode configuration, market configsLow
indexer/PostgreSQL indexerLow

Assessment Methodology

  1. Manual code review — Line-by-line inspection of all critical paths
  2. Protocol-level analysis — Semantic analysis of design decisions
  3. Threat modeling — Per-module threat models identifying attack surfaces
  4. Adversarial testing — Simulated attack scenarios specific to perpetual futures
  5. State machine verification — Formal checking of consensus guarantees
  6. Performance testing — Hot-path allocation auditing, struct alignment

Scope

In scope:

  • All GX Core Rust modules (orderbook, state, risk, consensus, api, indexer, node, config)
  • Matching engine correctness, EIP-712 verification, margin/liquidation logic
  • REST and WebSocket API security
  • Block production and RocksDB persistence
  • P2P network protocol, Docker deployment

Out of scope:

  • Frontend (React/TypeScript, Privy wallet, wagmi)
  • External SDK and API interactions
  • External dependencies (RocksDB, PostgreSQL, tokio, axum internals)
  • GX BFT integration (not yet implemented at assessment time)
  • Deployment infrastructure (nginx, TLS, DNS)
  • Stress/load testing

Disclaimers

  • GX Chain is v0.1.0 experimental software
  • This assessment does not guarantee the absence of undiscovered vulnerabilities
  • The assessment was conducted on the codebase as of 2026-03-24
  • Incremental reviews are recommended after any code updates