Aurex

Arbitrage Intelligence
AI: gpt-4o-mini
BTC SPOT:
DETECTION:
P99 COMPUTE:
FEEDS:0/5 live
EQUITY:$100,000.00
○ CONNECTING
TESTNET

Build Notes

Transparency for review: what the live system carries on top of the code submitted to GitHub.

The repository code submitted for judging is frozen at the deadline commit. The public deployment kept iterating after that date; every change over the frozen submission is listed, fully and honestly, below.

The goal is that reviewers can reconcile the two: what was judged is exactly the frozen commit, and what is live is that commit plus the extensions detailed on this page.

The 17 finalists voted for Option B: an official extension window through Sunday 12 Jul 2026 to expand the project (final-phase branch). Everything listed under "Final Phase" below is that official work, already merged to main and deployed.

Final Phase · Extension Window
FEED-SYNC FIX

Binance L2 sync rewritten to the official sequence rules (resync-storm fix)

  • The Binance diff-depth client treated stale overlapping events (normal replays for a few hundred ms after every snapshot) as sequence gaps, causing an infinite resync/reconnect storm that could keep the venue offline for hours while hammering the REST snapshot endpoint. Events are now classified per the official Spot rules — stale replays are dropped silently, snapshot-straddling events apply idempotently, and only true forward gaps resync. Covered by new deterministic unit tests.
  • A failed snapshot fetch (e.g. a REST rate limit) previously left the client buffering diffs forever with no recovery path; it now recycles the socket so the backoff reconnect cycle owns recovery, and the sync buffer is capped so a stalled fetch can never grow memory unboundedly.
RISK ENFORCEMENT

Every advertised risk knob is now actually enforced

  • maxTradesPerMinute was exposed in the schema and Risk page but never enforced; the RiskManager now applies it as a rolling 60-second booked-trade limiter (triangular fills consume the same budget), with deterministic unit tests.
  • maxPositionQuotePerExchange was likewise unenforced; a trade whose quote notional would commit more than the cap to a single venue is now rejected with an explicit reason.
TELEMETRY HONESTY

Telemetry and ledger honesty fixes

  • Trade provenance is now explicit end-to-end: every ledger row records whether it was a real testnet fill (signed IOC orders matched on an exchange test environment) or a simulator fill. TESTNET rows carry a badge in the Trade Ledger, the CSV export gained an execution column and was renamed from simulated_trades_*.csv to aurex_trades_*.csv (with testnet mode active, calling every row "simulated" was inaccurate), and the tag survives restarts via the persistence layer.
  • The Trade Ledger net-P&L cell hardcoded a green "+$" prefix, so a realised loss would have rendered as a glowing green "+$-3.21"; it now renders sign-aware amounts in green or red.
  • evals/sec now counts every evaluation cycle (including coalesced re-runs) instead of only the first book of a burst; trade events report the actually-filled volume (a 0.001 BTC testnet clamp is no longer narrated as the full theoretical size); the triangular loop honours per-exchange taker-fee overrides; sizing volumes are float-rounded so ledger rows never show 0.44999999999999996-style artifacts; and shutdown now disconnects all five venues.
PARAMETRIZATION

Deep runtime parametrization

  • Every previously-hardcoded engine constant is now a live, schema-validated (Zod), hot-applied knob in EngineConfig: sizing step, per-pair execution cooldown, circuit-breaker multiple, leg-fill failure probability, volatility-breaker %, consecutive-loss limit, loss/volatility cooldown durations, inventory rebalancing thresholds, and the statistical-arbitrage z-score gate — all editable from the Risk page with no restart.
  • Per-exchange taker-fee overrides with one-click Retail/VIP presets, so the operator can make the fee assumption explicit and adjustable instead of hidden.
AI · LIVE MODEL

Copilot upgraded to a real, live LLM — grounded on engine state

  • The AI Copilot — and every in-app AI widget (trade critiques, opportunity explanations, system-health diagnostics and risk calibration) — is now backed by a real model (OpenAI gpt-4o-mini) instead of the deterministic mock. It is reached through two secure server-side Next.js routes; the API key is read server-side only and never reaches the client bundle.
  • Answers are grounded on the live engine state (GET /state): the model reasons over the operator’s real P&L, risk config, recent fills and rejected windows, so it cites actual numbers rather than templated boilerplate.
  • Resilience is preserved and made honest: if the key is unconfigured or a request fails, each call falls back transparently to the deterministic mock so the demo never breaks — and the UI labels which mode produced the answer (live model vs. offline fallback) so the distinction is never overstated.
STRATEGY+

Statistical-arbitrage gate wired to execution

  • The rolling per-pair z-score (already computed for ranking) now optionally gates execution: when enabled, only windows more anomalous than a configurable threshold are executed, prioritising mean-reverting dislocations over merely-positive spreads.
ROBUSTNESS+

Deterministic robustness coverage

  • New unit tests exercise the configurable circuit breakers deterministically (volatility breaker trips at the configured %, consecutive-loss breaker trips at the configured limit and not before, and the loss streak resets after a win) — proving robustness rather than only asserting it.
REBALANCE+

Rebalancing visibility

  • The Wallets page now surfaces the active (operator-configurable) rebalancing thresholds per asset plus recent REBALANCE settlement activity pulled straight from the engine event stream.
ANALYTICS+

Max-drawdown metric

  • A max-drawdown figure (largest peak-to-trough equity decline) is computed client-side from the same equity history driving the P&L chart, alongside the existing win rate and honest Sharpe.
REAL EXECUTION

Real order execution on exchange test/demo environments

  • An optional executionMode: "testnet" routes arbitrage legs to real signed IOC orders on venue test environments — Binance Spot Testnet, OKX Demo and Bybit Testnet, all three verified live with real filled orders (six real-executable directed routes) — fake balances, no real funds, real matching engines. Falls back to the internal simulator per-trade if a leg is unconfigured or fails, so the default demo experience never depends on it.
  • The execution layer also gained a Coinbase Exchange sandbox real-fill leg (active when sandbox credentials are configured) and an honest Kraken dry-run: Kraken offers no public spot testnet, so its leg calls the real order-validation endpoint (validate-only) and the fill is transparently booked by the simulator — never presented as a real fill.
UI & METRICS FIXES

Dashboard coherence and Copilot accuracy fixes

  • Portfolio Equity is now starting allocation + realised net P&L; it previously summed the seeded per-venue wallet reserves, showing an incoherent multi-million figure that contradicted the initial-allocation label and the Live Net P&L card. KPI cards also gained responsive font sizing.
  • The cumulative trade count reports the true executed total instead of freezing at the 50-row display slice (which also inflated average profit per trade); the AI Copilot’s execution-cost figures were corrected for a scale mismatch against the engine’s cost model; and a Risk-page bug where sliders reset while being edited was fixed.
INFRASTRUCTURE

Redeployed backend with durable cloud persistence

  • The bot now runs on a new Fly.io app with Supabase Postgres persistence (trades, opportunities, balances, config and P&L survive machine restarts/redeploys — the previous state was ephemeral local storage), still in the Frankfurt region required to reach all 5 exchange feeds, on a single machine (the engine is a stateful singleton; a second machine would split state).
Pre-Final-Phase · Public Deploy Delta
REALISM

Execution realism & honest metrics

  • Stochastic two-sided fill drift: realised fills are drawn around the modeled adverse cost (Box–Muller), so the win rate is no longer a perfect 100%.
  • Cross-venue leg-execution risk: a fraction of approved trades fill one leg and miss the other, unwinding at a realised loss — the dominant real-world loss source.
  • Per-pair execution cooldown (60s): once a dislocation is captured the pair is not re-fired every tick, so cumulative returns are realistic instead of compounding an artificial spread.
  • SKIPPED window surfacing: sub-threshold venue pairs are recorded as transparently-rejected even on executing cycles, and the feed is status-balanced so SKIPPED is never empty.
STRATEGY

Strategy intelligence

  • Single-venue triangular arbitrage on Binance (USDT → BTC → ETH cycle), net of three taker fees.
  • Statistical-arbitrage ranking: a rolling z-score per venue pair prioritises the most anomalous, mean-reverting dislocations when multiple windows are profitable.
EXECUTION

Execution & latency modelling

  • Adverse price-movement model during the fill window, scaled by volatility × √time.
  • Pure compute latency separated from wire latency, with a p99 detection-latency metric in the header ticker.
AI COPILOT

AI Quant Copilot layer

  • AI Copilot workspace and an engine settings modal with provider/model selection (advisory only; simulated by default).
  • Spread explainability and execution-cost attribution surfaced from live telemetry.
RELIABILITY

Reliability & operations

  • Always-on engine guard and liveness watchdog with self-heal recovery counting.
  • Honest Sharpe ratio: withheld until at least 20 trades exist, rendered as "Calculating n/20" rather than a flattering placeholder.
  • Binance resync-storm fix (reconnect on persistent desync) and persistence honesty (report missing cloud state instead of masquerading defaults).
  • Real Supabase audit trail, dynamic risk-calibration API, and a live WebSocket telemetry stream.
UI / I18N

Interface & localisation

  • Full English/Spanish localisation across the terminal, plus responsive fixes (mobile bottom-sheet modal, header ticker, overflow tables).
  • Markets grid and spread matrix across the 5 venues, wallet/CEX coverage view, logo-to-home links and repositioned language selectors.
TESTS & QA

Tests & quality

  • Integration test suite for the Express bot API (HTTP routes, secure-guard auth, calibration and audit endpoints) on top of the existing unit tests — 41 tests passing.
DOCS & LEGAL

Documentation & legal

  • Bilingual README rewrite, technical paper, operational runbook and AI Copilot phase roadmaps; absolute claims softened for technical honesty.
  • Aurex-specific Terms & Privacy plus the official Coding Challenge Mexico policy pages, routed from the footer.
TOOLING / CI

Tooling, CI & refactors

  • CI workflow YAML fix, removal of dead i18n scaffolding, elimination of `any` types for stricter typing, and assorted build/config cleanups.

Simulated environment. Not financial advice. This page does not modify the submitted repository.