The Slippage Desk

Home › Protection & Law › How to Check If You Were Sandwiched on a Block Explorer

How to Check If You Were Sandwiched on a Block Explorer

Editorial team · Updated 2026-10-14 · 5 min read

To check whether you were sandwiched, open your swap on a block explorer, look at the transactions just before and just after it in the same block, and see whether one address traded the same pool on both sides of yours. If so, and your output was near your minimum, a sandwich is very likely.

Step 1: Find the transaction

Copy the transaction hash from your wallet’s history and paste it into the explorer for your chain. Note the block number and your transaction’s position in the block. Explorers show this as a “position” or index.

Step 2: Look at the neighbours

Open the block and list the transactions around yours. You are looking for two transactions from the same sender, one just before and one just after, both touching the same pool or router as your swap. They may not be adjacent if the bot used a bundle with other transactions in between, but they will usually be close.

Step 3: Read the direction of each trade

Transaction What a sandwich looks like
Before yours Same token bought, same pool, by an unfamiliar address
Yours Executed at a worse price than the quote, near your minimum received
After yours The same address sells the token back into the same pool

If the first trade is a buy of the token you were also buying, and the last is a sell by the same address, that is the pattern. How a sandwich bot works explains why it is arranged this way.

Key takeaway: the signature is one address on both sides of your trade in the same pool, with your fill landing close to your minimum.

Step 4: Compare with your minimum

Your transaction includes a minimum amount out. Compare the actual received amount with it. If you got almost exactly the minimum, a bot may have pushed the price to your limit. That strongly suggests the sandwich used all of your slippage budget; see slippage tolerance explained.

Step 5: Estimate the cost

An estimate, not a precise figure:

  1. Find the pool’s price just before the bot’s front-run.
  2. Compute what you would have received at that price.
  3. Subtract what you actually received.
  4. Note the gas you paid, too.

Because your own trade also moves the price, some of the difference is ordinary price impact, not attack. A rough way to separate them is to ask what the same swap would have yielded without the bot’s front-run; an explorer or analytics tool may offer such a simulation, but verify it.

Step 6: Use detection tools carefully

Several analytics dashboards and explorers label suspected sandwich transactions. They help but are not authoritative, and detection rules differ. Treat flags as leads. Confirm using the manual steps above.

False positives

Not every bot trade next to yours is a sandwich. Common lookalikes:

  • An arbitrage bot trading in the same block after your swap, a back-run without a front-run.
  • A trader who happened to buy before you in a busy pool.
  • Aggregator routing that touches the same pool in several steps.

The test is the pairing: a trade before and a trade after from the same address, around yours, with the net gain flowing to that address. A back-run alone, discussed in sandwich attack vs front-running, is a different thing.

What to do next time

Tighten your slippage, trade smaller, and consider private routing, as listed in how to avoid sandwich attacks. Flashbots’ documentation describes its Protect service as aimed at preventing frontrunning and sandwiching, and other services exist.

Why the evidence is public

Everything about a sandwich appears in public block data. That is also why researchers can study it, and why operators’ margins erode as rivals copy visible patterns. On the vendor side, CryptoMEV Bot’s sandwich bot page describes a bot that watches for large swaps with high slippage tolerance, and the on-chain record shows what that looks like from the victim’s perspective. For another vendor-side explanation of the taxonomy, see the what is an MEV bot article, read as a vendor explainer. On Solana, the same approach works with a Solana explorer; see the Solana guide.

A note on expectations

You will rarely recover a loss from a sandwich. The point of checking is to learn which of your habits to change.

Worked reading of a suspected case

Suppose you swapped into a token and received barely more than your minimum. On the explorer, the transaction just before yours shows an unknown address buying the same token in the same pool. The transaction just after shows that address selling the token back. Between the two, your swap executed at a price worse than the quote suggested. All three transactions touch the same pool contract, and the unknown address ends with more of the starting asset than it began with.

That is a textbook sandwich. In a less clear case, the two outer transactions might come from different addresses, in which case the pattern is more likely a coincidence of independent traders, or from related addresses that you cannot easily link. Without a clear pairing, be cautious about calling it an attack.

Keeping a simple log

If you trade often, keep a note of each swap: the quote, the minimum received, the actual received and the block position. After a few weeks, patterns appear. You may find that trades through one router or at one slippage setting are repeatedly filled near the minimum, which is a signal to change habits. The log also lets you measure whether protective routing helped, by comparing fills before and after you switched.

Chain differences to keep in mind

On Ethereum-style chains, the ordering within a block is easy to read and the sandwich pattern is usually tight. On Solana, a transaction may carry several instructions and routes through multiple pools, so the same pattern can be harder to spot; you may need to open the instruction details and follow token transfers rather than relying on the summary view. Fast block times also mean fewer neighbouring transactions to inspect, but more of them touch the same popular pools.

If you want to understand what the other side is doing, the vendor’s Solana MEV bot page describes Jito bundle support for atomic execution, which explains why the three transactions often appear packaged together.

When to stop investigating

If the numbers show a gap smaller than the gas fee you paid, the effort of a detailed investigation rarely pays. Save the time for trades that are large enough to matter, and put the lesson into your settings.

This article is educational and not financial or legal advice.

Frequently asked questions

How can I tell if my swap was sandwiched?

Open your transaction on a block explorer, look at the transactions immediately before and after it in the same block, and see whether one address traded the same pool on both sides.

Can a tool detect it for me?

Some analytics sites and explorers flag suspected sandwiches. Their coverage and accuracy vary, so confirm by reading the transactions.

How do I estimate how much I lost?

Compare the price you got with the price just before the front-run in the same pool. The difference times your amount is an estimate, not an exact figure.

Can I get the money back?

Usually not. The trade executed within your slippage limit. Prevention through tighter settings and protected routing is the practical answer.

Sources