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

Miners primarily select transactions based on the fee rate, which is the fee paid per unit of transaction size (sat/vB). They aim to maximize the total fees collected within the block's size limit.

The highest fee-rate transactions are usually prioritized. Miners may also consider transaction age or use specific proprietary selection strategies.

Ultimately, it is a profit-driven optimization problem.

What Is the Difference between a SegWit and a non-SegWit Transaction in Terms of Block Space?
How Is the Size of a Transaction Fee Determined by a User?
What Is the Concept of ‘Rational Self-Interest’ for a Cryptocurrency Miner?
What Criteria Do Miners/validators Use to Select Transactions from the Mempool?
How Does a Node Decide Which Low-Fee Transactions to Drop from Its Mempool?
How Do Miners Prioritize Transactions with the Same Nonce but Different Gas Prices?
What Is the Difference between “Virtual Size” and “Actual Size” of a Transaction?
What Role Does Transaction Size (In Bytes) Play in the Fee Calculation?

Glossar