Falcontrace
On-Chain Analysis

MEV on Solana: How Frontrunning Works and How to Avoid It

Falcontrace Team·
MEV on Solana: How Frontrunning Works and How to Avoid It

Every transaction you send on Solana is visible before it's confirmed. Here's how MEV bots frontrun trades, what sandwich attacks look like, and how to protect yourself.

Your transaction is public before it's confirmed

When you submit a transaction on Solana, it sits in the mempool — a queue of pending transactions visible to validators and anyone watching the network. MEV bots scan this queue for profitable opportunities, then insert their own transactions ahead of yours.

This is Maximal Extractable Value (MEV): the profit bots extract by reordering, inserting, or censoring transactions. On Solana, MEV is less aggressive than on Ethereum, but it still costs traders millions every year.

How frontrunning works on Solana

A frontrunning bot works in three steps:

  • Step 1: Monitor the mempool for a pending transaction that will move the price (e.g., a large buy on Jupiter).
  • Step 2: Submit the same transaction with a higher priority fee, getting it confirmed first.
  • Step 3: Sell into the price pump created by the victim's transaction, profiting from the spread.

On Solana, frontrunning is particularly effective during meme coin launches and volatile market moments when traders use high priority fees to get fast execution.

Sandwich attacks explained

A sandwich attack is a more sophisticated form of MEV extraction:

  • Front: Bot buys the token just before your transaction, driving the price up.
  • Middle: Your transaction executes at the inflated price.
  • Back: Bot sells the tokens immediately after, profiting from the price difference.

Sandwich attacks are most common on DEXes with public order books. On Solana, they happen primarily on Raydium and Orca pools during high-volume trading.

You'll know you've been sandwiched if your trade executed at a significantly worse price than expected, and you see a buy + sell from the same wallet within seconds of your transaction.

Jito bundles: the MEV protection layer

Jito is a Solana validator client that operates a private mempool — a separate channel where transactions are not visible to the public. Bots can't frontrun what they can't see.

Jito offers two types of protection:

  • Private mempool: Your transaction goes directly to Jito validators, bypassing the public mempool entirely.
  • Bundles: Group your transaction with others in a way that makes frontrunning unprofitable.

Most serious trading bots on Solana route through Jito already. Banana Gun, Maestro, and Trojan all offer Jito integration as an option.

How to avoid getting frontrun

1. Use private mempools

If your wallet or bot supports Jito, enable it. The small extra fee (0.0001-0.001 SOL) is worth the protection. In Phantom, you can enable Jito protection in settings.

2. Set reasonable slippage

High slippage tolerance makes you a target. On Jupiter, use 0.5-1% slippage for normal trades, not 5-10%. Tight slippage makes sandwich attacks unprofitable.

3. Avoid trading during peak congestion

Meme coin launches and NFT mints create ideal conditions for MEV extraction. If you must trade during these windows, use Jito routing and accept slower execution.

4. Check transaction simulation

Jupiter and most wallets show you the expected output before you confirm. If the simulated price is significantly worse than the current market price, cancel and try again.

Monitoring MEV activity on Solana

Falcontrace's Pulse dashboard shows when MEV activity spikes on the network — a surge of tightly-clustered buy-sell pairs from bot wallets. When you see the Pulse showing sandwich activity, it's a signal that network conditions are favorable for MEV extraction. Consider switching to Jito protection before your next trade.