Back Running
Back running is a form of Maximal Extractable Value (MEV) in decentralized finance in which a bot places a transaction immediately after a large trade to capture the price arbitrage that the large trade creates in an AMM pool. When a substantial trade occurs through an automated market maker, it shifts the pool's token price away from the prevailing market price on other venues. A back-running bot detects the large trade in the public mempool, submits its own transaction positioned to execute right after, and profits from the gap between the post-trade price in the AMM and the current market price elsewhere before arbitrageurs on other platforms can close the spread.
Back Running vs. Front Running vs. Sandwich Attacks
MEV extraction exists on a spectrum of harm to the original trader. Back running, in isolation, is the least harmful type. The back-runner's transaction is positioned after the victim's trade, meaning it does not affect the price at which the victim's trade executes. The victim receives the same outcome they would have received in the absence of the back-running transaction. The back-runner simply captures an arbitrage opportunity the victim left on the table.
Front running, by contrast, positions a transaction before the target trade, buying the same token the victim intends to buy, pushing the price up before the victim's order executes. The victim pays more than they would have in the absence of the front-runner.
The sandwich attack is the most harmful combination: a front-running buy executes before the victim, pushing the price up; the victim's trade executes at the inflated price; a back-running sell executes after, capturing the difference. The victim receives a worse price than they would have on a fair market. According to EigenPhi research, sandwich attacks extracted more than $900 million from DeFi users in 2023, averaging approximately $2.5 million per day.
How Back Running Works Mechanically
- A large trade is submitted to the Ethereum mempool, where it is visible to all network participants before confirmation.
- A back-running bot detects the trade and estimates the post-execution price impact on the pool.
- The bot calculates whether purchasing the token now (while it is still at the pre-trade price on external venues) and selling after the victim's trade moves the AMM price would be profitable.
- The bot submits a transaction with higher gas to ensure it is included in the same block, positioned immediately after the victim's trade.
- After the victim's trade executes and shifts the pool price, the bot's trade executes, completing the arbitrage at the new price.
Protection Mechanisms
| Protection | How It Works |
|---|---|
| Private mempools / MEV Blockers | Transactions are submitted directly to validators without appearing in the public mempool, preventing bots from detecting the trade before inclusion |
| Flashbots Protect RPC | Routes transactions through Flashbots' private relay, bypassing the public mempool |
| Large liquidity pools | Larger pools have more total reserves, so any given trade creates a smaller percentage price impact, reducing the arbitrage opportunity |
| Splitting trades | Dividing a large trade into multiple smaller transactions reduces the price impact of each individual order |
Sources
- CoW Protocol – What is Backrunning: https://cow.fi/learn/what-is-backrunning-mev-attacks-explained
- ZEMYTH – What is a Sandwich Attack: https://www.zemyth.app/academy/docs/glossary/what-is-a-sandwich-attack
- CoinTelegraph – Sandwich Attacks in Crypto Explained: https://cointelegraph.com/explained/sandwich-attacks-in-crypto-explained-how-to-stay-safe
- Uniswap – What is a Sandwich Attack: https://support.uniswap.org/hc/en-us/articles/19387081481741-What-is-a-sandwich-attack
.webp)







.webp)