In blockchain terminology, a backrunner is a bot or automated agent that front-runs a profitable pending transaction it has identified in the mempool. This is achieved by submitting a nearly identical transaction with a higher priority fee (maxPriorityFeePerGas or maxFeePerGas), incentivizing network validators to include the backrunner's transaction in the next block before the original. The goal is to capture value from the anticipated market movement or arbitrage opportunity that the initial transaction would have created. This practice is a specific, opportunistic form of Maximal Extractable Value (MEV) extraction.
Backrunner
What is a Backrunner?
A backrunner is a type of blockchain bot that identifies and exploits profitable pending transactions by submitting its own transaction with a higher gas fee to be processed first.
The operational mechanics rely on real-time mempool surveillance. Backrunner bots scan for transaction patterns that signal imminent, profitable on-chain actions, such as large DEX swaps that will move an asset's price, lucrative liquidations in lending protocols, or the minting of limited-edition NFTs. Upon detection, the bot swiftly crafts and broadcasts its own transaction, often using techniques like gas auctioning to outbid competitors. The original transaction, now processed after the backrun, typically results in a worse outcome for its sender, a phenomenon sometimes called sandwich trading when it involves a buy order between two manipulated trades.
While often conflated with front-running, which implies acting on non-public information, backrunning technically occurs after a transaction is public in the mempool. Its impact is multifaceted: it contributes to network congestion and increased gas costs for regular users, while also providing liquidity and price discovery in a highly competitive, automated environment. The ecosystem's response includes solutions like Flashbots' MEV-Boost, private transaction pools (e.g., Taichi Network), and Fair Sequencing Services that aim to mitigate its negative externalities by creating more equitable transaction ordering.
How Backrunning Works
Backrunning is a sophisticated transaction ordering strategy on blockchains like Ethereum, where a user submits a transaction designed to execute immediately after a specific target transaction, capitalizing on the state changes it creates.
A backrun is a transaction strategically placed in the same block as a target transaction but ordered to execute after it. This sequencing is made possible by Maximal Extractable Value (MEV) searchers who use bots to monitor the public mempool for pending transactions. When a profitable opportunity is identified—such as a large trade on a decentralized exchange that will move the market price—the searcher submits their own transaction with a higher gas fee or priority fee. Validators, incentivized to maximize fee revenue, then order the transactions within the block to execute the target transaction first, followed immediately by the backrun.
The execution relies on the atomic composability of block production. Because all transactions in a block share the same state root, the backrunner can write logic contingent on the precise outcome of the prior transaction. Common strategies include arbitrage, where a backrunner buys an asset on one DEX after a large trade depresses its price and instantly sells it on another where the price hasn't yet adjusted. Another is liquidations, where a backrunner repays a loan to liquidate a collateral position, claiming a liquidation bonus. The speed required for this is measured in milliseconds, necessitating specialized infrastructure and direct connections to block builders.
The technical implementation involves sophisticated MEV bots that simulate transaction outcomes and calculate potential profits. To ensure their backrun lands in the same block, searchers often use bundles, submitting a package of transactions (the target and their own) directly to block builders or relays via private channels like the Flashbots MEV-Share protocol. This private order flow prevents frontrunning from other bots and reduces network congestion from failed transactions. The builder includes the profitable bundle and the validator proposes the block, finalizing the sequence.
While backrunning can provide liquidity and efficiency benefits (e.g., closing arbitrage gaps), it also raises concerns. It can lead to negative externalities, such as increased gas prices for regular users and potential centralization pressures, as only well-capitalized players with advanced infrastructure can compete. In response, protocol-level solutions like CowSwap's batch auctions and MEV-aware design aim to mitigate these effects by creating more equitable transaction ordering or capturing the value for users.
Key Characteristics of a Backrunner
A backrunner is a type of MEV searcher that executes transactions immediately after a target transaction they have observed in the mempool, aiming to profit from the predictable market movements it will cause.
Mempool Surveillance
Backrunners rely on real-time monitoring of the public mempool to identify profitable opportunities. They use sophisticated bots to scan for specific transaction patterns, such as large DEX swaps or liquidations, that are likely to move market prices.
- Key Targets: Large swaps on Uniswap, SushiSwap, or other AMMs; oracle-based liquidations on lending protocols.
- Detection: They parse pending transactions for calldata, identifying the contract, function, and parameters to assess profit potential.
Transaction Ordering
The core mechanic is ensuring the backrunner's transaction is included in the next block, directly after the target transaction. This requires outbidding other searchers for block space.
- Priority Gas Auction (PGA): Backrunners engage in bidding wars, submitting their transactions with progressively higher gas prices to incentivize a validator/block builder to place theirs immediately after the target.
- Bundle Submission: Advanced backrunning often involves submitting a bundle of transactions (target + profit-taking) directly to block builders via private channels like Flashbots, ensuring atomic execution.
Profit Strategy
Profit is extracted by capitalizing on the price impact or state change caused by the target transaction. Common strategies include:
- DEX Arbitrage: Buying an asset on a DEX where a large swap is about to increase its price, then selling it on another venue at the new, higher price.
- Liquidation Cascades: Triggering or benefiting from a series of liquidations after an initial price update.
- Oracle Manipulation: Profiting from trades that rely on an oracle price that is about to be updated by the target transaction.
Technical Infrastructure
Successful backrunning requires a high-performance technical stack to compete in a sub-second environment.
- Low-Latency Nodes: Direct connections to multiple Ethereum node providers or running dedicated infrastructure to minimize mempool observation delay.
- MEV-Boost Integration: Integration with MEV-Boost relays to submit transaction bundles directly to proposers.
- Simulation: Every opportunity is run through a local transaction simulator (e.g., using Tenderly or a custom EVM fork) to verify profitability and avoid failed transactions that incur costs.
Economic & Risk Profile
Backrunning operates on thin margins and carries significant execution risks.
- Gas Costs: High gas bids during PGAs can erode profits; failed transactions still pay gas.
- Competition: Fierce competition from other searchers can turn profitable opportunities into loss-making ones through gas auctions.
- Sandwich Attacks: A backrunner can themselves become the target of a sandwich attack, where another searcher front-runs their backrun transaction.
- Protocol Risk: Smart contract vulnerabilities in the target protocol can lead to total loss of capital.
Related Concepts
Backrunning is one strategy within the broader Maximum Extractable Value (MEV) landscape. Key distinctions:
- Frontrunning: Executing before the target transaction (often illegal in TradFi, common in DeFi).
- Sandwich Attack: A specific, aggressive form of frontrunning/backrunning that traps a user's swap between two malicious transactions.
- Arbitrage: A broader category; backrunning is often a time-sensitive form of arbitrage.
- Searcher: The general term for an entity (bot or person) that identifies and extracts MEV opportunities.
Common Backrunning Strategies
Backrunners exploit the public nature of pending transactions to execute profitable trades. These are the primary strategies they employ.
Arbitrage
A backrunner identifies a pending DEX trade that will move an asset's price and places their own trade to profit from the imbalance.
- Example: A large pending swap of ETH for USDC on Uniswap will raise the price of ETH. A backrunner buys ETH on a different DEX (like Curve) before the original trade executes, then sells it after the price rises.
- This strategy capitalizes on price discrepancies across liquidity pools.
Liquidation
A backrunner monitors pending transactions that will trigger a loan liquidation on a lending protocol (like Aave or Compound).
- When they detect a pending transaction that will make a position undercollateralized, they front-run it by being the first to call the
liquidatefunction. - The reward is a liquidation bonus (e.g., 5-10%) paid by the protocol, making this a race for the right to execute.
NFT Sniping
This strategy targets pending transactions in NFT markets.
- A backrunner watches for a pending purchase of an NFT listed below its perceived market value.
- They submit a transaction with a higher gas fee to buy the NFT before the original buyer, intending to resell it immediately for a profit.
- This is common on marketplaces like OpenSea and Blur where listings are public.
Sandwich Attack
A specialized, aggressive form of backrunning that involves two transactions: one placed before and one after the victim's.
- Front-run: The attacker buys the same asset the victim is buying, driving the price up.
- Back-run: After the victim's trade executes at the worse price, the attacker sells the asset for a profit.
- The victim is "sandwiched" between the two malicious trades, incurring maximum slippage.
MEV-Boost Auctions
A formalized ecosystem where searchers (backrunners) bid for the right to reorder transactions within a block.
- Searchers submit bundles of transactions to block builders via relays.
- Builders assemble the most profitable bundle and propose it to validators.
- This creates a competitive market for Maximal Extractable Value (MEV), with profits shared between searchers, builders, and validators.
Statistical Arbitrage
A more complex strategy using algorithms to identify and exploit temporary pricing inefficiencies between correlated assets.
- Unlike simple DEX arbitrage, this may involve multi-leg trades across several protocols or derivatives.
- It relies on predictive models to anticipate price movements from pending transactions and market structure.
- This is often executed by sophisticated bots monitoring the mempool and on-chain data feeds.
Backrunner vs. Other MEV Searchers
A comparison of key operational and strategic differences between a backrunner and other common MEV searcher types.
| Feature / Metric | Backrunner | Generalized Searcher | Arbitrageur |
|---|---|---|---|
Primary Strategy | Simulate and profit from pending user transactions | Execute a wide range of on-chain opportunities | Exploit price differences across DEXs/CEXs |
Transaction Position | Executes immediately after target transaction | Competes for any position in block | Executes as soon as opportunity is found |
Profit Source | Extracted from a specific user's transaction | Extracted from general market inefficiencies | Extracted from cross-market price discrepancies |
Risk to User | Directly reduces user's expected output | Indirect (via gas competition, slippage) | Typically neutral or positive for liquidity |
Required Speed | Extreme (< 100ms to target) | High (compete in public mempool) | Very High (compete with other arbitrage bots) |
Complexity | High (requires perfect simulation) | Moderate to High | Moderate (price feed monitoring) |
Ethereum Consensus Impact | Increases block space competition | Increases general network congestion | Helps enforce price equilibrium across markets |
Ecosystem Impact and Participants
Backrunners are a specialized class of network participants who profit by executing transactions immediately after, and in reaction to, pending transactions they observe in the mempool.
Core Definition & Mechanism
A backrunner is a network participant who submits a transaction with a higher gas fee to ensure it is included in the next block immediately after a target transaction they have observed. This is a form of Maximum Extractable Value (MEV) extraction that relies on mempool surveillance and transaction ordering to capture value from predictable on-chain outcomes.
- Process: 1) Monitor pending transactions in the public mempool. 2) Identify a profitable opportunity (e.g., a large DEX swap). 3) Immediately submit a competing transaction with a higher priority fee. 4) Profit from the price impact or arbitrage created by the initial transaction.
Primary Use Cases & Examples
Backrunning is employed in several predictable financial strategies on decentralized exchanges and lending protocols.
- DEX Arbitrage: The most common use. A backrunner sees a large swap that will move a market price and places an order to buy the asset before the swap executes, then sell it after the price moves.
- Liquidations: Observing a transaction that will render a loan undercollateralized, a backrunner submits their own liquidation transaction to claim the liquidation fee.
- NFT Minting: Sniping a popular NFT mint by submitting a mint transaction right after the contract-opening transaction is seen.
Ecosystem Impact: Negative Externalities
While profitable for the backrunner, this activity creates several negative effects for general users and network health.
- Increased Gas Costs: Drives up gas prices through competitive bidding, making transactions more expensive for everyone.
- Network Congestion: Floods the network with spam transactions during high-opportunity events.
- User Experience Degradation: Causes failed transactions (reverts) and front-of-block congestion, making user interactions less reliable.
- Centralization Pressure: Favors sophisticated operators with low-latency infrastructure and private mempool access (e.g., Flashbots MEV-Boost relays).
Related Participants: Searchers & Builders
Backrunners are often part of a larger MEV supply chain involving searchers and block builders.
- Searchers: Bots or individuals (including backrunners) who run complex algorithms to discover profitable MEV opportunities.
- Builders: Specialized nodes that construct full block contents by aggregating transactions from the public mempool and private order flows (like from searchers). They compete to have their block chosen by validators.
- Validator/Proposer: The entity that ultimately signs and proposes a new block to the network, typically selecting the most profitable block from builders.
Mitigation Strategies & Solutions
The ecosystem is developing protocols and design patterns to mitigate the negative impacts of backrunning and MEV.
- Fair Sequencing Services: Protocols that use a centralized sequencer or consensus mechanism to order transactions fairly (e.g., Flashbots SUAVE).
- Private Transaction Channels: Services like Flashbots Protect RPC or BloXroute allow users to submit transactions directly to builders, bypassing the public mempool.
- Protocol-Level Design: DEXes can implement mechanisms like CowSwap's batch auctions or Uniswap V3's time-weighted prices to reduce the profitability of simple backrunning.
Distinction: Frontrunning vs. Backrunning
It is critical to distinguish backrunning from the related, but distinct, practice of frontrunning. Both are forms of MEV but differ in transaction ordering.
- Frontrunning: Submitting a transaction before the target transaction. This typically involves seeing a pending trade and inserting one's own trade ahead of it in the block, often by paying a higher gas fee.
- Backrunning: Submitting a transaction immediately after the target transaction. The profit comes from the state change caused by the target transaction, not from displacing it.
Backrunning is often considered less malicious than frontrunning, as it does not directly displace the user's transaction.
Security and Economic Considerations
A backrunner is a type of blockchain bot that monitors the mempool for pending transactions and submits its own transaction to execute immediately after, profiting from the state change caused by the original transaction.
Core Mechanism
A backrunner operates by scanning the mempool for a profitable target transaction. It then constructs and broadcasts its own transaction with a higher gas fee, ensuring it is mined in the next block immediately after the target. This exploits the predictable outcome of the initial transaction, such as a large DEX swap that moves an asset's price.
Economic Impact
Backrunning creates a competitive environment that can have mixed effects:
- For Users: Increases gas costs as bots compete for block space, potentially leading to failed transactions if outbid.
- For Protocols: Can distort on-chain pricing and liquidity, making large trades more expensive.
- For Bots: Represents a zero-sum or negative-sum game where profits for one bot come at the expense of other participants or the original trader.
Distinction from Frontrunning
It is critical to distinguish backrunning from the illegal practice of frontrunning:
- Frontrunning: A validator or insider uses non-public knowledge to place a transaction before a victim's transaction, a clear abuse of position.
- Backrunning: Uses only public mempool data to place a transaction after the victim's, which is generally considered a permissible, though often undesirable, form of Maximal Extractable Value (MEV).
Common Strategies
Backrunners deploy automated strategies to identify opportunities:
- DEX Arbitrage: Profiting from price discrepancies between pools after a large swap.
- Liquidations: Snapping up undercollateralized positions immediately after they become eligible for liquidation.
- NFT Minting: Minting a rare NFT from a collection right after a reveal transaction. These strategies rely on low-latency infrastructure and sophisticated transaction simulation.
Common Misconceptions About Backrunning
Backrunning is a nuanced concept in blockchain transaction ordering, often misunderstood. This section clarifies the mechanics, legality, and practical realities of backrunning for developers and analysts.
Backrunning is not inherently illegal or an attack; it is a permissionless, market-driven strategy for ordering transactions based on public information. Unlike frontrunning, which uses privileged knowledge of pending transactions to act before them, a backrunner submits a transaction with a higher gas fee to be processed immediately after a target transaction in the same block. This is a legal arbitrage strategy on public blockchains, exploiting predictable state changes (like DEX price updates) that are visible to anyone monitoring the mempool. It is considered a normal, albeit competitive, part of Maximal Extractable Value (MEV) extraction.
Frequently Asked Questions (FAQ)
A backrunner is a type of blockchain bot that profits by placing its transaction immediately after a target transaction in the same block. This glossary section answers the most common technical and strategic questions about backrunning.
A backrunner is a specialized bot that monitors the public mempool for pending transactions and attempts to submit its own transaction to be included in the same block, immediately after the target transaction. It works by detecting a profitable opportunity—like a large DEX trade that will move the price—and then using a higher gas fee to ensure its transaction is ordered directly after the target, allowing it to capitalize on the state change the target creates. This is a form of Miner Extractable Value (MEV) extraction.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.