Tim Baker, CTO of Hoops Finance, details the engineering overhaul of their backend market data system on the Stellar blockchain. They centralized market logic into a single source of truth, implemented hybrid real-time and historical data storage, and rebuilt a realistic arbitrage engine with flow clipping for executable opportunities. This creates a reliable foundation for high-performance financial infrastructure.

Hoops Finance, building on Stellar, faced challenges with fragmented market data logic causing bugs and unreliable arbitrage scanning. Tim Baker led a full refactor, starting with unified TypeScript interfaces and shared pure functions for market pairs, pricing, volumes, and liquidity from AMMs and orderbooks. They adopted a hybrid history system with real-time database triggers and hourly/ledger-pinned snapshots for precise backtesting. A pre-migration 'paranoia script' validated the changes in a dry-run. The new arbitrage engine uses skyline pruning and depth-bounded DFS with flow clipping to identify realistic, liquidity-constrained profitable cycles. This overhaul ensures consistent, scalable data via their API at api.hoops.finance.