Section 02 / 03

Platform layers and the settlement hot path

Every settlement runs through a fixed twelve-step pipeline with a sub-500ms budget, bounded by security invariants that hold whether the trade is profitable or not.

Top-level architecture

Six layers, four business domains. Presentation and edge surfaces degrade independently of the core so a central outage never blinds active loads.

┌───────────────────────────────────────────────────────────────────────┐
│                  ESCROW FACTORY — PLATFORM LAYERS                     │
├───────────────────────────────────────────────────────────────────────┤
│ PRESENTATION     │ Web UI (Sponsor/Investor/Admin) · Mobile Driver    │
│                  │ Edge Dispatch Agent · Command Center Dashboard     │
├───────────────────────────────────────────────────────────────────────┤
│ API GATEWAY      │ REST + WebSocket · HMAC/Ed25519 · Rate limit · WAF │
├───────────────────────────────────────────────────────────────────────┤
│ CORE SERVICES    │ Identity & Authority · Policy Engine · Audit Ledger│
│                  │ Evidence Service · Workflow & Escalation           │
├───────────────────────────────────────────────────────────────────────┤
│ BUSINESS DOMAINS │ Core Escrow Engine   │ DIBS Freight OS             │
│                  │ SPV Factory          │ RubyVox Voice Gateway       │
├───────────────────────────────────────────────────────────────────────┤
│ DATA & INFRA     │ PostgreSQL (RLS) · Redis · Object Storage          │
│                  │ pgvector (RAG) · Durable Queue · Key Vault         │
├───────────────────────────────────────────────────────────────────────┤
│ INTEGRATIONS     │ EVM (Arbitrum/zkSync/Base) · Chainlink/Pyth        │
│                  │ Axelar/LayerZero · Telnyx · RubyVox · Telematics   │
└───────────────────────────────────────────────────────────────────────┘

Hot path — end to end in ≤ 500ms

The pipeline is deterministic and instrumented per stage. Relay acceptance is not treated as success; only inclusion plus two confirmations closes a cycle.

StepComponentImplementation
1Decode chain eventBinary decoders for EscrowCreated, Funded, Released, Disputed
2Normalise stateImmutable versioned snapshot (monotonic block version)
3Update graphLock-free adjacency list; nodes = wallets/contracts, edges = obligations
4Generate cyclesBounded DFS (≤ 4 hops, ≤ 500 candidates) to net obligations
5Quote routesFixed-point arithmetic, no floats; on-chain oracles for FX
6Risk / profit filterReject if profit < gas × 1.2 or slippage > 0.5%
7Concurrent simulate10–20 parallel simulations on local forked nodes (Geth/Arbitrum)
8Calldata constructionMulticall batching of escrow releases
9Reserve nonceAtomic counter (Redis), global per signer
10Build bundleMEV-relay bundle: settlement tx plus optional backrun
11SubmitPrivate relay (Flashbots/EDEN) with target block, max fee, bundle ID
12Track & reconcileAsync inclusion plus 2 confirmations; relay acceptance ≠ success

Security invariants

Execution

  • All external targets allowlisted.
  • Minimum output and minimum realised profit enforced on-chain.
  • Flash liquidity fully repaid within the same transaction.
  • No arbitrary token approvals derived from route data.
  • Emergency pause prevents new execution.

Keys and telemetry

  • Nonce allocation atomically reserved per signer.
  • Secrets never enter logs, traces, or crash dumps.
  • Isolated signer (HSM/KMS); the hot-path process never holds an unrestricted private key.
  • Every decision writes a hash-chained audit entry.

Settlement targets

Chains, oracles and bridges the engine settles across.

  • Arbitrum
  • zkSync
  • Base
  • 5-second finality
  • Chainlink
  • Pyth
  • Axelar
  • LayerZero