Knowledge · Strategies · Triangular / Cross-Exchange Arbitrage

Triangular / Cross-Exchange Arbitrage

Classic finance theory; algorithmic in FX since the 1990s, intensively in crypto since 2017
Arbitrage Evidence: Very strong seconds to minutes cryptofx
2/10
Relevance for Botty
Buys A→B→C→A when prices diverge so that the round trip is positive. Or cross-exchange: the same asset cheaper here, more expensive there.
When three pairs A/B, B/C, A/C are simultaneously out of no-arbitrage equilibrium, you can profit via a round trip (triangular). Analogously: the same asset priced differently across exchanges (cross-exchange). Almost always latency-limited.
Relevance Score 2/10
Botty runs on Hyperliquid with a seconds-long loop — far too slow for arbitrage. Latency between the Python client and the Hyperliquid RPC dominates before you even run order-book checks. Not recommended for Botty's scope.

Entry

  • Triangular: monitor all three cross-pairs (e.g. BTC/USDT, ETH/USDT, ETH/BTC)
  • Compute the implied exchange rates and compare
  • If: (BTC/USDT) × (ETH/BTC) × (USDT/ETH) > 1 + fees → trade
  • Fire all three legs simultaneously (time-critical)

Exit

  • The cycle is closed in one go (no open positions to hold)
  • Abort if a leg fails — neutralize the rest immediately
NameTyp. valueDescription
min_profit_bps 5-15 Required after fees and slippage
max_trade_size Order-book depth limit How large without noticeable slippage

Pros

  • Theoretically riskless profit (with simultaneous execution)
  • No market view required
  • Very clearly mechanical
  • Works in all market regimes

Cons

  • Latency-limited — HFT firms completely dominate
  • API rate limits cap the monitoring frequency
  • Partial-fill risk makes triangular treacherous (when leg 2 fills but leg 3 does not)
  • Cross-exchange has withdrawal time as an additional barrier
  • Fees eat most opportunities
notes
Shuffling Bytes test (69h on Binance): 156 opportunities identified, only 1 executed successfully, $176 net. Clearly shows: the retail opportunity is minimal.
typical edge
0.05-0.3% per cycle
opportunity frequency
Millisecond windows, 100-1000+ opportunities/day on top exchanges
realistic capture rate
<5% for retail, because HFT firms dominate
Only with HFT infrastructure; practically unprofitable for retail.

Triangular Arbitrage

Given three markets with pairs A/B, B/C, and A/C. In no-arbitrage equilibrium:

Price(A/C) = Price(A/B) × Price(B/C)

When the equation is violated, there is a riskless round trip. Example:

BTC/USDT = 100,000
ETH/USDT = 3,500
ETH/BTC  = 0.036   ← implied value 0.035 → too high

Cycle: 1. Buy BTC with USDT (costs 100,000 USDT for 1 BTC) 2. Buy ETH with BTC (you get 1/0.036 = 27.78 ETH) 3. Sell ETH for USDT (you get 27.78 × 3,500 = 97,222 USDT)

Negative profit — not good. So the other direction:

  1. Buy ETH with USDT (100,000 / 3,500 = 28.57 ETH)
  2. Sell ETH for BTC (28.57 × 0.036 = 1.029 BTC)
  3. Sell BTC for USDT (1.029 × 100,000 = 102,857 USDT)

Profit = 2.86%. After fees and slippage usually negative — but when the order book is briefly asymmetric, profitable.

Why retail loses

In 69 hours of Binance monitoring, a retail test (Shuffling Bytes) found 156 opportunities but could only execute 1 successfully — profit: $176. The rest had already been picked off by HFT firms before the retail orders arrived.

The reason: latency. HFT firms have: - Co-located servers at the exchange data center - Kernel-bypass networking (DPDK, PF_RING) - FPGA-based order routing (nanoseconds instead of milliseconds) - Multi-venue market-data aggregation

A typical retail setup (Python + REST API over home internet) has 50-200ms latency — while HFT firms act in under 0.1ms.

Cross-exchange arbitrage

Same asset, different price on two exchanges. Easier to understand, but with new difficulties:

  • Capital split: capital has to be present on both exchanges
  • Withdrawal delay: rebalancing takes minutes to hours
  • Exchange risk: doubly exposed to counterparty risk

If exchange X trades BTC @ 100,000 and Y @ 100,050: buy X, sell Y simultaneously = $50 profit per BTC. But: $50/100,000 = 5bps; fees are often 10-20bps. Profitable after fees only when the spread > 20-30bps — rare.

Relevance for Botty

Practically zero. Botty has seconds-scale latency against HFT microseconds. Better to invest resources in strategies that are latency-tolerant (trend, mean-reversion, funding arb).