A sandwich attack is a trading tactic where an attacker places transactions before and after a victim’s pending trade to profit from the price movement they create. On Ethereum, it relies on mempool visibility and fast execution. The victim receives a worse price, while the attacker captures the spread created by the manipulated order flow.
Expanded Definition
A sandwich attack is a form of transaction manipulation in which an adversary exploits pending orders that are visible before settlement. The attacker submits one transaction to move price or execution conditions, then places a second transaction after the victim’s trade to extract profit from the resulting slippage. In public blockchain environments, especially where mempool visibility is broad and ordering can be influenced, the tactic depends on timing, fee competition, and predictable execution logic.
For security and risk teams, the term sits at the intersection of market integrity, transaction ordering, and blockchain execution design. It is related to front-running and back-running, but the sandwich pattern is distinct because the attacker deliberately brackets a victim’s trade to capture the value created by that trade itself. Industry usage is still evolving around whether certain variants should be treated as MEV, market abuse, or protocol-level exploitation, so definitions vary across vendors and research groups. Authoritative context on adversarial behavior and transaction abuse is often discussed alongside CISA cyber threat advisories and broader threat taxonomy such as the MITRE ATT&CK Enterprise Matrix, though neither is a formal definition of sandwiching itself.
The most common misapplication is treating all poor trade outcomes as sandwich attacks, which occurs when slippage, volatility, or normal market impact is mistaken for adversarial transaction sequencing.
Examples and Use Cases
Implementing anti-sandwich protections rigorously often introduces latency and execution constraints, requiring organisations to weigh better trade protection against reduced fill certainty or higher transaction costs.
- A DeFi trader submits a large swap into a public mempool, and an attacker observes it, buys the same asset first, then sells after the victim’s trade pushes price upward.
- A token launch on an automated market maker attracts bots that monitor pending transactions and repeatedly bracket incoming buys to capture spread from temporary price movement.
- An application routes user swaps through a public execution path without slippage controls, making it easier for searchers to target predictable order flow and extract value.
- A protocol team studies the attack surface alongside guidance on transaction abuse and adversarial tooling, using resources such as Anthropic — first AI-orchestrated cyber espionage campaign report and MITRE ATLAS adversarial AI threat matrix when automated agents are used to monitor or place trades.
- An exchange or wallet provider analyzes failed protection patterns after customer complaints, then adjusts routing, private order handling, or execution constraints to reduce exposure.
These use cases show that sandwich attacks are not limited to one chain or one asset class. They are most visible where order flow is public, execution is fast, and adversaries can react before final settlement.
Why It Matters for Security Teams
Sandwich attacks matter because they reveal how transaction visibility can become an exploitable control failure. For security teams, the risk is not only financial loss but also erosion of trust in execution fairness, especially in systems that promise best-effort pricing or user protection. Where identity and automation intersect, agentic trading systems can amplify the problem if an autonomous agent repeatedly submits predictable orders or reacts too slowly to adversarial conditions.
From a governance perspective, teams need to understand whether the threat is best addressed through protocol design, order routing, user-facing safeguards, or monitoring and detection. Controls inspired by NIST SP 800-53 Rev 5 Security and Privacy Controls can support auditability, monitoring, and boundary protection, even though the framework does not name sandwich attacks directly. In practice, mitigation often includes tighter slippage limits, private transaction submission, improved MEV-resistant routing, and alerting when repeated bracketing patterns appear.
Organisations typically encounter the operational impact only after users report worse-than-expected execution, at which point sandwich attack analysis becomes unavoidable to explain loss, restore confidence, and redesign the transaction path.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | GV.OC-03 | NIST CSF helps classify transaction fairness as part of operational outcomes and risk context. |
| NIST SP 800-53 Rev 5 | AU-6 | Audit review and analysis supports detection of suspicious transaction sequencing and repeated bracketing. |
| NIST AI RMF | AI RMF is relevant where autonomous agents place trades and may be manipulated through predictable behavior. | |
| OWASP Agentic AI Top 10 | Agentic systems can be coerced into harmful market actions through externally visible execution cues. |
Assess agentic trading workflows for exploitable predictability and require human oversight for high-risk actions.