Observing a pending transaction in the mempool and submitting a transaction with a higher gas price to execute before it. In DeFi, this is commonly used to sandwich trades: buying before a large swap (raising the price) and selling after (profiting from the price impact the victim caused).
Security
Front-running
Related terms in Security
Reentrancy Attack
An exploit where a malicious contract calls back into the vulnerable contract before the first execution is co...
Flash Loan Attack
An exploit that uses uncollateralized flash loans to temporarily manipulate prices, governance votes, or oracl...
Invariant
A condition that must always be true throughout a contract's execution. In Uniswap V2, the key invariant is x ...
CEI Pattern
Checks-Effects-Interactions pattern. A Solidity best practice where you first validate inputs (Checks), then u...