Guides

Solana MEV Bots vs Anti-MEV Protection: Sandwich Attacks, Priority Fees & Staying Safe

Learn how MEV works on Solana, how sandwich attacks target meme traders, and how anti-MEV protection and priority fees can help you stay safe.

Updated: Jan 5, 2025
Crypto Ape
Crypto Ape
Security Researcher & Bot Auditor
Former white-hat hacker turned crypto security specialist. Audits smart contracts and trading bots for a living. Lost and made fortunes in DeFi.
10+ years cybersecurity Smart contract auditor

⚠️ Important: This content is for informational and educational purposes only. It is not financial advice. Meme coin trading involves substantial risk. Always do your own research and never invest more than you can afford to lose.

Introduction

You place a buy order for a hot new meme coin. The price is $0.001. You set 5% slippage, thinking that’s safe.

Your transaction goes through, but you bought at $0.0012—20% worse than expected. What happened?

You got sandwiched by an MEV bot. They saw your trade, front-ran it, and back-ran it, extracting value from your transaction.

This is MEV (Maximal Extractable Value) on Solana, and it’s costing meme traders millions every day. Understanding it—and how to protect yourself—is essential for survival.

What Is MEV on Solana (In Plain English)?

MEV stands for Maximal Extractable Value. It’s the profit that can be extracted from reordering, inserting, or censoring transactions in a block.

Simple Definition

MEV is the “tax” you pay to sophisticated bots that can see your trades before they execute and profit from them. Think of it as high-frequency trading, but on-chain and automated.

Comparison with Ethereum MEV

Ethereum MEV:

  • Happens in public mempool
  • Bots compete in gas price auctions
  • More established, well-studied
  • Often involves complex DeFi interactions

Solana MEV:

  • Higher throughput (more opportunities)
  • Priority fees instead of gas auctions
  • Less studied, evolving rapidly
  • Often simpler (swaps, snipes)

Solana-Specific Factors

High Throughput:

  • Solana processes thousands of transactions per second
  • More opportunities for MEV extraction
  • Faster competition between bots

Priority Fees:

  • You pay extra to get included faster
  • But higher fees also make you a target
  • Creates a delicate balance

Block Producers / Validators:

  • Validators can reorder transactions
  • They have some control over inclusion
  • This creates MEV opportunities

How a Solana MEV Bot Sees Your Trade

Let’s walk through exactly what happens when an MEV bot targets you.

Step-by-Step: The Sandwich Attack

Step 1: Your Transaction Enters the Queue

You submit a buy order:

  • Token: $NEWCOIN
  • Amount: 10 SOL
  • Slippage: 5%
  • Current price: $0.001

Your transaction enters Solana’s transaction queue (mempool).

Step 2: MEV Bot Scans for Opportunities

MEV bots constantly monitor the queue for profitable patterns:

  • Large swaps (yours is 10 SOL—significant)
  • Low liquidity pairs (new meme coins)
  • Outdated prices (price might have moved)

Your trade matches all criteria.

Step 3: Front-Run Buy

The MEV bot:

  • Sees your buy order
  • Calculates: “If I buy first, price goes up, then their buy pushes it higher, then I sell”
  • Places a buy order before yours with higher priority fee
  • Gets included in the block first

Step 4: Your Trade Executes

Your buy executes, but:

  • Price is now higher (MEV bot already bought)
  • You pay more than expected
  • Your slippage tolerance allows this

Step 5: Back-Run Sell

The MEV bot:

  • Immediately sells after your trade
  • Profits from the price difference
  • Your buy pushed price up, they capture that value

Result:

  • You paid $0.0012 instead of $0.001 (20% worse)
  • MEV bot made profit from the difference
  • You’re the victim of a sandwich attack

Why This Is Brutal on Thin Memecoins

Low Liquidity = Easy Target

  • New meme coins have low liquidity
  • Your 10 SOL trade moves price significantly
  • MEV bots can easily extract value
  • You pay the price

High Volatility = More Opportunities

  • Meme coins are volatile
  • Price moves quickly
  • More chances for MEV extraction
  • You’re always at risk

Priority Fees & Slippage: Double-Edged Settings

These two settings are your main defense—but they can also make you a target.

Priority Fees Explained

What They Do:

  • Pay extra SOL to get included faster
  • Higher fee = higher priority in block
  • Helps you get in before price moves

The Trade-Off:

  • Higher fees = faster inclusion (good)
  • Higher fees = more attractive to MEV (bad)
  • You’re paying to be first, but also signaling you’re valuable to extract

Example:

  • Normal priority: 0.0001 SOL
  • High priority: 0.001 SOL (10x)
  • You get in faster, but MEV bots see you coming

Slippage: The Slippery Slope

What It Does:

  • Maximum price change you’ll accept
  • 5% slippage = you’ll pay up to 5% more than expected
  • Protects against failed transactions

The Problem:

  • Too high (30%+) = easy victim for MEV
  • Too low (1%) = constant failed transactions
  • Finding the balance is hard

Example Scenarios:

Scenario 1: 1% Slippage

  • Price moves 2% before your trade
  • Transaction fails
  • You miss the opportunity
  • Too low

Scenario 2: 30% Slippage

  • MEV bot sees high slippage
  • They know you’ll accept bad price
  • They extract maximum value
  • You pay 25% worse than market
  • Too high

Scenario 3: 5% Slippage

  • Reasonable protection
  • Not too attractive to MEV
  • Usually executes successfully
  • Balanced

Using Example Numbers

Conservative Trade:

  • Priority fee: 0.0005 SOL (moderate)
  • Slippage: 3% (tight)
  • Result: Slower execution, less MEV risk

Aggressive Trade:

  • Priority fee: 0.002 SOL (high)
  • Slippage: 10% (loose)
  • Result: Faster execution, higher MEV risk

Anti-MEV on Solana – What Does It Actually Do?

“Anti-MEV” is a marketing term. Let’s see what it actually means.

RPC / Routing Settings

Some tools market “anti-MEV” RPC endpoints:

What They Claim:

  • Hide your transaction from public mempool
  • Route through private channels
  • Reduce visibility to MEV bots

The Reality:

  • Can help, but not perfect
  • MEV bots use multiple methods
  • Some still see your transactions
  • Not a guarantee

Techniques (High-Level)

Private Mempool:

  • Transaction not visible until confirmed
  • MEV bots can’t see it coming
  • But validators might still reorder

Transaction Batching:

  • Combine multiple transactions
  • Harder for MEV to isolate
  • But more complex to execute

Encrypted Transactions:

  • Hide transaction details
  • Revealed only at execution
  • Still experimental

Limitations

No Perfect Solution:

  • MEV evolves constantly
  • New extraction methods emerge
  • Protection is always one step behind
  • You can reduce risk, not eliminate it

MEV Evolves:

  • Bots adapt to new protections
  • They find new ways to extract value
  • Staying ahead is impossible
  • Focus on reducing, not eliminating

Photon’s Priority Fee Handling

Photon offers advanced priority fee controls:

  • Dynamic fee adjustment: Automatically adjusts based on network conditions
  • Fee optimization: Finds balance between speed and cost
  • MEV-aware routing: Uses techniques to reduce visibility

What This Means:

  • Not magic, but helpful
  • Reduces MEV risk
  • Doesn’t eliminate it
  • Still need good slippage settings

Practical Settings for Meme Traders

Here are practical settings profiles you can use.

Conservative Profile

Settings:

  • Priority fee: 0.0005 SOL (moderate)
  • Slippage: 3-5% (tight)
  • Max trade size: 2 SOL (small)

Best For:

  • Established tokens with good liquidity
  • When speed isn’t critical
  • Risk-averse traders
  • Learning phase

Trade-Offs:

  • Slower execution (might miss fast moves)
  • Lower MEV risk
  • More failed transactions (if slippage too tight)

Standard Profile

Settings:

  • Priority fee: 0.001 SOL (standard)
  • Slippage: 5-8% (balanced)
  • Max trade size: 5 SOL (medium)

Best For:

  • Most meme coin trading
  • Balanced risk/reward
  • Experienced traders
  • Regular use

Trade-Offs:

  • Moderate execution speed
  • Moderate MEV risk
  • Good balance overall

Aggressive Profile (Experienced Only)

Settings:

  • Priority fee: 0.002+ SOL (high)
  • Slippage: 10-15% (loose)
  • Max trade size: 10+ SOL (large)

Best For:

  • Time-sensitive snipes
  • High-conviction trades
  • Experienced traders only
  • When being first matters

Trade-Offs:

  • Fast execution
  • Higher MEV risk
  • Higher costs
  • Accept worse prices

Thinking in Terms of: First vs. Alive

“First” Strategy:

  • High priority fees
  • Loose slippage
  • Get in before others
  • Accept MEV as cost of speed

“Alive” Strategy:

  • Moderate priority fees
  • Tight slippage
  • Wait for better entry
  • Reduce MEV exposure

The Question: How critical is being “first” vs. being “alive” (profitable)?

Spotting MEV Symptoms in Your Own Trades

How do you know if you’re being targeted by MEV bots?

Signs You’re Getting MEV’d

1. Constantly Worse Prices Than Expected

  • You set 5% slippage
  • You consistently get 4-5% worse prices
  • Not random—systematic
  • Likely MEV extraction

2. Transactions Fail Just as Price Spikes

  • Price moves 2%
  • Your transaction fails (slippage too tight)
  • But you see others trading at that price
  • MEV bots got in first, moved price

3. Price Moves Immediately After Your Trade

  • You buy at $0.001
  • Price immediately jumps to $0.0012
  • Then drops back down
  • Classic sandwich pattern

4. High Priority Fees But Still Slow

  • You pay 0.002 SOL priority
  • Transaction still takes 5+ seconds
  • Others seem faster
  • MEV bots outbidding you

Reviewing Your Own Fills

Check On-Chain:

  • Use Solscan to see your actual fills
  • Compare to expected price
  • Look for patterns

Compare to Market:

  • What was market price when you traded?
  • How much worse did you do?
  • Is it consistent?

Track Over Time:

  • Keep a log of your trades
  • Note slippage vs. actual fills
  • Identify patterns

Combining Anti-MEV with Honeypot & Rug Checks

Anti-MEV is just one layer. Combine it with other safety measures.

The Full Pre-Trade Checklist

Safety Layer:

  • Honeypot check passed (see Honeypot Guide)
  • Contract scanned, no obvious exploits
  • LP locked or acceptable

MEV Risk Layer:

  • Appropriate priority fee set
  • Slippage not too high
  • Using anti-MEV features if available
  • Liquidity adequate for trade size

Execution Layer:

  • Using fast execution bot (BullX, Trojan)
  • Settings optimized for this trade
  • Risk management in place

Liquidity and Volatility Considerations

High Liquidity:

  • Less MEV risk (harder to move price)
  • Can use tighter slippage
  • Lower priority fees acceptable

Low Liquidity:

  • Higher MEV risk (easier to move price)
  • Need looser slippage
  • Higher priority fees might help

High Volatility:

  • More MEV opportunities
  • Need wider slippage
  • Higher risk overall

Here’s how to think about settings in popular bots.

Photon Priority Fee / Slippage

Photon offers:

  • Priority fee slider: Adjust based on urgency
  • Slippage controls: Set maximum acceptable
  • Auto-optimization: Bot suggests settings

Tips:

  • Start conservative, increase if needed
  • Use auto-optimization as starting point
  • Adjust based on liquidity
  • Don’t max out everything

BullX Neo Optimal Settings

BullX focuses on speed:

  • Priority fee: Higher = faster
  • Slippage: Balance speed vs. price
  • Anti-MEV features: Built-in protection

Tips:

  • Use recommended presets
  • Adjust for token liquidity
  • Test with small sizes first
  • Monitor actual fills

Trojan Sniper Settings

Trojan is mobile-focused:

  • Simplified controls: Easier to use
  • Preset profiles: Quick selection
  • Safety defaults: Conservative by default

Tips:

  • Use presets unless experienced
  • Don’t override safety defaults
  • Test on small trades first
  • Mobile = less control, more safety

Direct to Settings Guides

For detailed configuration and settings:

Final Thoughts – MEV Is a Tax, Not a Bug

Here’s the reality check.

MEV as a Cost of Playing

MEV is like a tax on trading:

  • You can’t avoid it completely
  • You can reduce it
  • You can optimize for it
  • But it’s always there

The Question: How much are you willing to pay?

Thinking in EV, Not Emotion

Expected Value (EV) Thinking:

  • If trade has 60% chance of 2x
  • But you lose 10% to MEV
  • Net EV is still positive
  • Focus on overall strategy

Emotional Thinking:

  • “I hate paying MEV”
  • Avoid all MEV risk
  • Miss profitable opportunities
  • Lower overall returns

The Balance

You Can’t Eliminate MEV:

  • It’s part of the system
  • Fighting it completely = missing opportunities
  • Accept it as a cost

You Can Optimize:

  • Use appropriate settings
  • Combine safety measures
  • Focus on net profitability
  • Not just avoiding MEV

Final Advice

  1. Understand MEV - Know what you’re up against
  2. Use Tools - Anti-MEV features help
  3. Optimize Settings - Balance speed vs. cost
  4. Think in EV - Focus on net profitability
  5. Accept Reality - MEV is a tax, not a bug

For more on building a complete trading strategy, check out our guide on Building Your Solana Meme Trading Stack.


Disclaimer: This is not financial advice. MEV protection reduces but does not eliminate risk. Settings should be adjusted based on your risk tolerance and trading experience. Always test with small amounts first. See our full Risk Disclaimer.

#solana #mev #security #advanced #trading

🤖 Related Trading Bots

📖 Related Terms

Frequently Asked Questions

Is this financial advice?

No. All content on MemeGateway is for informational and educational purposes only. We are not financial advisors. Always do your own research before making any investment decisions.

How do you review trading bots?

We evaluate bots based on security audits, key storage methods, user reviews, features, supported chains, and overall reliability. Our team tests each bot and aggregates community feedback.

Do you earn from affiliate links?

Yes. We earn commissions when you use our referral links. This helps us maintain the site and continue providing free content. Our reviews remain honest and unbiased.