MEV
Sandwiched on Solana: protecting swaps from MEV
- Published
- Reading time
- 3 min
Summary
What we propose
A sandwich attack is simple. A bot sees your swap before it lands, buys the token just ahead of you so your trade fills at a worse price, then sells straight after. You receive less; the bot keeps the difference. The only limit is the slippage you allowed.
The problem on Solana
Solana does not have a public mempool like Ethereum's, which led many to assume sandwiching was an Ethereum problem. It is not.
- Private order flow replaced the public mempool. Jito switched off its public mempool in March 2024 after a wave of sandwiching, but attacks moved to private channels. A talk on the state of Solana MEV at Accelerate 2025 described that shift: extraction became less visible, not less common. Public estimates of what sandwich bots have taken from Solana traders run into the hundreds of millions of dollars.
- Attacks spread across slots. In wide sandwiches, the front-run and back-run land in different slots, which makes them harder to detect and attribute.
- Users carry the defence. Most apps leave protection to a slippage setting. Memecoin and launchpad traders routinely set high slippage to make sure trades fill, which is exactly what a bot needs.
The proposal: protect in the protocol and the app
- 01Oracle-bounded minimum output. Programs can compare the expected output against an oracle or TWAP price and reject fills that deviate beyond a bound, regardless of what slippage the user typed.
- 02Smart default slippage. Compute slippage per trade from pool depth and volatility, rather than a fixed 1 percent or a user's habit of 20 percent. Show the expected and worst-case output in money, not percentages.
- 03Bundle or route privately. Submitting a swap as part of a bundle prevents a third party from inserting a transaction before it within that bundle. Route through providers with credible anti-sandwich policies, and measure.
- 04RFQ and batch execution for size. Large orders filled by quotes from market makers, or batched and cleared at one price, leave nothing to sandwich.
- 05Measure your users' losses. Index your own swaps, detect sandwiches around them and publish the number. What gets measured gets fixed, and it builds trust.
What changes with faster finality
Alpenglow, Solana's new consensus protocol, replaces TowerBFT; Solana's upgrade page lists its first phase activating on mainnet in October 2026, with finality targeted at around 150 milliseconds. Faster finality shortens how long a transaction is exposed, but block producers still order transactions within a slot. The Foundation's roadmap also points to encrypted transaction submission, which would remove the information bots rely on. Until then, the defences above are in builders' hands.
What to measure
- Sandwich rate. The share of your users' swaps that were sandwiched, by pair and by size.
- Value extracted. Total and per-trade loss to sandwiches, the number that makes the case internally.
- Realised versus expected output. The gap between the quote shown and what users received, before and after the changes.
- Failure rate. Swaps that revert because protection was too tight; protection that blocks trades is not protection.
How we would start
Add a sandwich detector to your indexer and look at a week of your own users' swaps; the number usually makes the case. Then move protection from the user's settings into the program and the router. This is part of our Solana and DeFi work, and the same indexing approach powers Meme Wallet.
Build it with us
The services that build this design.
More research
Keep reading.
- Agent reputation3 min read
Half of agent payment volume is fake. Reputation has to start from money that moved
Analysts found that roughly half of x402 transactions were wash trading or self-dealing, and star ratings are cheaper still to fake, so neither can safely gate money.Read article - Agent payments4 min read
Agent payments settle on promises. They should settle on proof
x402 and payment channels let agents pay for APIs and compute, but settlement is blind to whether the inference ran, on which model, or how many tokens it really used.Read article - DeFi security3 min read
In 2026, DeFi lost more to keys than to code
Most stolen value now flows through compromised private keys, thin multisigs, single-verifier bridges and governance powers with no delay, which a code audit does not cover.Read article
Start a build
Seen this problem in your own system?
What happens next
- 01Tell us what you are buildingA short note or a 30-minute call: the product, the chain if you know it, and where the money sits.
- 02Hear back within 48 hoursEvery message is read by the team, not a filter.
- 03A first working sessionWe walk through the threat model and the admin powers with you, then propose a scope and a plan.