How Does a Miner Decide Which Transactions to Include in a Block?

A miner's primary goal is to maximize profit, so they generally prioritize transactions that offer the highest transaction fee per unit of block space (often measured in satoshis per byte). Transactions are drawn from the mempool, which is the waiting area for unconfirmed transactions.

The miner will continuously select the most lucrative set of transactions that fit within the block size limit to ensure the highest revenue before solving the block's cryptographic puzzle.

What Mechanism Ensures That Miners Prioritize Higher-Fee Transactions?
What Is the Economic Rationale for a Miner to Always Prioritize Fee-Paying Transactions?
How Does a Miner Choose Which Transactions to Include from the Mempool?
How Do “Zero-Confirmation” Transactions Pose a Risk to Merchants?
What Is the Concept of ‘Rational Self-Interest’ for a Cryptocurrency Miner?
What Is the Primary Incentive for a Miner to Include a Transaction in a Block?
What Is the Significance of the “Version” Field in a Bitcoin Transaction?
How Does a Node Decide Which Low-Fee Transactions to Drop from Its Mempool?

Glossar