Glossary

Front-Running

Front-running is trading ahead of a known pending order to profit from the price impact that order will cause. The front-runner sees that a large buy is coming, buys first, lets the big order push the price up, and sells into it.

In traditional finance, front-running typically involves a broker abusing knowledge of client orders and is illegal. In crypto, a distinct on-chain form emerged: pending transactions on chains like Ethereum are visible in the public mempool before confirmation, so bots can spot a large DEX swap and pay higher gas to get their own transaction ordered ahead of it. For example, a bot seeing a $500,000 token buy pending can buy first, ride the price impact, and sell immediately after — the sandwich attack combines this with a sell placed right behind the victim's trade.

This activity falls under MEV (maximal extractable value), and the ecosystem has developed defenses: private transaction relays that bypass the public mempool, batch auctions, and DEX designs that reduce ordering advantages. Users protect themselves with tight slippage tolerances and MEV-protected RPC endpoints. A common misconception is that blockchain transparency prevents front-running; visibility of pending transactions is precisely what enables this variety of it.