Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Glossary

Back-running

Back-running is a transaction ordering attack where a malicious actor places a transaction immediately after a known pending transaction to profit from its execution.
Chainscore © 2026
definition
BLOCKCHAIN SECURITY

What is Back-running?

A transaction ordering attack where a malicious actor exploits knowledge of pending transactions for profit.

Back-running is a type of Maximal Extractable Value (MEV) attack where a malicious actor, typically a validator or bot, strategically places their own transaction to execute immediately after a known pending transaction in the same block. The attacker profits by anticipating and capitalizing on the market impact or state change caused by the initial transaction. This is distinct from front-running, where the attacker's transaction is placed before the target.

The attack relies on the public visibility of transactions in the mempool before they are confirmed. A common example is observing a large DEX swap that will move the price of an asset. The back-runner submits a transaction to buy the same asset, knowing the initial swap will increase its price, and then immediately sells the purchased tokens at a profit in the same block. This is often executed as an atomic arbitrage opportunity.

Back-running can have negative externalities for regular users, including increased transaction costs (gas fees) due to competitive bidding for block space and worsened execution prices (slippage). While sometimes viewed as a form of efficient market arbitrage, it represents a wealth transfer from the initial trader to the sophisticated attacker, raising concerns about fair ordering and transaction censorship.

Solutions to mitigate back-running and related MEV exploits include private transaction pools (like Flashbots Protect), commit-reveal schemes, and protocol-level designs such as CowSwap's batch auctions. Proposer-Builder Separation (PBS) in Ethereum's consensus layer also aims to democratize MEV extraction and reduce its negative impacts on network users.

how-it-works
MECHANISM

How Back-running Works

Back-running is a transaction ordering strategy where a user submits a transaction that is executed immediately after a specific target transaction, capitalizing on the state change it creates.

In blockchain systems, back-running is the practice of submitting a transaction with a higher gas price or priority fee to ensure it is included in the same block as, but immediately after, a known pending transaction. The goal is to exploit the predictable outcome of the target transaction, such as a large trade on a decentralized exchange (DEX) that will move an asset's price. By positioning their transaction directly after, the back-runner can execute an arbitrage, liquidation, or other profitable action at the newly established price before other market participants can react. This is possible because pending transactions are visible in the mempool before they are confirmed.

The technical execution relies on the block builder (e.g., a validator or miner) ordering transactions by fee. A back-runner monitors the mempool for a high-value target transaction, then broadcasts their own transaction with a fee just high enough to be placed next in line. On networks like Ethereum, sophisticated bots use techniques like Flashbots bundles to submit their back-running transaction with the target transaction in a private, atomic package, guaranteeing the desired order and preventing front-running by others. This process is a form of Maximum Extractable Value (MEV) extraction, as it derives profit from the ability to influence transaction ordering.

A classic example is DEX arbitrage. If a large swap() transaction is seen buying Token A for Token B, a back-runner can instantly submit a transaction to buy Token A from a different liquidity pool where the price hasn't yet updated, then sell it at the new, higher price for a risk-free profit. While often profitable for the searcher, back-running can increase costs for regular users through network congestion and is considered a type of sandwich attack when combined with front-running. Mitigations include using private transaction pools, commit-reveal schemes, and protocols with fair ordering mechanisms that reduce the predictability of transaction outcomes.

key-features
MECHANICAL BREAKDOWN

Key Features of Back-running

Back-running is a form of Maximal Extractable Value (MEV) where a transaction is submitted immediately after a known pending transaction to profit from its predictable market effects.

01

The Core Mechanism

Back-running exploits the public mempool where pending transactions are visible. A searcher's bot detects a profitable opportunity (e.g., a large DEX swap) and submits its own transaction with a higher gas price to ensure it is mined in the next block, immediately after the target transaction. This creates a predictable sequence: 1) Victim's transaction executes, 2) Market price moves, 3) Back-run transaction captures the arbitrage.

02

Primary Use Case: DEX Arbitrage

The most common application is on-chain arbitrage. When a large swap on a decentralized exchange (DEX) like Uniswap moves the price of an asset pair, a back-runner can instantly execute a trade on another DEX or liquidity pool at the stale price, profiting from the temporary discrepancy. This activity, while extractive, also contributes to market efficiency by aligning prices across venues.

03

The Role of Gas Auctions

Success depends on winning a priority gas auction (PGA). Multiple searchers may identify the same opportunity, leading them to bid up the gas price for their back-running transactions. The validator (miner/sequencer) typically includes the highest-paying transactions, making back-running highly competitive and costly, with profits often eroded by gas fees.

04

Distinction from Front-running

Crucially different from front-running, where a transaction is placed ahead of the victim's to gain an advantage (e.g., buying an asset before a large order). Back-running occurs after, reacting to the outcome. Front-running is often considered more malicious, while back-running is sometimes viewed as a competitive, albeit extractive, market activity.

05

Mitigations & Solutions

Protocols employ several defenses:

  • Private Transactions: Using services like Flashbots RPC to submit transactions directly to validators, bypassing the public mempool.
  • Commit-Reveal Schemes: Users submit encrypted transactions that are only revealed after being included in a block.
  • Fair Sequencing: Validators or sequencers (e.g., in rollups) order transactions by receipt time rather than gas price.
06

Economic Impact

Back-running represents a significant portion of MEV extraction, redistuting value from regular users to sophisticated searchers and validators. While it can improve liquidity and price efficiency, it also increases transaction costs and can create a poor user experience through slippage and failed transactions. The net effect on ecosystem health is a subject of ongoing research.

common-examples
TACTICAL PATTERNS

Common Examples of Back-running

Back-running manifests in several distinct patterns, each exploiting the public visibility of pending transactions to extract value or gain an advantage.

01

Sandwich Attack

The most prevalent form of back-running, where a searcher (or bot) identifies a large pending DEX swap and executes two transactions around it.

  • Front-run: Buys the asset first, driving the price up.
  • Victim's transaction: Executes at the worse, inflated price.
  • Back-run: Sells the asset immediately, profiting from the price impact. This creates a 'sandwich' around the victim's trade, extracting value from slippage.
02

Liquidation Triage

In lending protocols, bots monitor for undercollateralized positions nearing liquidation. When a public liquidation transaction is pending, a back-runner will:

  • Pay the debt and seize the collateral at a discount (the liquidation).
  • Immediately sell the seized collateral on a DEX in the same block. The goal is to be the first to execute the profitable liquidation and exit the position before price volatility or other searchers intervene.
03

Arbitrage Back-running

A searcher detects a pending arbitrage transaction that will correct a price discrepancy between two exchanges (e.g., DEX A and DEX B). The back-runner copies the same profitable arbitrage path but executes their transaction immediately after the original, still capturing some of the remaining price difference before the market fully corrects. This is a parasitic strategy that relies on the initial arbitrageur's research.

04

NFT Mint Snipping

During a popular NFT mint, bots watch the mempool for successful mint transactions. Upon seeing one, they back-run by submitting their own mint transactions with higher gas fees, attempting to mint NFTs from the same collection in the same block before the sale sells out or the block fills. This exploits the first-come, first-served nature of many NFT minting mechanisms.

05

Oracle Price Update Exploit

Protocols relying on oracles (like Chainlink) have price updates submitted on-chain. A back-runner can observe a pending update that will significantly change an asset's price within a protocol (e.g., making loans liquidatable or creating arbitrage). They then place transactions to benefit from this new price immediately after the update is confirmed, before other market participants can react.

06

Governance Proposal Execution

If a passed governance proposal creates a new opportunity (e.g., enabling a new vault or changing fees), a back-runner can watch for the execution transaction. They then immediately submit a transaction to be the first to deposit into the new vault or interact with the updated system, securing a 'first-mover' advantage in yield or access that may diminish as others follow.

security-considerations
BACK-RUNNING

Security Considerations & Impact

Back-running is a type of Maximal Extractable Value (MEV) attack where a transaction is strategically placed after a known pending transaction to profit from its execution effects, often at the expense of the original user.

01

The Core Attack Vector

A back-runner monitors the mempool for a profitable target transaction, such as a large DEX trade that will move the market price. They then submit their own transaction with a higher gas price to ensure it is mined in the next block, immediately after the target. This allows them to profit from the price impact the target created, for example, by buying an asset before a large purchase or selling it before a large sale.

02

Impact on User Experience

Back-running directly harms end-users by causing slippage and worse execution prices. When a user's trade is back-run, the market moves against them between the time their transaction is broadcast and when it is executed. This results in:

  • Receiving fewer tokens than expected for a buy order.
  • Receiving less ETH/USDC than expected for a sell order.
  • The effective creation of a hidden, non-transparent fee extracted by searchers and validators.
03

Distinction from Front-Running

It is crucial to distinguish back-running from front-running:

  • Front-running: A transaction is placed immediately before a target transaction, often by copying or intercepting it (e.g., to arbitrage a known profitable trade).
  • Back-running: A transaction is placed immediately after a target transaction to capitalize on its state changes (e.g., buying an asset whose price just increased due to a large swap). Both are MEV strategies, but they exploit different phases of transaction ordering.
04

Systemic Risks & Network Effects

Widespread back-running creates negative externalities for the entire network:

  • Network Congestion: Increases competition for block space, driving up gas fees for all users.
  • Centralization Pressure: Profits flow to sophisticated searchers and the validators who can order transactions, incentivizing validator centralization.
  • Trust Erosion: Degrades the fairness of the transaction ordering process, undermining the "permissionless" ideal. Users cannot trust that their transaction will be executed in the state they see.
06

Validator's Role & Incentives

Validators (or block proposers) are the final arbiters of transaction order and are central to back-running. They can:

  • Passively Profit: By simply ordering transactions by gas price, they collect fees from back-runners competing for position.
  • Actively Participate: By running their own MEV-Boost relays or searcher software, they can capture the back-running profit directly. This creates a significant revenue stream that influences validator economics and can lead to the development of proposer-builder separation (PBS) architectures.
MEMPOOL EXPLOIT COMPARISON

Back-running vs. Front-running vs. Sandwich Attack

A comparison of three distinct forms of Maximal Extractable Value (MEV) extraction based on transaction ordering within a block.

FeatureBack-runningFront-runningSandwich Attack

Core Definition

Executes a transaction immediately after a target transaction in the same block.

Executes a transaction immediately before a target transaction in the same block.

A combination of front-running and back-running to exploit a target trade.

Primary Goal

Capture value from a known, concluded on-chain event (e.g., arbitrage after a large swap).

Preempt a known pending transaction to capture its value (e.g., buying before a large buy order).

Profit from the price impact of a target AMM trade by trading on both sides of it.

Required Knowledge

Observed pending transaction (content).

Observed pending transaction (content).

Observed pending transaction (content and intent).

Typical Victim

The original transaction sender (indirectly, via lost opportunity).

The original transaction sender (directly).

The original trader executing the target swap.

Transaction Order

Target TX → Attacker TX

Attacker TX → Target TX

Attacker Buy TX → Target TX → Attacker Sell TX

Primary Risk to Victim

Slippage, worse execution price.

Trade failure, front-run arbitrage.

Substantial slippage, direct financial loss (negative slippage).

Common Context

DEX arbitrage, liquidation triggers.

DEX arbitrage, NFT minting, oracle updates.

Large trades on Automated Market Makers (AMMs) like Uniswap.

Ethical Consideration

Often considered a 'benign' or parasitic form of MEV.

Generally considered malicious and predatory.

Universally considered malicious and predatory.

mitigation-strategies
MITIGATION STRATEGIES

Back-running

Back-running is a type of blockchain transaction ordering attack where an actor observes a pending transaction and places their own transaction immediately after it to profit from the resulting state change.

Back-running, also known as tailgating, is a form of Maximal Extractable Value (MEV) exploitation. It occurs when a searcher or bot detects a profitable pending transaction in the mempool, such as a large trade on a decentralized exchange (DEX) that will move the market price. The attacker then submits their own transaction with a higher gas price, ensuring it is included in the same block directly after the target transaction, thereby capitalizing on the arbitrage opportunity or favorable price movement created by the initial trade.

The primary mitigation strategies against back-running focus on reducing transaction visibility and manipulating execution order. Private transaction pools (like Flashbots Protect or Tahoe) allow users to submit transactions directly to block builders without exposing them to the public mempool, preventing front-running and back-running bots from seeing the transaction details. Another approach is the use of commit-reveal schemes, where the transaction's intent is submitted in an encrypted form first and only revealed later, though this adds complexity and latency.

Protocol-level designs can also deter back-running. Batch auctions and Frequent Batch Auctions (FBAs) aggregate orders over a set period and execute them at a single clearing price, eliminating the advantage of being first or last in line. Similarly, Decentralized Exchange (DEX) designs that utilize Automated Market Makers (AMMs) with low slippage tolerance or that implement fair ordering protocols aim to reduce the profitability of such predatory strategies by minimizing the informational advantages gained from observing the mempool.

ecosystem-usage-context
FRONT-RUNNING & MEV

Ecosystem Context

Back-running is a specific strategy within the broader landscape of Maximal Extractable Value (MEV), where bots compete to profit from predictable on-chain actions.

01

The MEV Sandwich

Back-running is the second half of the classic MEV sandwich attack. A searcher's bot first front-runs a victim's large trade by placing its own order, then back-runs the same trade to profit from the price impact.

  • Front-run: Buy asset X before the victim's buy order.
  • Victim's Order: Executes, pushing the price of X up.
  • Back-run: Sell asset X immediately after, capturing the inflated price.

The back-run is guaranteed profit, closing the arbitrage loop created by the initial front-run.

02

Competition with Front-Running

While both are MEV strategies, front-running and back-running target different phases of a transaction's lifecycle and carry distinct risks.

  • Front-running: Requires predicting a pending transaction from the mempool. It's speculative and risks capital if the victim's transaction fails.
  • Back-running: Reacts to a confirmed transaction that has already altered the state. It's less risky as the market movement has already occurred, but profits are typically smaller and competition is fierce.

High-frequency bots often execute both in a coordinated sequence.

03

The Role of Flashbots & SUAVE

Protocols like Flashbots aim to mitigate the negative externalities of MEV, including disruptive back-running. Their MEV-Boost auction allows searchers to submit bundles of transactions directly to block builders.

  • Off-Mempool Bundles: Searchers can propose a front-run/back-run sandwich bundle without revealing intent to the public mempool, reducing network spam.
  • SUAVE (Single Unified Auction for Value Expression): A proposed future chain dedicated to MEV, aiming to decentralize block building and create a more efficient, transparent market for order flow, potentially changing how back-running is executed.
04

Arbitrage vs. Back-Running

Back-running is often a form of deterministic arbitrage, but not all arbitrage is back-running.

  • General DEX Arbitrage: Exploits price differences between two platforms (e.g., Uniswap vs. Sushiswap) after they occur. This is a pure back-run of a market inefficiency.
  • Liquidation Back-running: After a loan becomes undercollateralized and a liquidation is triggered, bots back-run the public liquidation call to capture the liquidation bonus.

Key differentiator: Back-running specifically exploits the immediate, predictable state change caused by a known prior transaction.

05

Impact on User Experience

Back-running has measurable consequences for regular users and network performance.

  • Increased Slippage: Sandwich attacks (front-run + back-run) directly increase the slippage experienced by the victim's trade.
  • Network Congestion: Bots spam the network with high-fee transactions to land their back-run, increasing gas prices for everyone.
  • Profit Extraction: MEV from back-running and other strategies represents value extracted from everyday users, estimated in the hundreds of millions of dollars annually.

This creates a strong incentive for solutions like private RPCs (e.g., Flashbots Protect) that submit transactions directly to builders.

06

Related Technical Concepts

Understanding back-running requires familiarity with core blockchain mechanics.

  • Mempool: The pool of pending transactions where searchers scout for opportunities.
  • Transaction Ordering: Determined by block builders/proposers. Back-runners must get their transaction ordered immediately after the target.
  • Gas Auction: Bots compete via priority gas auctions (PGAs), bidding up transaction fees to win the right to be the back-runner.
  • Simulation: Bots extensively simulate blockchain state to ensure their back-run transaction is profitable before submitting it.
BACK-RUNNING

Common Misconceptions

Back-running is often misunderstood as a malicious exploit, but it is a legitimate and essential mechanism for blockchain network operation. This section clarifies its technical function, distinguishes it from related concepts, and explains its role in the transaction lifecycle.

Back-running is the process where a validator or block builder places a transaction in a block immediately after a specific target transaction, typically to capitalize on the state changes it creates. It works by observing a pending transaction in the mempool, calculating its outcome (e.g., a large trade on a DEX that moves an asset's price), and then submitting a new transaction with a higher gas fee to ensure it is included in the next block directly after the target. This is a core, permissionless function of public blockchains where transaction ordering is determined by fees and is not inherently malicious. For example, a searcher might back-run a successful arbitrage transaction to execute a similar trade and capture remaining profit.

BACK-RUNNING

Frequently Asked Questions (FAQ)

Back-running is a type of blockchain transaction ordering that exploits the visibility of pending transactions. These questions address its mechanics, impact, and relationship to other forms of Maximal Extractable Value (MEV).

Back-running is the act of placing a transaction immediately after a known pending transaction to profit from its execution. It works by observing a pending transaction in the mempool (e.g., a large DEX swap) and submitting a new transaction with a higher gas fee to ensure a validator includes it in the next block, directly following the target. For example, a back-runner might see a trade that will move the price of an asset and immediately place an arbitrage trade to capture the price difference created by the initial transaction.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected direct pipeline