What is MEV attack?

Published on 23 Jun 2025Updated on 3 Feb 20262 min read6

What is an MEV attack?

An MEV attack (Maximal Extractable Value attack) is a common phenomenon in blockchain transactions.

Attackers take advantage of their ability to influence transaction ordering by reordering, inserting, or excluding specific transactions. By manipulating the transaction sequence, they can affect asset prices and extract profit, which may result in financial losses for users.

How do attackers launch this type of attack?

Attackers continuously monitor the blockchain mempool to identify potentially high-value transactions. Once a target transaction is found, the attacker submits their own transaction with a higher gas fee, allowing it to be processed before the user’s transaction.

The attacker’s initial purchase drives up the token price, forcing the user to buy at a higher price than expected. After the user’s transaction is completed, the attacker immediately sells the token to profit from the price difference.

This process is commonly known as a “sandwich attack,” where the attacker places two of their own transactions before and after the victim’s transaction to extract profit.

How to prevent MEV attacks?

When you are using OKX Wallet for DEX transactions, some networks allow you to enable MEV protection or choose a transaction path. With MEV protection enabled, OKX Wallet will intelligently route your transaction through trusted third-party nodes, ensuring that the transaction order cannot be manipulated.

Note: MEV protection is currently supported on Ethereum, BSC, Base, and Solana networks. (Not all transaction modes are supported—please refer to the on-page instructions.)

Why am I still being attacked after enabling MEV protection?

When MEV protection is enabled, OKX Wallet routes your transactions through trusted third-party nodes to reduce the risk of MEV attacks. However, due to technical limitations in how third-party services identify transactions, some complex or unusual transactions may still be vulnerable. The protection mechanism cannot guarantee 100% coverage in all cases.