Backrunning Bot on Ethereum: First MEV-Share Strategy
By Merunas Grincalaitis (X · GitHub · DEV · Hashnode · Telegram), Founder & Lead MEV Engineer at MEV DAO — Ethereum smart contract, Flashbots & MEV builder since 2017. Last updated: October 2026.
TL;DR: A backrunning bot is the cleanest, lowest-risk entry point for new Ethereum searchers because your transaction executes immediately after a target swap or oracle update ([Tx_target, Tx_backrun]) without needing to win a toxic front-running gas war. In 2026, most retail orderflow routes through private RPCs, meaning profitable searchers combine classic public-mempool multi-pool backruns with mev-share backrun streams (and MEV Blocker orderflow auctions) that rebate up to 90% of the captured spread to the user while paying the searcher a risk-free execution margin.
Part of the Flashbots Bundles, MEV Protection & Mainnet Simulation Topic Cluster: Start with our Pillar Guide, Flashbots Bundles Explained: How to Send eth_sendBundle and Why Yours Isn't Landing, for the complete architectural blueprint. This guide focuses specifically on backrunning bot with production Ethereum mainnet parameters and runnable verification steps.
When developers ask me what strategy they should build first, they almost always point to CEX-DEX statistical arbitrage or predatory sandwiching. That is a mistake. Top-of-block CEX-DEX arbitrage is dominated by institutional market makers with co-located Tokyo and Frankfurt servers, and sandwiching faces shrinking public mempool flow plus intense legal and protocol headwinds.
Building a backrunning bot is different. A backrun does not worsen a trader's execution price; instead, it captures the temporary price dislocation left behind after a large swap moves a Uniswap V2, Uniswap V3, Curve, or Balancer pool out of alignment with the rest of Ethereum mainnet. Below is how atomic backrunning works in 2026, how to subscribe to mev-share backrun events, and how to structure your executor contract in Solidity alongside Rust, TypeScript, or flashbots in golang.
How an Ethereum backrunning bot works (vs. front-running and sandwiching)
Suppose a whale swaps 500 WETH for USDC on a Uniswap V2 WETH/USDC pool, pushing the price of WETH on that specific pool down to $2,460 while Uniswap V3 (0.05% tier) and Curve still price WETH at $2,500.
A backrunning bot spots that pending whale swap (Tx_whale) and constructs an atomic two-transaction bundle:
Bundle = [Tx_whale, Tx_backrun]
Inside Tx_backrun, your smart mev bot executor contract:
- Borrows
USDCvia a zero-fee Uniswap V3 flash swap or Balancer flash loan (or uses pre-funded working capital to save ~35,000 gas). - Buys cheap
WETHat$2,460on the dislocated Uniswap V2 pool thatTx_whalejust moved. - Immediately sells that
WETHfor$2,500on the deeper Uniswap V3 pool in the exact same transaction. - Repays the flash swap, verifies
netProfit > builderBribe, and transfers the bribe (80%–92%of gross profit) toblock.coinbase.
Why is this ideal for a first searcher strategy?
- Single-transaction state dependency: Unlike a sandwich attack (which requires placing one transaction before the victim and one after, risking unbundling or uncle bandits), a backrun only needs to land immediately behind the target transaction.
- Zero price impact on the target user:
Tx_whalegets the exact fill it asked for. Your backrunning bot simply rebalances the pool back to equilibrium and shares the arbitrage profit with the validator or orderflow provider. - Zero revert risk: If another searcher bids a higher builder bribe for the same
Tx_whale, the block builder includes their backrun and drops yours cleanly with zero gas burned.
For a broader look at how backrunning fits into the overall searcher landscape, read How to Build a Profitable MEV Arbitrage Bot and How MEV Bots Make Money on Ethereum (and Who Keeps the Profit).
Public mempool backrunning vs. MEV-Share backrun auctions
In 2026, over 70% of retail DEX swaps on Ethereum originate from wallets using private RPCs (Flashbots Protect, MEV Blocker, Uniswap Wallet protection). Those transactions never hit the public Geth/Reth mempool—instead, they are broadcast to Orderflow Auctions (OFAs) specifically so a backrunning bot can backrun them and refund most of the MEV back to the user!
| Feature | Public Mempool Backrunning | MEV-Share Backrun (mev_sendBundle) |
MEV Blocker Backrun Stream |
|---|---|---|---|
| Data Source | Local Reth/Geth newPendingTransactions + raw tx calldata |
Flashbots SSE event stream (https://mev-share.flashbots.net) |
MEV Blocker RPC WebSocket (wss://searchers.mevblocker.io) |
| What Searchers See | Full transaction (from, to, calldata, exact amountIn) |
Configurable hints (pool address, function selector, or partial logs—often hiding exact calldata) | Masked transaction with stripped signature (v, r, s replaced) |
| Submission Method | Standard eth_sendBundle to Titan, Beaverbuild, Flashbots, Rsync |
mev_sendBundle referencing the private txHash |
eth_sendBundle to integrated builders referencing the OFA hash |
| Profit Split | ~90%+ to block builder / validator; 0% to swap user | Up to 90% rebated to the user; builder + searcher split the remainder | 90% refund to user; searcher retains competitive margin |
| Competition Style | Full state simulation + gas-golfed Yul/Huff contracts | Hint-based blind/semi-blind sizing optimization | Fast exact simulation against masked calldata |
How a `mev-share backrun` works step by step
When a user sends a swap through Flashbots Protect (flashbots crypto private RPC), the transaction enters the MEV-Share matchmaker. Instead of leaking the user's slippage limit to sandwichers, MEV-Share emits a Server-Sent Events (SSE) stream to connected searchers containing a transaction hash and optional hints:
{
"hash": "0x7a9b...3f12",
"logs": [
{
"address": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
"topics": ["0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822"]
}
],
"to": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
}
Look closely at what that event tells your backrunning bot:
- The
logs[].address(0xb4e1...c9dc) is the Uniswap V2USDC/WETHpair! - Topic
0xd78ad9...is theSwapevent signature. - Notice that in many default hint configurations, the exact
data(swap size) is omitted so searchers cannot front-run the user.
How do you execute a mev-share backrun when you know which pool was traded, but not the exact trade size?
- On-chain optimal sizing inside Solidity: Instead of hardcoding
amountIn = 12.45 ETHoff-chain in your script, your Solidity executor contract readspair.getReserves()on-chain during execution (which runs right after the user's swap has already mutated the pool's reserves!) and computes the exact closed-form arbitrage amount betweenPool AandPool Bdynamically inside the EVM! - Simulate with
mev_simBundle: Before submitting, callmev_simBundleagainst the MEV-Share relay, which runs[userHiddenTx, yourOnChainSizingBackrunTx]inside the relay's enclave and returns your exact simulatedmevGasPriceand profit without ever exposing the user's raw signature.
Language stack: Rust, TypeScript, or `flashbots in golang`?
When browsing mev bot github repositories, you will see three primary languages used to drive a backrunning bot:
- Rust (
alloy+reth+artemis): The industry standard in 2026 for sub-millisecond state tracking and local Reth execution extensions (ExEx). We cover this architecture in Rust MEV Bot in 2026: The Alloy, Reth & Artemis Stack. flashbots in golang(go-ethereum+flashbots/mev-share-client-go): Because Geth (go-ethereum) is written in Go, building a backrunning bot usingflashbots in golanggives you native access tocore/vmEVM tracing,ethclient.Client, and official Go bindings for signingX-Flashbots-Signatureheaders (crypto.Sign(accounts.TextHash(bodyHash), prvKey)). Many veteran searchers run modified Go mempool sidecars directly inside their Geth process.- TypeScript / Foundry (
viem+anvil): Best for rapid prototyping, writing Solidity on-chain sizing tests, and verifying bundle logic. See our mev-arbitrage-and-liquidation-reference repository and flashbots-bundle-simulator-anvil repository.
Non-DEX backruns: Oracle updates and NFT / token launches
Do not limit your backrunning bot strictly to WETH/USDC swaps, where dozens of bots compete for fractions of a basis point. The highest-margin backruns on Ethereum happen on structural state transitions:
- Chainlink
transmit()oracle backruns: When a Chainlink aggregator updates the on-chain price feed in a pending transaction, lending protocols like Aave, Morpho, and Compound immediately unlock liquidations at the exact moment that transaction executes. Backrunning the oracle update ([Tx_chainlink, Tx_liquidate]) captures liquidation bonuses before standalone block-top bots can react. - LP addition /
enableTrading()launch backruns: Backrunning a developer's liquidity injection on Uniswap is the exact mechanism behind block-0 token sniping (see Block 0 Sniper Explained). - Protocol reward
harvest()or treasury rebalance backruns: DAO vaults and yield aggregators routinely execute scheduled market swaps with wide slippage tolerances that leave $500–$5,000 backrun opportunities in long-tail ERC-20 pools.
If you want a production-ready backrunning architecture without spending four months debugging EVM opcodes and builder relays, check our Custom MEV Bot Development service.
Frequently asked questions
What is a backrunning bot in crypto?
A backrunning bot is an automated MEV searcher program that monitors pending transactions (either in the public mempool or private orderflow auctions like MEV-Share) and submits a bundle that executes immediately after a target transaction in the same block—capturing price arbitrage, oracle liquidations, or liquidity launches without altering the target user's fill price.
How does a mev-share backrun work if the user's transaction is private?
MEV-Share streams partial "hints" (such as the Uniswap pool address and Swap event topic) to searchers without exposing the user's raw transaction signature or exact slippage limit. Searchers submit a mev_sendBundle backrun whose Solidity contract calculates the optimal trade size on-chain by reading the pool's reserves immediately after the user's swap executes.
Can I build a Flashbots backrunning bot in Golang (flashbots in golang)?
Yes. Using go-ethereum (geth) alongside Go's ethclient and flashbots RPC signing libraries (flashbots in golang) is one of the fastest ways to build a backrunner, since you can embed custom mempool hooks directly inside a Geth node and sign X-Flashbots-Signature headers natively with go-ethereum/crypto.
Why is backrunning safer for beginners than sandwich bots?
Sandwiching requires placing both a front-run and a back-run around a victim swap, which exposes you to unbundling attacks ("salmonella" bait tokens specifically engineered to trap sandwich bots) and severe regulatory scrutiny. A backrunning bot executes a single atomic transaction after the target event and reverts cleanly if the spread disappears.
How much capital do I need to run an Ethereum backrunning bot?
Because atomic DEX arbitrage and liquidation backruns occur within a single transaction, your Solidity contract can borrow the trade principal using Uniswap V3 flash swaps or Balancer zero-fee flash loans. You only need 0.2 to 1.0 ETH in working capital to cover wallet nonces and builder bribes.
Related articles
- How to Build a Profitable MEV Arbitrage Bot
- Flashbots Bundles Explained: How to Send eth_sendBundle and Why Yours Isn't Landing
- Simulate a Flashbots Bundle With eth_callBundle (2026)
- Rust MEV Bot in 2026: The Alloy, Reth & Artemis Stack
- Custom MEV Bot Development: Hire an Ethereum MEV Bot Developer
Looking to deploy a custom MEV-Share backrunner, liquidation searcher, or launch sniper? Explore our Custom MEV Bot Development services, start a 3-day trial at mevdao.org/subscribe, or message me directly on Telegram (@merunas).