All articles
MEV·October 27, 2025·5 min read

Flash Loan Arbitrage Bots: Zero-Capital MEV Explained

Learn how flash loan arbitrage bots borrow, trade, and repay within a single atomic transaction — capturing MEV with zero upfront capital on Solana and beyond.

Flash loan arbitrage is probably the most counterintuitive concept in DeFi: a bot borrows millions of dollars, executes a series of trades across multiple venues, and repays the loan — all inside a single transaction that either completes atomically or never happened at all. No collateral. No overnight exposure. No upfront capital beyond gas.

Understanding the mechanics is not just academic. If you are building or evaluating a trading-bot service, knowing where flash-loan arb sits in the MEV stack helps you decide whether it belongs in your stack.

The Anatomy of a Flash Loan Transaction

At the protocol level, a flash loan is a callback pattern. A lending pool (e.g., on Solana via a protocol like Marginfi or a custom vault) releases funds to your program, executes your logic, then asserts the balance is whole before the transaction finalizes. If it is not, the entire transaction reverts.

Inside that callback window, a flash loan arbitrage bot typically does the following in a single atomic bundle:

  • Borrow a large amount of Token A from the flash loan pool.
  • Swap Token A for Token B on DEX-1 at a favorable rate (often spotted via a Geyser stream watching on-chain account changes in near real time).
  • Swap Token B back to Token A on DEX-2 where the price is higher, locking in the spread.
  • Repay the loan plus the protocol fee, keeping the difference as profit.

Because all steps are atomic, the bot carries zero inventory risk between legs. If slippage erodes the spread after the first swap, the transaction fails and the only cost is the priority fee paid to validators.

MEV Infrastructure: Jito Bundles, Priority Fees, and Geyser

Execution speed is everything. On Solana, most competitive flash loan arb bots submit transactions through Jito bundles — a block-engine layer that allows searchers to tip validators directly for inclusion priority and to bundle multiple transactions atomically. A bundle ensures your arb lands before competing bots can front-run the same opportunity.

The practical workflow looks like this:

  1. A Geyser plugin (or a validator-side gRPC stream) pushes real-time account updates — pool reserves, oracle prices, vault balances — to your bot with sub-millisecond latency.
  2. The bot's pricing engine detects a cross-venue spread above the break-even threshold (loan fee + priority fee + slippage estimate).
  3. A simulation layer builds the transaction locally, runs it against a forked state, and validates the net profit before broadcasting. This anti-rug step prevents the bot from landing on-chain when pool state has already moved.
  4. If simulation passes, the transaction is wrapped in a Jito bundle with a competitive tip, usually priced dynamically based on recent tip percentiles.

The kill-switch is baked into step 3: if simulated profit is negative, the bundle is dropped. No speculative broadcast, no wasted fees.

Cross-Venue Complexity: CLOBs, Funding Rates, and Inventory Skew

Pure DEX-to-DEX arb is increasingly saturated. The more interesting opportunities emerge when flash loans are combined with hybrid venue strategies:

  • CLOB arbitrage: Spot a stale bid on a central-limit order book (Hyperliquid's on-chain CLOB, for example) versus a DEX pool price. A flash loan funds the capital leg while the CLOB order fills the other side.
  • Funding rate capture: On perpetual venues, extreme funding rates create a basis between spot and perp. A flash loan can fund the spot leg of a delta-neutral trade, capturing the funding payment before unwinding.
  • Resolution arb on prediction markets: On Polymarket, settled markets occasionally show stale prices in secondary liquidity pools before the resolver settles. A flash-loan-funded position can lock in the binary payoff at a discount.

Inventory skew management is irrelevant in pure flash loan arb because no inventory persists after the block. But in hybrid strategies where one leg settles asynchronously — say, a CLOB order fill that takes milliseconds — the bot needs a small buffer capital and a dynamic skew limit to avoid accumulating unhedged exposure. Our cross-venue arbitrage case study covers how we structured exactly this kind of multi-leg system in production.

What Makes a Flash Loan Bot Actually Competitive

The spread you capture minus fees needs to survive:

  • Loan fee (typically 0.05–0.09% of notional, depending on the protocol).
  • Jito tip (competitive tips in active blocks can reach 0.01–0.05 SOL per bundle).
  • Swap fees on both DEX legs (usually 0.01–0.30% per swap depending on the pool tier).
  • Priority fee base layer, separate from the tip in Jito's model.

Simulating the full fee stack before submission is non-negotiable. Bots that skip this step are net negative in expectation — they land only when the spread already closed, paying fees for zero profit. The simulation must also account for price impact on large borrows, since flash loans that move pool ratios dramatically can self-defeat the arb.

Latency compounds everything. Geyser streams beat polling by orders of magnitude, but co-location with a Jito-connected validator node is the real edge. A 50ms advantage over the median searcher is the difference between consistent extraction and consistently finishing second.

Start a project with TierZero if you want a flash loan arb bot built with proper simulation, Geyser integration, and Jito bundle submission from day one — not bolted on as an afterthought.


Ready to extract MEV without putting capital at risk? TierZero builds production-grade flash loan arbitrage bots across Solana, Hyperliquid, and Polymarket. Tell us about your target venue and we will scope a system designed around your specific spread opportunities.

Need a bot like this built?

We design, build and run trading bots on Solana, Hyperliquid and Polymarket.

Start a project
#flash-loan#arbitrage#mev