xXTrade

One market list, many venues: inside the xXTrade venue registry

Published · by , solo founder, Switzerland

Shipped · Editorial policy

What shipped

A venue layer that stops the app from knowing which exchange a market came from. It merged on 3 August 2026 as the multi-venue branch (743f35a). The whole idea lives in src/lib/venues/registry.ts, and its own header comment states the contract: adding a venue is an entry here plus an adapter; no UI file changes.

What is registered today

VenueKindChainModel
xXTrade (Hyperliquid perps)PerpHyperliquidOrder book
xXTrade Stocks, Para, Hyna, CashPerp (HIP-3 dexes)HyperliquidOrder book
xXTrade SpotSpotHyperliquidOrder book
Jupiter / Jupiter PerpsSpot / PerpSolanaAggregator / oracle pool
LighterPerpLighter zk-rollupOrder book
Robinhood ChainSpotRobinhood ChainAMM

The registry is kept alphabetical on purpose: venueList() returns registry order and the UI uses it for tab order, so the ordering in that file is user-visible and has to be deterministic.

Lighter is a venue, not an account

Lighter runs its own zk-rollup, which normally means a second account somewhere else. It does not here. The Lighter L2 key is derived from the user's EVM wallet signature in the browser and never leaves it, so Lighter is a self-custody venue like the rest rather than a separate custody regime. Leverage there is per-market rather than venue-wide, so the registry declares no cap for it — a venue-wide number would have been a comforting fiction.

Two things the first real fill taught us

Two live-blocking defects in the Lighter signer were found by the first real fill, not by the test suite — the kind of bug that only exists once actual money moves. Separately, PAXG was split out of the canonical GOLD row. The commit that did it puts the reasoning in its own title — two markets, two rows, two prices — and the reason that matters is the middle one: a single row cannot carry two prices.

Venue availability differs by jurisdiction, and some venues are geo-gated. Nothing here is investment advice.