Multi-DEX Arbitrage Engine
baseline oracle resolution & concurrent execution
Published: 2026-07-17 | Project: Bet Bodhi | Discipline: Quantitative Engineering & Microstructure
Author: Nicholas Alexander MacAskill — Founder & CTO, Flocano Labs | Canonical: https://www.nicholasmacaskill.com/dossier/bodhi-multidex-arbitrage
1. The Two-Step Alpha Engine
The foundational component of this pivot was the creation of the \MultiDexRouter\, which transforms Bodhi into a two-step arbitrage engine.
Step 1: Bodhi runs its proprietary technical and psychological analysis to generate a "Bodhi Probability." It compares this internal probability against Polymarket’s highly liquid orderbook—using Polymarket purely as a "fair value" pricing oracle to determine if a baseline edge (Alpha) exists.
Step 2: Once an edge is confirmed against Polymarket, the router fires asynchronous API calls concurrently to four alternative execution venues (SX Bet, Azuro, Dexsport, and BetDEX). It actively compares Polymarket's baseline price against these alternative platforms to find the absolute highest decimal odds available for the matchup, ensuring maximum return on every single trade before execution.
2. Parallel Latency Optimization
In algorithmic sniping, execution speed dictates success. Instead of sequential querying, the \MultiDexRouter\ utilizes \Promise.all\ to query all platforms concurrently. This parallel architecture maps the entire decentralized liquidity landscape in the time it takes the single slowest API node to respond.