How does transaction ordering work? Explained | Quicknode
//Answers>Learn about MEV & transaction ordering>How transaction ordering works
How transaction ordering works
// Tags
transaction orderingmempool
TL;DR: Transaction ordering is the process by which a blockchain decides which pending transactions get included in the next block and in what sequence. This ordering directly affects which transactions succeed, which fail, and how much value each participant receives. On most blockchains, the entity producing the block has full discretion over transaction order. Historically, transactions were ordered by gas price, with the highest bidder going first. Today, the process is far more complex, involving base fees, priority fees, private order flow, specialized block builders, and auction mechanisms that have transformed block construction into a sophisticated marketplace.
The Simple Explanation
When you submit a transaction to a blockchain, it enters the mempool, a public holding area where every pending transaction waits to be included in a block. The mempool is not a queue. There is no guaranteed first-come-first-served ordering. Instead, the block producer (a validator on Proof of Stake chains, a miner on Proof of Work chains) selects which transactions to include and arranges them in whatever order they choose.
This is fundamentally different from how traditional systems work. When you place an order on a stock exchange, the exchange has strict rules about time priority: orders that arrive first are executed first. On a blockchain, the block producer is the exchange, and they can reorder the trades however they want. The only constraint is that each transaction must be valid given the state produced by the transactions before it in the same block.
Why does ordering matter so much? Because in DeFi, the order of transactions within a block can determine prices, liquidations, and arbitrage outcomes. If two people are trying to buy the same token from the same liquidity pool, the person whose transaction executes first gets a better price. The second person's transaction executes against a pool with less liquidity and a higher price. The difference between going first and going second can be worth thousands or millions of dollars.
The Traditional Model: Gas Price Ordering
Before Ethereum's EIP-1559 upgrade (August 2021), transaction ordering was straightforward: users attached a gas price to their transaction, and block producers sorted the mempool by gas price, highest first. If you wanted your transaction to land before someone else's, you paid a higher gas price. This created a simple but brutal auction system called a Priority Gas Auction (PGA).
PGAs were chaotic during high-demand periods. MEV searchers competing for arbitrage or liquidation opportunities would rapidly outbid each other, incrementing their gas prices in real time. A single profitable MEV opportunity could trigger dozens of competing transactions, each with progressively higher gas prices, consuming block space and driving up costs for everyone else on the network. Users trying to make a simple token transfer would see their gas costs spike because bots were bidding up the price of block space in pursuit of MEV profits.
The PGA model also meant that transaction ordering was entirely determined by willingness to pay. There was no concept of fairness, no consideration of when a transaction was submitted, and no mechanism to protect regular users from being outbid by sophisticated bots with faster mempool monitoring and higher capital reserves.
EIP-1559 and the Two-Part Fee Model
Ethereum's EIP-1559 upgrade replaced the single gas price with a two-component fee structure: a base fee and a priority fee (tip). The base fee is set algorithmically by the protocol based on how full the previous block was. When blocks are more than 50% full, the base fee increases. When blocks are less than 50% full, it decreases. The base fee is burned (removed from circulation), meaning it does not go to validators.
The priority fee is the amount a user pays directly to the validator as an incentive to include their transaction. In a world where every transaction pays the same base fee, the priority fee becomes the differentiator for ordering. Transactions with higher priority fees get included first.
This model improved fee predictability for users (the base fee adjusts smoothly rather than spiking unpredictably) and reduced the effectiveness of PGAs (since competing bots can no longer spike the overall gas price for everyone, only their own priority fee). However, it did not eliminate ordering-based value extraction. Validators (or the builders they delegate to) still control the sequence of transactions within a block, and the priority fee still creates an auction for positioning.
Modern Block Building: Proposer-Builder Separation
Today, transaction ordering on Ethereum is dominated by a system called Proposer-Builder Separation (PBS), implemented through MEV-Boost and the Flashbots ecosystem. PBS splits the block production process into two roles: builders who assemble the block's contents and proposers (validators) who sign off on the final block.
The process works as follows. Users submit transactions to the public mempool or directly to builders through private channels. MEV searchers monitor the mempool and construct bundles, which are ordered groups of transactions designed to capture specific MEV opportunities (arbitrage, liquidation, sandwich). Builders collect these bundles along with regular user transactions, assemble them into a complete block ordered to maximize total value, and submit their block as a bid to a relay. The relay validates the block and forwards the highest-value bid to the proposer. The proposer selects the winning bid (typically the one that pays them the most), signs the block header, and the relay publishes the full block to the network.
Over 90% of Ethereum blocks are now produced through this PBS pipeline. The system has professionalized transaction ordering to a degree that would have been unimaginable in the early days of the network. Block building has become a competitive, capital-intensive business where a handful of builders produce the majority of blocks based on their ability to extract and distribute MEV efficiently.
Private Order Flow
One of the most significant developments in transaction ordering is the rise of private order flow. Instead of broadcasting transactions to the public mempool (where they are visible to front-running bots), users can submit transactions directly to builders through private channels. Services like Flashbots Protect, MEV Blocker, and private transaction relays accept user transactions and forward them to builders without exposing them to the public mempool.
Private order flow protects users from sandwich attacks (since bots cannot see the transaction to front-run it) but creates new dynamics in the block building market. Builders with access to exclusive private order flow have a competitive advantage because they can construct more valuable blocks than builders limited to public mempool transactions. This has led to a concentration of block building among a small number of builders with the best order flow relationships, raising concerns about centralization in a system designed to be decentralized.
Transaction Ordering on Other Chains
Solana handles transaction ordering differently because of its architecture. There is no traditional mempool. Transactions are sent directly to the current leader (the validator responsible for producing the current slot's block). The leader determines ordering, and Solana's Gulf Stream protocol forwards transactions to the upcoming leader in advance. This reduces some MEV attack vectors (like traditional mempool sniping) but gives the leader significant ordering power during their slot.
Layer 2 rollups like Arbitrum, Base, and Optimism currently use centralized sequencers that order transactions on a first-come-first-served basis. The sequencer receives transactions, orders them by arrival time, and batches them for submission to Ethereum L1. This model reduces ordering-based MEV compared to Ethereum L1 but concentrates ordering power in a single entity. Efforts to decentralize sequencers, including shared sequencing networks and sequencer rotation mechanisms, are active areas of development.
How Quicknode Fits In
Transaction ordering affects every application that submits or monitors transactions on a blockchain. Quicknode's Core API provides the low-latency RPC access developers need to submit transactions with accurate fee estimation and precise timing. Fast response times ensure your application's transactions reach the network with minimal delay, which is especially important in competitive environments where milliseconds determine transaction positioning.
For applications that need to monitor how transactions are being ordered and included, Quicknode Streams delivers real-time block data with guaranteed delivery and finality-order processing. By streaming transaction data filtered to your contracts and addresses, you can analyze ordering patterns, detect MEV activity affecting your users, and build systems that respond to block-level dynamics in real time. Quicknode's infrastructure ensures your application has the speed, reliability, and data access needed to navigate the complex realities of modern transaction ordering.