DEV Community

Kendra Koepp
Kendra Koepp

Posted on

How Do Flashbots Searchers Work? They Bundle Trades and Bid

Flashbots searchers are bots that find profitable transaction orderings, including arbitrage, liquidations, backruns and sandwiches, then bid for those transactions to reach a block. The Flashbots site is where you can go further on the MEV research, transaction privacy and block-building infrastructure behind that process. Searchers use bundles to keep transactions in a fixed order and pay on chain only when a bundle lands. For a DeFi trader, the key distinction is whether a bot closes a price gap, clears a risky loan, follows a swap or exploits a visible one.

A searcher watches pool prices, lending positions or pending trades and calculates whether an opportunity exceeds its trading costs and inclusion bid. Through Flashbots Auction, it can submit signed transactions with eth_sendBundle for a target block. A builder simulates the bundle and considers its bid, paid through priority fees or a transfer to block.coinbase, the validator’s fee recipient. Transactions within a bundle stay together and execute in the submitted order. The Flashbots RPC endpoint documentation describes eth_sendBundle and the separate mev_sendBundle format used for MEV-Share backruns.

That private bidding flow differs from the public gas auctions documented by Daian and colleagues in Flash Boys 2.0. A losing bundle incurs no on-chain gas cost, though the searcher still spends time finding and testing it.

Arbitrage

Arbitrage closes a price gap between two decentralised exchange pools and suits searchers that can price both pools quickly. Say a token costs less in one Uniswap pool than in another pool. The bot buys where it is cheaper and sells where it is dearer, placing both trades in a bundle so they execute in sequence. Its expected spread must cover pool fees, gas and the inclusion bid. A user’s swap may create the gap; the arbitrage trade then moves prices back toward each other.

Liquidation

Liquidation repays part of an undercollateralised Aave loan in exchange for collateral and a liquidation bonus. It suits searchers that monitor borrowing positions, collateral prices and the funds needed to repay debt. When a position becomes eligible, a bot can bundle the repayment with a sale of the collateral it receives. The order matters: it must acquire the collateral before selling it. The borrower loses collateral and has debt repaid; the searcher keeps any value left after financing, trading costs and its bid.

Backrunning

Backrunning trades immediately after a user’s swap and suits searchers that can estimate a price move from limited clues. In MEV-Share, a private transaction can produce an event containing its hash and a hint such as the pool touched. Default swap hints reveal that a swap occurred, but conceal its full transaction and trade size. Seeing a Uniswap pool therefore tells a searcher where to look, not how far its price will move.

The searcher estimates possible outcomes from the pool’s current state and prepares several backrun variants, such as different trade sizes or directions. Each candidate pairs the user’s transaction hash with one following searcher transaction in a mev_sendBundle submission. The MEV-Share node tests candidates against the private transaction and forwards successful bundles to builders. Searchers can reuse a nonce across alternatives so only one of their backrun transactions can land. Part of the value captured from a successful backrun is refunded to the user. This is the strategy most directly connected to a private swap: the bot trades after the swap’s price change.

Sandwiching

Sandwiching places a trade before a visible public mempool swap and an opposing trade after it. It suits bots watching public orders whose allowed slippage leaves room to profit. A bot can buy before a large swap, let that swap push the price higher, then sell afterward; the user receives a worse price. The bot needs the victim’s pending trade and control of the surrounding order. Routing the user’s transaction through Flashbots Protect hides it from the public mempool, removing that visible target from public mempool sandwich bots. Unlike a backrun, a sandwich depends on trading ahead of the user.

Do you need a large ETH balance to run a searcher?

A large ETH balance is not a universal requirement; capital needs depend on the strategy. A searcher needs funds for gas and bids, while arbitrage and liquidation also need trading or repayment capital unless they use a flash loan. A flash loan supplies funds within one transaction and must be repaid before that transaction ends. It reduces upfront capital needs but adds fees and execution work.

Which programming languages do searchers use?

Searchers use languages that let them read Ethereum state, model trades, sign transactions and submit bundles quickly. TypeScript and JavaScript are common for Ethereum tooling; Rust is another choice for searchers building performance-focused systems. Accurate simulation and timely data matter more than the language name.

  • Identify whether a transaction is public or private.
  • Look for the price gap, eligible loan or swap that creates the opportunity.
  • Trace the proposed transaction order and subtract trading costs, gas and the bid from the expected return.

Top comments (0)