Maximum extractable value, or MEV, refers to profit that specialized actors extract by reordering, inserting, or censoring transactions in a block before it's confirmed. On decentralized exchanges this most often shows up as frontrunning, where a bot spots a pending trade in the public mempool and inserts its own transactions around it to profit at the trader's expense.
Why the public mempool is the weak point
When you submit a trade on a decentralized exchange, it doesn't settle instantly. It sits in a public queue called the mempool while validators decide which transactions to include in the next block. Anyone can watch that queue, and MEV searchers run algorithms specifically to spot profitable trades sitting there and pay higher gas fees to get their own transactions processed first. The value they extract comes directly out of the original trader's execution price.
Reducing slippage exposure
Wallets often default slippage tolerance to 2% or 3%, which leaves a wide profit margin for a sandwich bot to work within. Tightening that to somewhere between 0.1% and 0.5% on liquid pairs shrinks the room a bot has to extract value, though setting it too tight can cause legitimate trades to fail during normal price movement.
Routing around the public mempool
Private RPC endpoints such as Flashbots Protect or MEV-Blocker send a transaction directly to block builders instead of broadcasting it publicly, which means searchers never see it sitting in a queue to attack. Batch-auction, intent-based exchanges like CoW Swap take a different approach entirely, matching trades peer-to-peer off-chain before they ever touch the public order flow, which removes the frontrunning opportunity at its source rather than just making it harder to execute.