Solana Sandwich Attacks Explained: How They Work and How to Avoid Them
Understand how sandwich attacks work on Solana, why they differ from Ethereum, and practical strategies to protect your trades from MEV.

Understand how sandwich attacks work on Solana, why they differ from Ethereum, and practical strategies to protect your trades from MEV.

Disclosure: This article contains affiliate links. If you sign up through them, MadeOnSol may earn a commission at no extra cost to you. This never affects our rankings, ratings, or reviews.
Sandwich attacks are one of the most talked-about threats in DeFi trading. On Ethereum, they've extracted billions from unsuspecting traders. On Solana, the dynamics are different — but the risk is real and evolving. Understanding how sandwich attacks work is essential for anyone trading on decentralized exchanges.
A sandwich attack is a form of MEV (Maximal Extractable Value) where an attacker places two transactions around your trade — one before (frontrun) and one after (backrun) — to profit at your expense.
Here's the sequence:
The attacker's profit comes directly from the price impact your trade creates. You end up paying more (or receiving less) than you would have without the attack. The attacker takes the difference.
Say you're swapping 100 SOL for a memecoin on Raydium:
You lost ~30,000 tokens (worth ~3 SOL). The attacker gained ~1.5 SOL after fees. The remaining value went to the liquidity pool as price impact.
Solana's architecture is fundamentally different from Ethereum's, which changes how sandwich attacks operate.
On Ethereum, there's a public mempool where pending transactions wait to be included in blocks. Attackers monitor this mempool, identify profitable trades, and pay higher gas fees to get their frontrun transaction included first.
Solana doesn't have a traditional mempool. Transactions are forwarded directly to the current block leader (validator) via a protocol called QUIC. This means there's no public waiting room where attackers can easily see your pending transaction.
However, this doesn't make Solana immune to sandwich attacks.
Tools mentioned
Live health scores, average ratings, and direct links on MadeOnSol.

High-speed Telegram trading and sniping bot for Solana DEXs

Ultra-fast Solana trading terminal with MEV-protected execution

Professional charting and technical analysis platform for Solana token trading

Comprehensive review and comparison site for Solana trading bots
Build with MadeOnSol API
KOL tracking, deployer intelligence, DEX streaming, and webhooks. Free API key — 200 requests/day.
New customers try Pro free for 5 days — card, cancel anytime.
import { MadeOnSol } from "madeonsol";
// Get a free API key at madeonsol.com/pricing
const client = new MadeOnSol({ apiKey: "msk_your_key" });
const { trades } = await client.kol.feed({ limit: 10 });
const { alerts } = await client.deployer.alerts({ limit: 5 });
const { tools } = await client.tools.search({ q: "trading" });Keep reading

Trading
Learn how MEV works on Solana, what sandwich attacks and front-running actually cost you, and practical strategies to protect your trades using Jito tips, priority fees, private transactions, and slippage settings.

Guides
Copying bots disguised as smart money is one of the most common and costly mistakes in Solana copy trading. Here's how to spot them on-chain, why popular trackers miss them, and how to clean your KOL list before it costs you.

Trading Bots
OdinBot is a web-based Solana copy trading bot that lands a measured share of trades in the same block as the leader wallet. We tested it, broke down the fee math, and explain the 40% lifetime referral split.

Trading
Solana has no traditional mempool, but pending transactions are still observable. Learn how Solana mempool monitoring works with Jito bundles, gRPC streams, leader TPU forwarding, and ShredStream — plus practical tools and use cases for MEV detection, frontrun protection, and latency optimization.

Guides
Understand how liquidity works on Solana including AMM pools, concentrated liquidity, order books, slippage, and impermanent loss. Learn how to check liquidity before trading and why it matters.

Guides
Learn how to execute large trades on Solana without moving the market. Covers OTC platforms, escrow solutions, TWAP strategies, and best practices for institutional-size orders.
Enjoyed this article?
Real-time KOL trades, Pump.fun deployer intel, and 1,200+ ranked Solana tools — free to explore.
Open the KOL TrackerDespite no public mempool, attackers have several vectors:
1. Validator-level visibility: Validators who are currently producing blocks can see transactions as they arrive. A malicious or profit-seeking validator could reorder transactions within their block to sandwich profitable swaps.
2. QUIC stream monitoring: Attackers can run infrastructure close to validators and observe transaction propagation patterns, though this is less reliable than Ethereum's mempool.
3. Jito bundles (historical): Jito originally allowed anyone to submit transaction bundles with specific ordering, which could be used for sandwich attacks. Jito has since restricted this functionality, but the cat-and-mouse game continues.
4. Private infrastructure: Sophisticated attackers run their own RPC nodes and staked connections to gain visibility into pending transactions before they're confirmed.
Jito's block engine became central to Solana's MEV landscape. Jito tips (priority fees paid to validators through the Jito protocol) influence transaction ordering. While Jito has implemented policies against sandwich attacks and removed the public mempool feature from their block engine, the underlying economic incentives remain.
Validators still have the technical ability to reorder transactions within their blocks. The question is whether the incentive is strong enough and the risk of detection low enough to make sandwiching worthwhile.
Quantifying sandwich attack losses on Solana is harder than on Ethereum because of the architectural differences. However, analysis of on-chain data reveals:
Independent researchers estimate that Solana MEV extraction (including but not limited to sandwiching) runs into millions of dollars per month across all forms.
Slippage tolerance is your first line of defense. If you set 1% slippage, an attacker can only extract up to 1% of your trade value. The tighter your slippage, the less profitable (and more risky) a sandwich attack becomes.
On Jupiter, the default slippage is usually reasonable, but adjust it based on the token:
If your transaction fails due to slippage, that's actually the protection working — the attack would have cost you more than your slippage tolerance.
Several Solana trading tools now offer MEV protection:
These tools typically route your transactions through private submission channels (like Jito's block engine) rather than the public transaction pipeline, reducing the window for attackers to observe and react to your trades.
Instead of swapping 100 SOL in a single transaction, consider splitting it into smaller trades:
This approach trades time for safety. For large positions, it's almost always worth it.
Jupiter offers limit orders on Solana. Unlike market swaps, limit orders specify an exact price. There's no slippage to exploit because the trade only executes if the price matches your specified level.
Limit orders aren't vulnerable to sandwich attacks because the attacker can't force your order to execute at a worse price — the order simply won't fill if the price moves unfavorably.
While not foolproof, trading during lower-activity periods can reduce MEV risk:
Submitting transactions through a private or staked RPC connection reduces visibility to attackers. Standard public RPCs broadcast transactions more widely, giving attackers more time to observe them.
Many trading tools use staked connections by default. If you're building your own trading scripts, consider using a staked RPC connection from a provider like Helius or Triton.
It's worth understanding where sandwich attacks fit in the broader MEV landscape:
| MEV Type | Mechanism | Impact on You |
|---|---|---|
| Sandwich | Frontrun + backrun your trade | Worse price |
| Frontrunning | Copy your trade before it executes | Worse price |
| Backrunning | Arbitrage after your trade | No direct cost |
| Liquidation | Liquidate your leveraged position | Loss of collateral |
| JIT Liquidity | Provide liquidity only for your trade | Usually beneficial |
Not all MEV is harmful. Backrunning and JIT (Just-In-Time) liquidity can actually benefit traders by improving execution. Sandwich attacks are explicitly extractive — they only benefit the attacker.
The MEV landscape on Solana is evolving rapidly:
Validator incentives: As Solana's validator economics develop, the incentive for validators to participate in MEV extraction (or allow it) changes. Some validators publicly commit to not reordering transactions for MEV.
Protocol-level solutions: There's ongoing research into protocol-level changes that could make sandwich attacks structurally harder. Encrypted mempools, threshold encryption, and fair ordering protocols are all being explored.
Better tooling: Trading tools are increasingly building MEV protection into their default configuration, making protection automatic rather than opt-in.
Regulatory attention: As MEV becomes better understood, regulatory scrutiny is increasing. Some forms of MEV extraction may face legal challenges in regulated jurisdictions.
Sandwich attacks on Solana are less pervasive than on Ethereum, but they're not negligible. The low transaction fees that make Solana great for users also make MEV extraction cheaper for attackers.
The practical defense is straightforward: use tight slippage settings, trade through MEV-protected channels, split large orders, and consider limit orders for significant positions. These steps don't eliminate MEV risk entirely, but they reduce your exposure dramatically.
As the Solana ecosystem matures, expect MEV protection to become more robust at both the protocol and application level. In the meantime, understanding how sandwich attacks work puts you ahead of most traders who don't think about execution quality at all.
Sandwich attacks cost you value through your trade's execution, but they're not the only way Solana users lose funds — malicious wallet drainers and the broader playbook of on-chain scams account for far larger losses, and our guides on how wallet drainers steal your assets in a single signature and spotting the most common Solana scams cover how to defend against them.
For more on protecting yourself while trading on Solana, check out our MEV protection guide and wallet security checklist.
Yes, it's technically possible, but Jupiter has implemented MEV protection features that significantly reduce the risk. Using Jupiter's recommended settings (auto slippage, MEV protection enabled) provides good protection for most trades. Very large swaps on low-liquidity tokens remain the highest risk.
Check your transaction on Solscan or Solana Explorer. If you see a buy of the same token in the slot just before your trade (from a different wallet) and a sell just after, you may have been sandwiched. The telltale sign is that you received fewer tokens than the market price at the time you submitted the trade.
The legal status is unclear and varies by jurisdiction. In traditional markets, similar front-running is illegal. In DeFi, the regulatory framework is still developing. Some jurisdictions are beginning to classify certain MEV extraction as market manipulation, but enforcement on decentralized networks is challenging.
Using Jito for transaction submission can help because it sends your transaction through a private channel rather than the public pipeline. However, Jito tips alone don't guarantee protection — the validator producing the block still has some ability to reorder transactions. Combining Jito submission with tight slippage provides the best protection.
Not on their own — paying more just gets your transaction included faster, it doesn't change the ordering risk that makes sandwiching possible. Our breakdown of how Solana's base fees, priority fees, and Jito tips actually work explains the fee mechanics in detail and why speed alone isn't the same thing as MEV protection.