Can a Miner Include a Lower-Fee Transaction before a Higher-Fee One?

Yes, a miner can technically include a lower-fee transaction before a higher-fee one, as the protocol does not enforce a strict fee-based ordering. However, it is economically irrational for a profit-maximizing miner to do so when block space is scarce.

In a congested network, a miner's software is typically configured to prioritize the highest fee-per-byte to maximize revenue. The only exceptions might be due to a bug, a custom or altruistic policy, or if the miner is optimizing for a factor other than immediate fee revenue, such as Maximal Extractable Value (MEV).

How Does Block Space Availability Directly Influence the Miner’s Zero-Fee Decision?
What Is the Trade-off a CCP Faces When Setting the Margin Level?
Does a Failed Transaction Still Occupy Block Space?
Can a Miner Include a Lower-Fee Transaction before a Higher-Fee One?
How Does the Block Size Limit Create Scarcity for Block Space?
How Does a Fee Market Differ from a Fixed-Fee Structure in a Blockchain?
What Is the Role of “Layer 2” Solutions in the Future of Transaction Fees?
How Does the Collective Behavior of Miners Create the Current Transaction Fee Market?

Glossar