Loading...
FinchTrade

Definition

Transaction Sequencing Attacks

Learn how blockchain transaction ordering enables sandwich attacks, how sequencing relates to MEV, and why common protections have limits.

Transaction sequencing attacks are attempts to exploit the relative execution order or inclusion of blockchain transactions to extract value or disadvantage other participants. They matter when executing one transaction before another changes an application's state and therefore the outcome of later transactions. Ordered execution alone does not make a smart contract vulnerable; the dependence must create an exploitable opportunity.

How Transaction Ordering Is Exploited

A common setting for transaction sequencing attacks is a blockchain where pending transactions are publicly visible before execution. Automated searchers can inspect these transactions and identify situations in which acting before or after them could produce a financial advantage. Public visibility is a common enabling condition, not a requirement for every ordering-dependent exploit.

An attacker may seek favorable placement by offering transaction fees or other payments, or by accessing infrastructure involved in block construction. These are attempts to influence placement, not necessarily control it. A searcher submitting a transaction is distinct from a block builder or validator with authority over ordering. Whether a requested sequence is accepted depends on the network and the infrastructure's rules.

Sandwich Attack Example

A sandwich attack is a common illustration of transaction sequencing attacks. In a hypothetical swap against an automated market maker, an attacker observes a pending purchase and buys the same asset first. That initial trade moves the pool's price against the target buyer. If the target swap then executes, it does so at a worse price than it would have without the attacker's first trade.

The attacker subsequently sells the asset, seeking to benefit from the price movement caused by the target swap. Profit is not guaranteed: it depends on successful placement before and after the target, market conditions, competing activity and transaction costs. The target's execution constraints also matter. A price change beyond the swap's permitted slippage can cause it to fail rather than execute at the adverse price.

Looking for liquidity, exploring on-ramp/off-ramp services, or seeking expert guidance?

MEV and the Scope of Sequencing Attacks

Transaction sequencing attacks overlap with maximal extractable value (MEV), the additional value obtainable through transaction inclusion, exclusion or reordering during block production. MEV is broader than attacks: an ordering opportunity does not necessarily harm a user, and some arbitrage can align prices across markets. Automation alone also does not make an activity an attack.

Payment-card testing and BIN enumeration describe a different issue. Guessing or testing card details is not a transaction-order attack unless an actual ordering-dependent exploit is involved. Repeated attempts or a sequence of requests alone do not establish that connection.

Mitigation and Its Limits

Exposure to transaction sequencing attacks can be reduced, but no basic measure guarantees protection. Setting a tighter slippage tolerance limits how far a swap's execution price may move from its quoted price. It does not prevent all unfavorable execution, and legitimate price movements may cause the swap to fail instead. The setting constrains an outcome rather than controlling transaction order.

Private transaction submission can reduce visibility in public pending-transaction pools. It introduces assumptions about the provider's handling of transactions and its relationships with ordering infrastructure; private does not automatically mean protected. Ordering rules and application designs can also reduce exploitable dependencies, but their effectiveness depends on the specific mechanism and implementation. These measures address transaction execution, not account access: stronger authentication does not by itself prevent ordering-based losses.

Power your growth with seamless crypto liquidity

A single gateway to liquidity with competitive prices, fast settlements, and lightning-fast issue resolution

Get started