Reducing Arbitrage Scan Latency by Separating Profit and Order Calculations
Summary
The document explains how restructuring an arbitrage scanner can reduce computation when it checks many paths across exchanges and trading pairs. It recommends separating the quick profitability check from the more detailed calculation of order prices and quantities. The scanner can compare profitability across paths first, then calculate order details only for a selected opportunity, avoiding repeated work during each scan.
It further suggests stopping at the first profitable path and calculating its order details immediately. The author illustrates the possible reductions with stated complexity estimates, from O(2n) to O(n+1), and then to O(m+1) when opportunities are uncommon and m is less than n. These gains depend on the scanner’s workload and how often paths are profitable; the first-match approach may not identify the most profitable path if several opportunities exist. The document provides a conceptual example, not benchmark methodology or general performance measurements.
Key ideas
- Separate profitability checks from calculations of order prices and quantities.
- Calculate detailed order parameters only after selecting a candidate path.
- Early exit can reduce work when profitable paths are uncommon.
- The proposed speedups depend on the number of paths and the distribution of opportunities.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.