A full guide to selfish mining, a strategic attack where a Proof-of-Work miner can earn disproportionate rewards by selectively withholding.

In a Proof-of-Work (PoW) blockchain such as Bitcoin, honest miners collaborate to extend the longest valid chain by broadcasting newly found blocks to the network. However, when a miner withholds their discoveries, they engage in a selfish mining attack. This strategic approach allows a miner or mining pool to increase their revenue disproportionately compared to their share of the network's hash power.
The selfish mining attack capitalizes on network latency and the "longest chain" rule established by Nakamoto Consensus. By maintaining a private chain of blocks and revealing it selectively, a selfish miner can compel honest miners to waste their computational resources on blocks that will eventually become orphaned. This increases the selfish miner's share of the total block rewards.
This article clarifies the mechanics of selfish mining, its implications for blockchain security, and the strategies available for mitigation.
| Insight | Details |
|---|---|
| Core Idea | A selfish miner keeps their discovered blocks private to gain a head start on constructing a longer secret chain. |
| The Goal | To force honest miners to waste their efforts on a public chain that will later be orphaned, thus increasing the selfish miner's relative share of rewards. |
| **Key Exploit ** | This attack exploits the**fork choice rule** and the inherent delays in block propagation in distributed networks. |
| Threat Level | Although theoretically possible, executing a successful selfish mining attack is challenging and typically requires a significant portion of the network's hash rate. It poses a threat to the fairness and security of blockchains. |
To understand selfish mining, it is essential to first recognize how honest mining operates:
This collaborative effort ensures that the network extends a single, canonical chain.
A selfish miner diverges from the standard honest mining strategy. Consider a scenario where a selfish mining pool, "S," competes against a group of honest miners, "H."Step 1: Find a Block and Keep it Secret
Step 2: The Race Begins At this stage, two races are occurring:
This creates a "delta" of one block between the secret and public chains. The outcome will depend on who finds the next block.
Scenario A: The Honest Miners Find a Block
Scenario B: The Selfish Miner Finds Another Block
Blockchains can implement several strategies to defend against selfish mining:
In highly decentralized networks like Bitcoin, executing a successful selfish mining attack is exceedingly difficult. It requires a substantial portion of the network's hash rate while carrying the risk of orphaning the selfish miner's own blocks if their network connection is suboptimal.
A: Research indicates that selfish mining could theoretically become profitable with a minority of the network's hash rate, contingent on network conditions. However, this estimate is theoretical; actual required hash power is likely higher in practice.
A: No. A 51% attack requires a majority of hash power, granting the attacker full control to double-spend and censor transactions. Selfish mining focuses on maximizing revenue and can (theoretically) be executed by a minority miner. Nevertheless, a successful selfish mining strategy can open the door to a 51% attack if it attracts additional miners to the selfish pool.
A: There is no definitive, publicly verified case of a large-scale selfish mining attack on a major blockchain like Bitcoin. However, small-scale or subtle attempts may have occurred. The strategy's profitability is heavily reliant on ideal network conditions, which may not be present in real-world scenarios.
Q: Does Proof-of-Stake (PoS) suffer from selfish mining? A: PoS systems do not face the same risks as PoW in terms of selfish mining since block creation does not depend on computational power races. However, they can experience different strategic attacks where a validator withholds attestations or blocks to gain an advantage. PoS protocols implement various mechanisms, such as slashing penalties, to deter such behaviors.
Explore more guides and career playbooks