Back to Glossary
AdvancedTrading

Front-Running

Definition

The practice of placing a transaction ahead of a known pending transaction to profit from the anticipated price impact. In crypto, front-runners monitor the mempool for large pending trades, then submit their own transaction with a higher gas fee to be included first. This is a primary form of MEV extraction and is often considered predatory, as it extracts value from regular users by worsening their execution prices.

Example

A bot detects a large pending buy order for a token on Uniswap. It quickly buys the token first (front-runs), then lets the victim's large order push the price up, and sells immediately after for a profit.

Related Terms

MEV (Maximal Extractable Value)

The maximum value that can be extracted from block production beyond standard block rewards and gas fees by including, excluding, or reordering transactions within a block. MEV is extracted by validators and specialized 'searchers' who identify profitable opportunities like arbitrage, liquidations, and sandwich attacks. The MEV ecosystem has evolved to include builder-searcher separation (MEV-Boost) to reduce negative externalities.

ADVTechnology

Sandwich Attack

A form of MEV exploitation where an attacker places two transactions around a victim's pending swap on a DEX — buying the token just before the victim's trade (front-run) to push the price up, then selling immediately after (back-run) once the victim's large order has further increased the price. The victim receives fewer tokens due to the artificially inflated price, and the attacker profits from the price difference.

ADVTrading

Mempool

The 'memory pool' — a holding area where unconfirmed transactions wait before being included in a block by miners or validators. Each node maintains its own version of the mempool. Transactions with higher fees are typically prioritized, which is how MEV searchers and front-runners identify profitable opportunities.

INTTechnology

DEX (Decentralized Exchange)

A cryptocurrency exchange that operates without a central authority, using smart contracts to enable peer-to-peer trading directly from users' wallets. DEXs never take custody of user funds. Most DEXs use automated market maker (AMM) models with liquidity pools, though some use on-chain order books.

INTTrading