
How to avoid sandwich attacks and MEV when trading Solana tokens
By ripr Editorial Team7 min read
The practical way to avoid sandwich attacks when trading Solana tokens is to make your order a poor target. A bot earns from sandwiching your trade only when that trade moves the price, and it can only take as much movement as your own maximum slippage allows. On ripr, both of those are yours to set before you confirm. Here is the routine, step by step: size the order to the pool, keep your maximum honest, read the sheet, then check the fill.
Why sandwich attacks happen on Solana, and what you control
A sandwich attack is a pair of trades placed around yours: one just before, which pushes the price up, and one just after, which sells into the price you have just paid. The profit is the gap your own order created. MEV, short for maximal extractable value, is the umbrella term for profit taken from deciding which transactions go into a block and in what order, and a sandwich is the version a retail trader meets.
Read that back and two conditions fall out. Your trade has to move the price enough to be worth sandwiching, and your settings have to allow it to move that far before the fill.
Both are yours. Order size against the depth behind the coin sets the first; your maximum slippage caps the second. Everything below is those two levers, plus the check you run afterwards.
Step 1: Size your order to the pool behind the coin
Order size against the coin's liquidity decides how far your own trade pushes the price, which is exactly what a sandwich feeds on. Depth varies more than most traders assume. In ripr's market data, the deepest pool behind one coin a couple of hours old held about $8,000 of SOL on its quote side, while the deepest pool behind a Solana token that has traded for more than a year held roughly $6.4 million. A $200 buy disappears into the second one and is a visible step in the first.
ripr's Explore screener has range filters for liquidity, market cap and age, so you can keep your working list to coins with real depth behind the quote. Sorting Explore by market cap also hides coins under $5,000 of liquidity or 100 holders unless you set those limits yourself. On iOS and Android, a coin page tells you when a coin has low liquidity, is under review or is still being checked.
ripr's help centre states the rule plainly: larger trades can move the quoted price more than small ones, especially in active or thin markets. Its page on how your buy size and sell size affect price is the one to keep open while you work out a size.
Step 2: Leave ripr's Auto slippage on
ripr's Auto slippage is on by default, and it sizes your maximum from how much the coin itself moved in the last five minutes, between 3% and 15%. That maximum is the ceiling on what any price move between the quote and the fill can take from you, a sandwich included.
A ceiling that tracks the coin beats a habit you carry between coins. Take the two coins above: the thin one moved several percent in five minutes, while the older token moved a fraction of a percent. A flat 15% on the quiet token would be a standing offer to anyone watching. A flat 3% on the fast one would reject almost every quote you tried.
If you would rather set it yourself, the presets are 1/3/5/10% in the web trade panel and 0.5/1/3/5/10% on iOS and Android. On iOS and Android a maximum above 5% is flagged, and Android asks you to confirm one above 25%. ripr's guidance on what slippage is and how to set it says to start with the default or Auto if you are new, and to raise it only when a swap keeps failing on fast price moves.
Step 3: Split a large order into smaller buys
A large order broken into smaller buys gives a bot less to work with, because each piece moves the price less than the whole would. ripr's help centre recommends the same habit: break big trades into multiple steps, and re-check each updated estimate.
The same page gives you the test. If your expected output drops sharply after you enter a bigger amount, the order may be too large for current market conditions. That drop is also the gap a sandwich would monetise, so shrink the order until the estimate behaves.
On a coin you have not traded before, start with a small test order. It tells you how the quote responds to your size for a fraction of the exposure.
Step 4: Read the trade sheet before you confirm
ripr's trade sheet is the last point where every number is still yours to change. On iOS and Android, ripr lists the network fee, any router fee and the refundable account deposit before you confirm. Check the amount and your maximum once more while you are there: those are the two numbers a sandwich trades against.
Behind the sheet, ripr's in-house execution layer prepares the transaction on its server, the app checks it on your device against the amount, slippage and fee limits you chose, and your wallet signs it. If anything differs from what you asked for, the app refuses it. That check is about the transaction, not about the coin itself.
If the price runs away while you are deciding, your maximum does its job and ripr says so plainly: "The price moved more than your max slippage, so nothing was bought. Only the network fee was spent. Raise max slippage or try again." A rejected trade leaves the network fee spent and the decision still in your hands.
How to tell whether a bad fill was a sandwich
A worse fill than the quote you saw is not proof of a sandwich. The help centre gives the ordinary explanation first: quotes update live, and your quote can change when other people trade before your confirmation. To tell the two apart, look at the order of trades around yours.
A ripr coin page lists recent trades and updates them live as they arrive. A sandwich leaves a recognisable shape there: a buy immediately before yours and a sell immediately after, usually similar in size, often from the same wallet.
The chart narrows it further. ripr's iOS and Android charts offer a tick view with your entry line and trade markers, and on web the 1-second candles cover the most recent few minutes, which is the window this happens in. For the raw ordering inside the block, paste the transaction signature into Solana's block explorer.
One thing is not evidence: a trade that sat for a while and then filled once. After you send, ripr follows the trade's status live until it confirms or provably expires, and because it is a single signature it can fill only once.
Frequently asked questions
Does a 1% maximum slippage stop sandwich attacks?
A 1% maximum caps what any price move between quote and fill can take from you, a sandwich included, but on a fast-moving Solana coin it also rejects most attempts. When the price passes your maximum, the app tells you nothing was bought and only the network fee was spent, and you can raise the maximum or try again. On a coin that swings several percent a minute, ripr's Auto slippage is the more workable setting.
Is a sandwich attack the same thing as a rug pull?
No. A sandwich attack is about trade ordering: somebody trades around your order and keeps the price gap. A rug pull is about the coin itself, usually its creator removing liquidity or dumping supply. Before you buy, ripr shows rule-based warnings for known rug patterns, such as a creator who holds unlocked liquidity, and it says plainly that not seeing a warning never means a coin is safe.
What should I check before buying a brand-new Solana coin on ripr?
Open the coin page before the buy sheet: ripr shows its rug-pattern warnings in the buy flow as well as on the coin page, and on iOS and Android the page tells you when liquidity is low or the checks are still running. Paste the full contract address into ripr's search instead of following a link from a chat, then start with a small test order.
Make your next order a quiet one
Sandwiching is an arithmetic problem before it is a security problem: no gap, nothing to take. Size the order to the pool, leave Auto slippage on, split anything large, read the sheet, then check the fill on the coin page.
Start on ripr's Explore screener with the liquidity filter set where you want it. If you want the sizing side worked out in full, read how to buy a Solana meme coin on ripr and how much to invest in meme coins.
Last verified 3 November 2026. This article is published by ripr, which builds an app for trading Solana coins. Nothing here is financial advice.
Keep reading

What is MEV and what is a sandwich attack on Solana?
What is MEV? It is the profit from controlling transaction order on Solana. How a sandwich attack works, and how to read a ripr fill.

Total fees when trading Solana meme coins: what you pay on ripr
On ripr, a Solana meme coin trade costs a 1% swap fee, Solana's network fee and a refundable first-buy deposit. Here is the full cost list.

Trading during Solana network congestion: how to trade on ripr when the network is busy
How to trade during Solana congestion on ripr: read the live data, set slippage for a fast market, size down, keep SOL spare and send once.