Back to Projects Gallery
Web3 & Smart ContractsActive DevelopmentTimeline: 2024 – 2025Role: Lead Backend & Financial Protocol Architect

Vortex — Multi-Chain Wagering & Financial Escrow Engine

High-frequency competitive gaming platform with append-only double-entry ledger, multi-chain Stellar & Base USDC settlement, and Azza in-app Nigerian Naira virtual bank rails.

The Problem

Traditional Web3 wagering platforms suffer from extreme onboarding friction (mandatory browser extensions, volatile gas tokens, slow on-chain block confirmations) while Web2 platforms lack auditability, transparency, and instant cross-border settlement.

The Architectural Solution

Designed and implemented an enterprise orchestration engine bridging Web2 frictionless auth (Supabase JWT) with instant, non-custodial crypto wagering. Features an append-only double-entry ledger in micro-USDC ($1\text{ USDC} = 1,000,000\ \mu\text{USDC}$), Blink merchant gateway with HMAC verification, dynamic virtual bank account generation (Azza Rail) for zero-crypto-friction Naira deposits, and atomic 5% rake / 95% payout escrow execution.

System Architecture & Flow

CANONICAL TOPOLOGY
[Vortex Player (Web/Mobile)]
      │
      ▼ (Authenticated Bearer JWT)
[Vortex Node.js / Express Core]
      ├── Dual Verifier: Layer 1 HMAC Webhook + Layer 2 Zero-Gas Read-Only RPC
      ├── Blink Service: Dedicated Stellar & Base USDC deposit addresses
      ├── Azza Adapter: In-App Virtual Bank Details (Auto fiat-to-USDC settlement)
      ├── Double-Entry Ledger: Append-only PostgreSQL with SELECT ... FOR UPDATE
      ├── Room & Matchmaker: Atomic mutual lock (60s window) & 5% rake escrow
      └── Authoritative Game Bridge: WebSocket integration with 100Hz headless engine

Engineering Contributions & Deliverables

  • Engineered sub-millisecond double-entry ledger ("Audio Money") backed 1:1 by real USDC in custody, mathematically eliminating double-spend attacks with row-level locks.
  • Constructed dual-layer zero-gas deposit verification: Layer 1 inbound merchant webhook notification + Layer 2 read-only direct RPC verification to confirm transaction receipt before ledger crediting.
  • Architected white-labeled Azza fiat on-ramp generating dynamic virtual Nigerian bank accounts so players can fund accounts in Naira without leaving the app.
  • Implemented atomic matchmaking escrow with 60-second mutual confirmation window, deducting stakes simultaneously across participants upon match start.
  • Built automated settlement pipeline: 95% winner payout and 5% platform rake distributed in an ACID transaction upon cryptographically signed game server outcome.
  • Authored comprehensive system specification, mathematical invariants, and algorithm documentation (ARCHITECTURE_AND_ALGORITHMS.md).

Formal Security Invariants Enforced

AUDITOR VERIFIED
[1]No Negative Balances: ∀ user u, balance(u) ≥ 0 at all states.
[2]Deposit Idempotency: Retried or replayed deposit webhooks are rejected via unique idempotency keys.
[3]Atomic Stake Escrow: Room stakes are deducted simultaneously; if any participant has insufficient funds at match start, the room transitions to CANCELLED with zero deductions.
[4]Zero Mnemonics: The backend never handles or stores private keys or seed phrases; all custody is delegated to Blink Merchant Gateway.
[5]Rake Conservation: Match payout (95%) + platform rake (5%) = 100% of escrow pot.

System Metrics

Settlement Currency100% USDC
Ledger Resolution1 micro-USDC
Platform Rake5% Pot
Physics Timestep100Hz Headless

Technology Breakdown

Core Runtime & Language
Node.jsExpressTypeScriptZod Contracts
Blockchain & Smart Contracts
Stellar USDCBase L2Blink Merchant GatewayRPC VerificationMicro-USDC Ledger
Backend & Protocols
REST API (/api/v1)WebSocketsHMAC SecurityState Machines
Databases & Ledgers
PostgreSQLSupabase AuthDouble-Entry Ledger Tables

Need a similar system designed?

I am available for contract development, smart contract auditing, and backend ledger architecture.

Hire Me for Your Project