Self-hosted. Auditable. Fail-closed by default. AGORA is the control plane for autonomous market makers — built like infrastructure, not a SaaS product.
We built an execution engine that fails closed when it does not understand what it is doing. The kill switch is authoritative. The reconciliation is paranoid. The audit trail is append-only. Every byte that moves money runs in a container we own, on a VPS we pay for, talking to APIs we authenticated.
Most trading infrastructure is SaaS. AGORA is not. The Rust core enforces risk at the engine. Halts trip in microseconds. State survives container restarts. There is no cloud bus to fail, no vendor abstraction between the strategy and the exchange.
"We optimize for operator confidence at 3am, not investor pitches at 3pm."
Doctrine — falsifiable, mechanism-tied. Not brand poetry.
AGORA refuses
silent drift between internal state and venue state.
risk expansion without an explicit envelope.
dashboards that celebrate PnL while hiding safeguard state.
# The two paths to kill:
Telegram bot: /kill
SSH file flag: touch /data/mm-bot.kill
Dashboard API: POST /api/control/stop {idempotency_key, reason?}
All three write to the same Redis-backed PANIC latch with TLS.
The bot detects the latch within 200ms and cancels all open orders.
Recovery is gated: WS healthy + drift=0 + daily_loss <cap + operator-enable.
02.
HALT TRIGGER
Six trust signals. Default-deny. Fail-closed by design.
# TradeGate.is_enabled() returns True ONLY when all six hold:
1. trading_enabled (config flag)
2. ! kill_switch_active (no /data/mm-bot.kill)
3. preflight_ok (HyperliquidRules.validate_startup PASS)
4. reconcile_ok (first successful recon completed)
5. rate_limit_warmup_ok (>3min since boot)
6. operator_enabled (touch /data/mm-bot.operator-enable)
Missing any → reject with reason. No silent half-states.
03.
RECON HALT
if (cached_count != rest_count) → publish risk.recon_drift → halt FSM transitions ACTIVE → HALTED
Single binary. Two languages. Zero proprietary SaaS dependencies. Total deps: NautilusTrader 1.225.0, Redis 7.4, Prometheus 3.10, Grafana 12.4.
05. WHAT 3AM LOOKS LIKE
Volatility spikes find their way into every market making book. When ours does, the system halts before the operator picks up the phone. This is reconstructed from a single February 2026 testnet incident.
{"ts":"2026-02-14T03:17:42.183Z","event":"spread_widened","symbol":"BTC-USD-PERP.HYPERLIQUID","spread_bps":47,"trigger":"volatility_spike","context": {"ewma_var_delta":"+0.0034 -> 0.0083","concurrent_market_event":"BTC perp carry trade unwind on Asia open","vol_pct_rank_1h":0.94 },"next_action":"inventory skew check"}
{"ts":"2026-02-14T03:17:44.611Z","event":"quote_size_reduced","symbol":"BTC-USD-PERP.HYPERLIQUID","previous_quote_size_usd":500,"next_quote_size_usd":250,"controls": {"anti_churn_cooldown_ms":200,"post_only": true,"quote_mode":"defensive" },"next_action":"refresh book with widened limits"}
{"ts":"2026-02-14T03:17:46.294Z","event":"bid_hedged","symbol":"BTC-USD-PERP.HYPERLIQUID","hedge_price":81204,"hedge_notional_usd":1006.72,"execution": {"venue":"hyperliquid_testnet","order_type":"post_only_limit","latency_ms":38 },"next_action":"watch realized loss threshold"}
{"ts":"2026-02-14T03:17:49.076Z","event":"kill_threshold_armed","daily_pnl_usd":-489,"daily_loss_limit_usd":-500,"armed_distance_bps":10,"controls": {"hard_kill_at_usd":-500,"warning_band_usd":15,"operator_override_allowed": false },"next_action":"notify operator if pnl deteriorates"}
No orders lost. No state diverged. No operator paged. The bot self-stabilized in 12 seconds.
06. OBSERVABILITY
Real-time view of the system. A single screen answers: Is it trading? Why did it halt? What exposure is live? What is the safest next action? The dashboard is live at /console — populated screenshot will replace this placeholder after current testnet soak completes.