Selfish Mining and Block-Withholding Attacks, Explained
An overview of game-theoretic vulnerabilities in proof-of-work networks, detailing how miners can exploit block propagation and pool structures to capture disproportionate rewards.
Key points
- Selfish mining involves withholding valid blocks to trick honest miners into wasting computational resources on a chain that will eventually be orphaned.
- The attack exploits network latency and the longest-chain rule, theoretically allowing minority miners to earn outsized rewards.
- Block-withholding occurs within mining pools, where an attacker submits partial work for payouts but discards actual block solutions.
- Fast block propagation across the network is the primary defense against selfish mining, reducing the attacker's ability to win tie-breaking races.
Selfish mining and block-withholding are game-theoretic attacks on proof-of-work networks where participants manipulate information to capture disproportionate rewards. Rather than breaking cryptographic algorithms, these strategies exploit the fundamental rules of consensus and network latency. By selectively hiding and revealing valid blocks, an attacker can force honest participants to waste computational resources, thereby increasing the attacker's relative share of total network revenue.
The Mechanics of Nakamoto Consensus
To understand how these attacks function, it is necessary to examine the underlying rules of proof-of-work networks like Bitcoin ($BTC). In these systems, distributed nodes agree on a single history of transactions through Nakamoto consensus 1. Miners continuously hash block headers, searching for a value that meets the network's difficulty target.
When a miner finds a valid block, they broadcast it to the network. Other miners verify the block, append it to their local version of the blockchain, and immediately begin searching for the next block using the new block's hash as a reference. The core rule resolving disputes is that the longest valid chain—specifically, the chain with the most accumulated proof-of-work—is accepted as the absolute truth 1.
If two miners find a valid block at approximately the same time, the network temporarily splits. Miners build on whichever block they received first. This tie is broken when the next block is found, extending one chain and causing the other to become an orphan block. The miner of the orphan block receives no reward, and their computational effort is effectively wasted. Selfish mining intentionally induces these splits to the attacker's advantage.
How Selfish Mining Works
Selfish mining alters the standard procedure of immediately broadcasting a newly discovered block. Instead, an attacker who finds a valid block keeps it secret, creating a private fork of the blockchain.
While the attacker begins mining on top of their secret block, the rest of the network continues mining on the older public block 2. Two scenarios emerge based on who finds the next block:
If the attacker finds a second block on their private chain, they increase their lead. They continue to withhold the blocks, maintaining a longer private chain while the public network falls further behind.
If the public network finds a block, closing the gap, the attacker immediately broadcasts their secret block. Because network propagation takes time, a race occurs. If the attacker's block reaches a portion of the network before the public block, some miners will adopt the attacker's block. If the attacker had a lead of two or more blocks and the public network finds one, the attacker publishes their entire secret chain. According to the longest chain rule, the network must accept the attacker's longer chain, invalidating the recent work of all honest miners 1.
By invalidating honest work, the attacker reduces the effective hash rate—the total computational power—of the honest network. Consequently, the network difficulty adjusts downward over time, allowing the attacker to earn a higher percentage of the total rewards than their raw hash rate would dictate in a purely honest system.
The Math Behind the Attack
Consider a theoretical mining network where an attacker controls 30% of the total hash rate, and honest miners control the remaining 70%. In an honest system, the attacker will earn exactly 30% of the block rewards over a sufficiently long period.
Under a selfish mining strategy, the attacker finds the first block 30% of the time and keeps it secret. When the honest network (70% probability) finds a block, the attacker publishes their secret block, creating a tie. The outcome of this tie depends on the propagation parameter, often denoted as gamma (γ), which represents the proportion of honest miners who build on the attacker's block due to network topology and timing 2.
If γ is 0.5, meaning half the honest network receives the attacker's block first, the attacker has a significant advantage. The honest network splits its hash power (35% building on the attacker's block, 35% on the honest block). The attacker directs their full 30% hash power to their own block.
In the next round, the probability of the attacker's chain winning is the attacker's hash rate plus the portion of the honest network tricked into building on it (30% + 35% = 65%). If the attacker's chain wins, the original honest block is orphaned. Over many iterations, the honest network wastes a substantial portion of its energy on blocks that are ultimately orphaned, dropping the network's effective hash rate. The attacker's 30% physical hash rate might capture 35% or 40% of the newly adjusted reward issuance, making the attack highly profitable once difficulty recalibrates 2.
Research indicates that if an attacker has highly optimized network connectivity (γ approaching 1), selfish mining becomes theoretically profitable with nearly any amount of hash rate. In a more realistic scenario where γ is 0, the threshold for selfish mining to be profitable is 33% of the total network hash rate.
Block-Withholding in Mining Pools
While selfish mining targets the broader network consensus, block-withholding attacks primarily target the internal accounting mechanisms of mining pools.
To distribute payouts fairly, mining pools measure the effort contributed by individual participants using shares. A share is a valid proof-of-work that meets a lower difficulty target set by the pool, rather than the high difficulty target of the main network. Miners are paid based on the number of shares they submit.
In a block-withholding attack, a rogue miner connects to a target pool and begins hashing. When the miner finds a hash that qualifies as a standard share, they submit it to the pool manager and receive credit. However, if the miner finds a hash that meets the full network difficulty—an actual valid block—they discard it instead of submitting it to the pool 1.
This behavior drains the pool's resources. The attacker receives a portion of the pool's revenue based on their submitted shares, but they never contribute to the pool's actual block discoveries. Over time, the pool's revenue per share drops, harming all honest miners in the pool. This attack is often deployed by a competing pool operator to drive a rival out of business, as the attacked pool appears unlucky and unprofitable, causing legitimate miners to leave.
Why Propagation Speed Matters
Both selfish mining and general network security are heavily reliant on block propagation speed. Latency—the time it takes for data to travel across the physical network—creates the vulnerabilities these strategies exploit.
When a selfish miner attempts to break a tie by broadcasting a withheld block, their success hinges on reaching honest nodes faster than the competing honest block. If the network has high latency, an attacker with strategically placed nodes can easily partition the network and win the propagation race. Conversely, if a network propagates blocks almost instantaneously, the γ parameter drops near zero, making selfish mining much harder to execute without controlling over 33% of the hash rate.
Protocol developers actively optimize block propagation to mitigate these risks. Technologies like compact blocks reduce the amount of data transmitted, allowing nodes to verify and forward new blocks in milliseconds rather than seconds 3.
Common Misconceptions
- Selfish mining steals funds from user wallets. This is false. Selfish mining only manipulates block rewards and transaction fees allocated to miners. It does not allow an attacker to forge signatures, reverse deeply confirmed transactions, or steal existing balances.
- An attacker needs 51% of the network to execute these attacks. While a 51% attack guarantees the ability to reorganize the chain at will, selfish mining is a statistical strategy that can yield disproportionate rewards with a minority hash rate, typically estimated between 25% and 33% depending on network connectivity.
- Block-withholding is a cryptographic flaw. Block-withholding is purely a game-theoretic exploit. The cryptography functions exactly as designed; the vulnerability lies in the incentive structure of pool payouts and the inability of a pool to prove that a miner deliberately discarded a valid block.
What to Watch
While academically documented and mathematically sound, widespread selfish mining on major proof-of-work networks is rarely observed in practice. The primary deterrent is economic: executing a visible selfish mining attack would undermine confidence in the network's security, potentially crashing the value of the very asset the attacker is attempting to accumulate.
However, block-withholding remains a persistent, quiet threat in the competitive mining industry. Pool operators continuously develop proprietary statistical models to detect miners whose share submissions display anomalous patterns or lack expected block discoveries. As hash rate centralizes and mining margins compress, understanding these game-theoretic vulnerabilities remains critical for evaluating the long-term stability of proof-of-work consensus.
Questions this story raises
- What is the difference between a 51% attack and selfish mining?
- A 51% attack allows a miner to arbitrarily rewrite recent transaction history and double-spend coins. Selfish mining is a strategy used by a minority miner (under 50%) to manipulate the timing of block broadcasts, earning a slightly higher percentage of block rewards than their raw hash rate should allow.
- How do networks fix the block-withholding vulnerability?
- There is no complete protocol-level fix for block-withholding in traditional pools because pools cannot distinguish between a miner who is genuinely unlucky and one who is maliciously discarding blocks. Pools rely on statistical analysis to ban suspicious accounts over time.
- Does selfish mining increase transaction fees?
- Not directly. However, by artificially increasing the orphan rate and slowing down the rate at which honest blocks are added to the main chain, selfish mining can reduce the overall throughput of the network, which may indirectly cause congestion and higher fees.
References
- [1] Majority is not Enough: Bitcoin Mining is Vulnerable — Cornell University (arXiv)
- [2] Bitcoin: A Peer-to-Peer Electronic Cash System — Bitcoin.org
- [3] Compact Block Relay — Bitcoin Developer Documentation
Evergreen explainer written by Basis Desk's system and checked by an independent model pass for factual errors and advice language. Figures, fees and rules change — the references above are where to verify current specifics. Market figures marked "at the time of writing" come from live exchange data. Report an error: corrections@basisdesk.news · corrections policy.
The Daily Brief, in your inbox at 07:00 ET
Five stories, the numbers that moved, what to watch. Three minutes. No hype, no advice, unsubscribe in one click.
Get the big crypto stories first
A few alerts a day at most: major breaking news and the morning brief. Switch off anytime.
Not financial advice. Basis Desk publishes information, not recommendations. Crypto assets are volatile and you can lose what you invest.