Explore how MEV affects DeFi transactions on Solana, why it's different from Ethereum, and how developers can defend against frontrunning, sandwiching, and liquidation risks.
Maximum Extractable Value (MEV) refers to the profit that validators or searchers can extract by reordering, including, or excluding transactions within a block. Even though Solana doesn't have a public mempool like Ethereum, MEV is still very real — powered by private relays, validator strategies, and high-performance bots.
On Solana, MEV shows up in several key forms:
Understanding these mechanics is critical for developers building trading bots, DEXs, or DeFi protocols.
Solana's architecture changes the game for MEV in several ways:
These differences reduce visibility but don't eliminate MEV — they simply move the competition to private channels and validator collusion.
The most common form of MEV is arbitrage between DEXs. Thanks to Solana's composability, bots execute atomic swaps across platforms within one transaction.
Example:
Buy 1 SOL at $199 on DEX A
Sell 1 SOL at $200 on DEX B
Profit: $1 (minus fees)
Due to low fees, bots send thousands of attempts per second — even failed transactions are cheap. This high-volume approach makes Solana DeFi highly competitive and price-efficient.
Sandwiching involves placing trades around a victim's swap:
If the user has high slippage tolerance (e.g., 5%), attackers can safely exploit it. While Solana lacks a mempool, private access and bundle submission via validators enable such strategies.
In lending protocols, bots compete to liquidate positions that fall below safety thresholds. The first bot to land a transaction wins — others fail. These battles are fueled by real-time monitoring of price oracles and account health.
Liquidations help protect protocols from bad debt but also represent a core MEV category.
Unaddressed, MEV can harm both users and applications:
For trading bots, MEV means missed profits or being front-run. For DEXs, it can mean loss of user trust.
Here are ways developers can defend against MEV:
In congested times, attach a priority fee per compute unit to your transaction. This increases your chance of getting into the block and beating spam.
You can add runtime assertions to your transaction that verify post-conditions (e.g., token balances) and reject the transaction if something looks wrong.
Set slippage thresholds conservatively. When possible, use limit orders to eliminate the chance of sandwiching entirely.
Some validators participate in MEV extraction. Keep an eye on how your transactions land and consider routing through known "honest" relays or providers.
If you're executing a multi-step trade, send it as a bundle directly to a block producer to avoid public exposure. This can protect you from sandwiching and frontrunning.
MEV on Solana is subtle, fast, and often invisible — but it's there. Developers building any financial tool on Solana must account for it. By understanding the unique mechanics of the chain and implementing proactive protections, you can secure your users' trades and keep your application profitable.