Front-running
Front-running occurs when someone observes a pending action and gets a strategically related transaction executed before it to capture an advantage.
✦ Key Insight
Front-running can worsen prices, increase costs, or cause users' transactions to fail. It is especially relevant in decentralized trading, liquidations, NFT mints, and other applications where execution order changes economic outcomes.
✕ Common Misconceptions
Not every earlier transaction is malicious front-running. Normal arbitrage and independent users can also compete for execution. The key issue is whether someone uses knowledge of another pending action to gain an ordering advantage.
Detailed Explanation
In Practice
Dig Deeper
Slippage
Slippage is the difference between an expected trade price and the actual execution price.
Sandwich attack
A sandwich attack places one trade before and another after a user's DEX trade to profit from the price movement caused by that user's transaction.
Mempool
A mempool is a node's temporary pool of valid, unconfirmed transactions waiting to be included in a block.
MEV
MEV is value that can be extracted by strategically including, excluding, or ordering transactions around normal blockchain activity.
