Centralized to on-chain

    CEX/DEX arbitrage bot: capture the spread between order books and Solana pools

    Prices on centralized exchanges and Solana DEXs drift apart many times a minute. A CEX/DEX arbitrage bot buys where the asset is cheaper and sells where it is dearer, managing inventory on both sides so the trades can settle. We have built and operated these bots ourselves and build them for clients in Rust.

    Venues
    Binance, Bybit, OKX and Solana DEXs
    Model
    Inventory-based, non-atomic with hedges
    Risk
    Exposure, balance and latency limits
    Centralized exchange order-book tower linked by a light bridge to an on-chain Solana pool

    Why CEX/DEX arbitrage is a different problem

    DEX-to-DEX arbitrage is atomic: both legs succeed or nothing happens. CEX/DEX arbitrage is not. The centralized leg settles off-chain in milliseconds while the on-chain leg needs a slot to land, and the two venues never share a wallet. That means the bot must hold inventory on both sides, execute the two legs almost simultaneously, and hedge the brief interval in which it is exposed.

    The reward is a larger and more persistent opportunity set. Centralized order books react to news faster than on-chain pools, and the spread between them is often wider than any DEX-to-DEX route. The cost is operational complexity: API rate limits, withdrawal delays, funding and the discipline to keep inventory balanced.

    Inventory and hedging

    The bot keeps target balances of the base asset and the quote asset on each venue. When a trade moves inventory in one direction, it either waits for an opposite opportunity, rebalances through a transfer when the accumulated skew justifies the cost, or hedges with a perpetual position on the CEX so the book stays delta-neutral. All thresholds are configuration, not code.

    Execution on the CEX side uses WebSocket order books and low-latency order placement with post-only and IOC modes as appropriate; on the Solana side the swap is submitted through Jito or priority fees with a tight slippage bound. If either leg fails, the bot immediately evaluates the residual exposure and hedges or unwinds according to your rules.

    Two vaults connected by a pipe rebalancing inventory between exchanges

    Risk controls that matter here

    Because the strategy is not atomic, risk management is the core of the system rather than a safety net.

    • Maximum open exposure per asset and in total, enforced before any order is sent.
    • Latency monitors that pause trading when either venue's data or execution becomes slow.
    • Balance monitors with alerts when inventory drifts outside its bands.
    • Fee-aware pricing: taker fees, withdrawal fees, funding and slippage are all part of the expected-value calculation.
    • Kill switches per venue and global, triggerable from the dashboard or an API.

    What an engagement looks like

    We begin with a scoping call and a live demonstration of bots we have operated, then agree a fixed-scope quotation. A CEX/DEX bot is a minimum six-month build because of the venue integrations and the testing needed with real balances at small size. You receive the Rust repository, venue adapters, dashboards and 30 days of support after handover.

    Capital, exchange accounts and API keys stay with you. We deliver the software and the operating playbook; results depend on spreads, fees, latency and your capital, and are never guaranteed.

    FAQ

    CEX/DEX arbitrage bot: questions we are asked

    Ready to build? Tell us about your strategy.

    Tell us about your edge, capital range and infrastructure. We reply with a scoping call, a live demo of bots we have built, and a fixed-scope quotation.

    Start your project