THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Fee Sniping Explained: Miner Reorganizations and Transaction Fees

permalink THAMER
#bitcoin#fee-sniping#incentives#mining#reorganization

Fee sniping describes an incentive problem: a miner may attempt to replace a recently mined block to capture the transaction fees it contained, rather than extending the current chain tip. It is not a special transaction format or an opcode. It is a possible mining strategy arising from the interaction of transaction fees, block subsidies, and probabilistic proof of work.

How the incentive arises

Imagine that block A contains unusually valuable transaction fees. A competing miner could mine on A's parent and attempt to publish an alternative block A' containing some of those same transactions. For the attack to succeed, the competing branch must accumulate more proof of work than the branch that honest miners extend. Mining on an old parent sacrifices the opportunity to extend the current tip; the strategy is therefore risky, not a guaranteed source of extra income.

The comparison depends on the fees still available in the mempool, the fees in the target block, the block subsidy, hash rate, network propagation, and the likelihood that other miners will build on either branch. A block reorganization is a consensus possibility, but a profitable fee-sniping strategy is an economic hypothesis, not a statement that miners routinely do it.

Why wallets are part of the discussion

An ordinary newly signed Bitcoin transaction often has no intrinsic requirement to be mined in a particular block. If a miner trying to replace the previous block can include the same pending transaction in its alternative block, that transaction may contribute fees to the attempted reorganization. A wallet can reduce this flexibility by selecting an appropriate locktime when constructing a transaction.

A common anti-fee-sniping technique sets nLockTime near the current chain height. The transaction then cannot be included in a block whose height is below the locktime threshold. This may make the transaction unavailable to a miner attempting to replace a recently mined block at an earlier height. It does not prevent every kind of reorganization, nor does it guarantee confirmation.

Why this matters as subsidy declines

Bitcoin's subsidy decreases through halvings. Transaction fees may become a larger component of miner revenue, making the distribution of fees across blocks more relevant to mining incentives. That observation alone does not establish that fee sniping will become profitable: mining competition, fee availability, and the cost of abandoning the tip still matter.

Practical boundaries

Anti-fee-sniping locktime is a wallet-level transaction-construction choice. It does not alter consensus, change the fee paid by the sender, or require a new script type. A transaction can be valid and still remain unconfirmed due to insufficient feerate or mempool policy. Developers should treat miner incentives, transaction finality, and wallet locktime selection as related but separate topics.

Primary references

Bitcoin Developer Guide — Transactions: https://developer.bitcoin.org/devguide/transactions.html

Bitcoin Core source repository (wallet transaction construction): https://github.com/bitcoin/bitcoin

Bitcoin whitepaper: https://bitcoin.org/bitcoin.pdf

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects