Your signed swap can stay exactly the same while the trades around it change what it receives.
An MEV sandwich attack exploits that ordering. For a reader comparing a quote with a completed swap, the question is what happened to the relevant pool before the swap ran, and how connected transactions used that change. An unexpected result is not a diagnosis on its own.
This explainer uses a fictional AMM sequence on Ethereum. It supplies no bot code, transaction payload, bidding strategy or recipe for extracting a profit. Uniswap's documentation provides a named protocol example, not an allegation about a particular pool or trade.
MEV concerns inclusion and ordering
Ethereum.org's MEV overview describes value associated with including, excluding and ordering transactions beyond the ordinary block reward and gas fees. Sandwich trading is one form. The broader term also covers activities such as arbitrage and liquidations; calling something MEV does not, by itself, establish a sandwich.
Searchers look for opportunities and submit transactions or bundles. In the external-builder arrangement described by Flashbots, builders combine transactions and bundles into candidate blocks, which pass through relays toward proposers. This is not a first-come, first-served queue guaranteed by your wallet.
It is also too simple to say that a higher displayed gas fee always fixes the order. Bundles, builder choices and the route by which a request reaches them matter. Paying more is not a general sandwich defense or a reservation of a favorable position.
The sandwich: before, reader, after
Assume a fictional pool swaps input token Q for output token T. The reader intends to buy T with Q. We omit quantities and profit calculations because the point is the order, not an attack-sizing exercise.
| Position in the example | Action | Why it matters to the reader |
|---|---|---|
| Before | Searcher A buys T using Q | The pool state moves so the following T purchase has a worse exchange rate |
| Middle | The reader buys T using Q | The reader's unchanged instructions now encounter that altered state |
| After | Searcher A sells T back for Q | The searcher tries to unwind after the reader's trade has moved the pool further |
This is a simplified mechanism from Ethereum.org's sandwich example. The two outer trades are related legs in our invented sequence. Their presence is stipulated here; it has not been inferred from a real block.
The Uniswap v2 integration guide describes this before-and-after manipulation around a swap and the need for independent price checks. Its example concerns v2 smart-contract integration. Other pool designs, routes, fees and v4 hooks can change the details; this is not one universal implementation diagram.
The searcher seeks a benefit at the reader's expense, but success and net profit are not automatic. Fees, competing activity, liquidity and execution conditions matter. Ethereum.org also notes that sandwiching has execution risk. We do not turn the sequence into a guaranteed-profit claim.
Price impact is not evidence of a sandwich
An AMM trade can move the price because it consumes available liquidity. That is the trade's own price impact. A quote can account for that before any attack is involved.
Other transactions or market changes can then alter the result while the request is pending. Uniswap's swap overview separates price impact from those later changes and describes integration-level bounds. Our slippage versus price-impact explainer owns the quote arithmetic and units.
A shortfall against a quote does not identify its cause. Likewise, two neighboring trades are not enough to prove common control or intent. A report about a real incident needs the exact route, pool, ordered transactions, transfers, state changes and evidence connecting the relevant actors. A screenshot of a disappointing output cannot supply all of that.
What an output floor can and cannot do
For an exact-input swap, a correctly enforced minimum output rejects results below its threshold. It does not preserve the original quote or require that the accepted result be economically attractive.
Take a separate, fictional boundary example with a minimum of 50 T. An output of 49 T fails that condition. An output of 50 T meets it, as does 51 T. These are alternative outcomes, not observed trades, attack inputs or a recommended setting. Passing this one condition does not prove that every other execution check passes.
The bound addresses permitted execution, not the identity of whoever traded first. A tighter bound can reject more outcomes, including legitimate changes; a wider one permits more variation. Neither choice is a diagnosis. The liquidity available for the actual order also matters, which is why a large market-cap number is not executable depth.
An included transaction that reverts can still incur gas. The revert explainer separates that case from a request that was never submitted. This page gives no tolerance percentage or instruction to weaken a limit after an error.
Private routing changes who sees the request
Flashbots Protect describes sending transactions through its private mempool to protect against public-mempool frontrunning and sandwich bots. That is a provider's documented mechanism, not our test of every route or a promise about every transaction.
Private does not mean invisible to every intermediary. Flashbots' settings guide explains which builders receive requests and which information can be shared with searchers. Its fast mode has a wider sharing model than the default route, including protected-environment processing. The guide expressly says that adding builders adds trust in those builders.
The builder overview also discusses intermediary visibility and trust assumptions. Read the actual configuration and provider scope rather than treating "private" as a universal security label. This is not a recommendation to install an RPC, change wallet settings or submit a transaction. No route was tested here.
A preview does not hold your place
A successful transaction simulation can describe execution against a selected state. It does not stop an earlier trade changing the state your eventual swap reaches. An enforced outcome condition is a different mechanism from a favorable preview.
There is no guarantee here of execution, protection, refunds or profit. Even an accurately described ordering defense does not establish that the token, allowance or contract is otherwise trustworthy.
What to record before alleging an attack
Start with the network and complete transaction hash. Preserve the original quote if it exists, along with its time, token contracts, direction, route and encoded limits. Compare that with the included result and the relevant surrounding pool activity.
Keep observations separate from interpretation. "The trade received less than the quote" is one observation. "These linked transactions deliberately surrounded it" needs additional evidence. The distinction protects the reader from both a missed mechanism and an unsupported accusation.
An MEV sandwich attack is about a harmful ordering relationship, not a mysterious extra fee. Understanding that relationship helps explain what a swap limit or private route actually addresses, without pretending either can certify the whole trade.
Sources
Primary documentation checked October 26, 2026, Asia/Tbilisi. The AMM sequence and output-floor numbers are invented teaching examples. The Uniswap v2 guide is version-scoped; current overview material covers several designs. Flashbots' statements are provider descriptions with configuration and trust limits, not independently tested results. No wallet, node, RPC, trade, private route, attack or real incident was tested. Education, not trading or security assurance.
- Ethereum.org: MEV and sandwich trading.
- Uniswap v2: swap integration and sandwich safety considerations.
- Uniswap Developers: swaps, pool versions and user-level bounds.
- Flashbots Protect: stated protection mechanism.
- Flashbots Protect: settings, data sharing and builders.
- Flashbots: builders, relays and trust assumptions.
See something wrong? Brokzi logs material changes. Prepare a correction note.




