---
title: "Fee Sniping — definition | Nuri Glossary"
description: "Re-mining a recent block to collect its high-fee transactions, the reason new blocks are buried deeper before trust."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/fee-sniping"
---

# Fee Sniping

Re-mining a recent block to collect its high-fee transactions, the reason new blocks are buried deeper before trust.

## Basically

Fee sniping is a possible attack where miners replace recent blocks to take their high transaction fees. If it succeeds, you can be less sure that recent transactions will stay confirmed.

## Key Takeaways

- Fee sniping is a theoretical attack where a miner deliberately re-mines a recent block to steal its high-fee transactions. This undermines finality by creating competing chain tips.
- The attack becomes more rational as the block subsidy decreases through halvings. Transaction fees then make up a larger share of total miner revenue.
- Bitcoin wallets mitigate fee sniping today by setting nLockTime to the current block height. Transactions become ineligible for inclusion in earlier blocks, removing the incentive to rewrite recent history.

## What Is Fee Sniping?

Fee sniping is a mining strategy where a miner tries to re-mine a previous block instead of building on the most recent block. The miner wants to capture its high-value transaction fees. The attacker creates a competing version of an already-confirmed block, includes the same fee-rich transactions, and tries to extend their fork faster than the honest chain.
The normal mining process always extends the longest chain by building on the most recently found block. Fee sniping breaks this convention when the miner sees lucrative fees in the just-confirmed block N and starts mining an alternative block N with the same transactions. A successful attacker outpaces the honest chain, orphans the original block, and pockets the fees.
Fee sniping remains purely theoretical today. The block subsidy, currently 3.125 BTC per block, dwarfs transaction fees in most blocks, so the expected return from sniping is negative after accounting for the cost and risk. Bitcoin's subsidy will continue to halve as the network matures into a fee-driven security model, shifting the economics of fee sniping and its role in Bitcoin's long-term fee market dynamics.

## How It Works

The fee sniping attack exploits the gap between honest mining earnings and the potential earnings from rewriting recent history. A miner facing unusually high fees in a block must choose between extending the chain for the subsidy plus average fees in a new block, or trying to orphan the previous block for its above-average fees.

## Why Orphaning Works

Bitcoin's consensus rule is simple: follow the chain with the most cumulative proof-of-work. Competing blocks at the same height are resolved when one chain is extended first. The attacker does not need majority hash power, only one block before the rest of the network extends the honest chain, although success becomes more likely with more hash power and a small miner faces very long odds.
The key distinction from a 51% attack is scope. Fee sniping targets a single recent block and its fees, not deep reorganisations. Even a miner with 20-30% of total hash power could occasionally snipe the most recent block, but the expected value would need to justify the risk of wasting proof-of-work on a failed attempt.

## nLockTime: The Primary Mitigation

Most Bitcoin wallets already deploy the most effective defence against fee sniping. Wallets set the nLockTime field to the current block height when constructing a transaction, making it invalid for inclusion in any block at a lower height.
An nLockTime set to height 830,000 means the transaction can only appear in block 830,000 or later. A miner trying to re-mine block 829,999 cannot include this transaction in their competing block because the locktime prevents it. The transaction was crafted for height 830,000, so it is only valid at that height or above.
Bitcoin Core implemented this behaviour in 2014 (PR #2340). The wallet sets nLockTime to the current block height for all new transactions by default. Some wallets add slight randomisation by occasionally setting nLockTime to a slightly earlier height, improving privacy by making wallet software harder to fingerprint through exact locktime values.

## Why Fee Sniping Becomes More Attractive Over Time

Bitcoin's security budget consists of the block subsidy and transaction fees. The subsidy halves approximately every four years through the difficulty adjustment cycle and halving schedule. Transaction fees must increasingly sustain miner revenue as the subsidy diminishes.
A large subsidy means a miner attempting fee sniping risks losing the guaranteed subsidy of the next block. A failed attempt to re-mine block N forfeits time that could have been spent mining block N+1, which carries the full subsidy. The opportunity cost makes sniping irrational except in extreme cases.
A subsidy approaching zero changes this calculus. A block containing 0.5 BTC in fees next to a block containing 0.01 BTC in fees creates a strong incentive to re-mine the richer block in a purely fee-driven regime. The variance in fee revenue between blocks becomes the dominant factor in mining profitability, making fee sniping a rational strategy for maximising returns.
The dynamic connects directly to the broader discussion around Bitcoin's long-term security budget. For deeper analysis of how transaction fees sustain network security, see Bitcoin Fee Market Dynamics.

## Game Theory: Why Miners Don't Do This Today

Several factors keep fee sniping theoretical in the current environment. The remaining block subsidy continues to shape the choice between honest mining and re-mining recent blocks.
The result is a Nash equilibrium where honest mining is the dominant strategy. Every miner is better off extending the chain than attempting to re-mine previous blocks, as long as the subsidy remains substantial.

## Related Attack Vectors

Fee sniping belongs to a family of mining incentive attacks that become more relevant as transaction fees grow. These attacks concern how miners respond to changing fee incentives.
These attacks share a common thread: they all become more rational as the ratio of transaction fees to block subsidy increases. Fee sniping provides a foundation for analysing the broader category of mining incentive problems. For more on how timelocks protect against reorg-based attacks, see Bitcoin Timelocks: CLTV and CSV.

## Long-Term Implications for Finality

Bitcoin does not offer absolute finality because every transaction is only probabilistically final, with confidence increasing as more blocks are built on top. Fee sniping threatens this model by creating incentives for miners to undo recent confirmations.
Common fee sniping would require users and businesses to wait for more confirmations before considering a transaction settled. A payment that was "safe enough" after one confirmation today might require three or six confirmations in a fee-dominant future. The change would degrade Bitcoin's usability for time-sensitive transactions and increase reliance on layer-2 solutions for fast settlement.
Several proposals aim to address the long-term fee sniping risk. Their shared goal is to reduce the incentive to rewrite recent blocks for their fees.
None of these proposals are currently under active development for deployment. The Bitcoin community generally regards fee sniping as a distant concern that will be addressed as the subsidy diminishes and real-world fee market dynamics become clearer.

## Impact on Small Miners

Fee sniping disproportionately benefits miners with large hash rate shares. A pool with 30% of network hash power has a meaningful chance of winning a one-block race, while a pool with 2% does not. Prevalent fee sniping would accelerate mining centralisation as smaller miners face increasingly unfavourable odds.

## Interaction with Transaction Selection

The replace-by-fee policy allows users to increase fees on unconfirmed transactions. A fee sniping scenario creates a complex dynamic where sniped transactions might be replaced with higher-fee versions during the reorg window, further complicating the attacker's expected payoff calculations.

## Layer-2 Relevance

Fee sniping is a layer-1 concern. Layer-2 protocols like the Lightning Network and Spark settle transactions off-chain, bypassing block-level fee competition entirely. Layer-2 channels still rely on on-chain transactions for opening and closing, so fee sniping could affect the security of settlement transactions that anchor layer-2 state to the blockchain.

## The Wallet Developer's Role

The most practical defence against fee sniping depends on wallet developers consistently setting nLockTime. Bitcoin Core does this by default, but not all wallet software follows this convention, and wallets that omit nLockTime create transactions that are valid at any block height and vulnerable to inclusion in re-mined blocks. Developers building on Bitcoin should ensure their transaction construction follows this best practice.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. You should always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
