Transaction Frontrunning
Transaction frontrunning occurs when a malicious actor observes a pending transaction in the blockchain mempool and submits their own transaction with a higher gas fee to ensure it is processed first. In the context of decentralized exchanges, this allows the frontrunner to buy an asset before a large buy order pushes the price up, or sell before a large sell order pushes it down.
The frontrunner then executes a reverse trade to capture the price difference, effectively profiting at the expense of the original trader. This is a form of adversarial behavior that exploits the transparent nature of public blockchains.
It is a significant concern for protocol designers who aim to create fair and efficient market structures. Mitigation strategies often involve private mempools or commitment-reveal schemes.