Exploring Selfish Mining: A Vulnerability Many are Unaware of


Bitcoin mining is one of the oldest income-earning activities associated with the cryptocurrency landscape. Mining dawned at the very birth of the cryptocurrency landscape when bitcoin launched. 

In the early stage, only a few miners participated in the task, including Satoshi Nakamoto. Since about 2012, decade-to-date, over 1 million people have tried their luck in the activity, realizing high profitability rates.

Bitcoin paved the way for many other mineable cryptos to launch, amassing massive usage, with many ready to mine. 

As time passed, experts in analysis, coding, and blockchain operations exposed some minor vulnerabilities facing crypto mining. Among them include 51% attacks and selfish mining. In this article, we will have an in-depth look at selfish mining. 



What is Selfish Mining?

Selfish mining is a blockchain vulnerability involving a miner or a pool of miners engaging in the activity for personal reasons rather than network benefits. In this type of event, the miner aims to maximize their blockchain incentive fraudulently. 

Mining generally involves solving computations to solve a cryptographic hash equation and get the blocks. To work efficiently and correctly, miners must disclose the block once they receive them.

However, in a selfish mining situation, a miner (or group) manipulates their revenue by withholding and releasing blocks to the chain.

The selfish miners control the timing and announcement of their block, creating a private chain. In this private chain, they can amass as much income as possible if they remain ahead of the proper chain.


How Selfish Mining Works?

The ideology, functionality, and implementation of selfish mining are complex, with some technicalities and timings involved. The critical ingredient in performing a successful selfish mining activity is making honest miners perform some pointless computations while trying to locate blocks. 

Remember, the assumption of selfish mining described in many papers, is that in the end, there are two groups; 

  • The majority (honest): These continue building on a soon not to exist chain, the public chain.
  • Minority (selfish): Individuals or small groups of people conspiring to exploit the network via selfish mining mechanisms. 

However, the functionality of selfish mining can be explained in the following short process.


Step 1. The Normal Mining

Unequivocally, the first step in selfish mining is simply participating in the mining process. The miner or a collective group of miners participate in finding new blocks by solving the cryptographic equation.


Step 2: Not Disclosing the Block

The second step occurs when a miner has solved the cryptographic equation and received the next block. This miner has two options: disclose the block immediately, or act selfishly and don’t disclose. 

For selfish reasons, the miner will choose to obscure the information about the new block. It keeps the miner ahead of the rest of the blockchain. Not disclosing the block means they own the most recent block, which can be added to the chain. 


Step 3: Selfish Miner Builds on Recent Block

The selfish miner, be it a group or individual, starts building on the block they recently discovered but did not disclose. They continue building on this chain and earn more and more block rewards.

They then continue solving more equations to find the next block. Once the miner adds a second block to their undisclosed block, they create a private chain, a possible blockchain fork.

During this period, the honest miners continue to solve more equations, probably getting rewards from the public chain. Whatever the honest miners do during this period will be rendered useless since they won’t be added to the chain. 


Stage 4: The Revelation

The fourth stage is where things begin revealing themselves. Since selfish miners control a minimal amount of hash, their indiscretion only lasts a little while. 

The private chain cannot remain ahead indefinitely because its runners do not have enough mining and hashpower to stay ahead of the public chain.

As such, selfish mining reaches a point where the private blockchain is forced to reveal itself to the public. 

The most recent chain can be adopted as the new chain, while the shorter public one is abandoned. Every coin mining on the public chain during this short period immediately becomes useless. The short history no longer exists, and the blockchain adopts the fake public chain.


What Does it Mean to ‘Get Ahead?’

In step 4 above, we mentioned if the private blockchain manages to ‘get ahead’ of the public one, it will be adopted. So, what does it mean to get or stay ahead? 

Getting ahead means one of the public or private chains becomes longer than the branch. In layperson’s terms, the longest chain records the most transactions.

For the selfish miner to maximize their returns, they must ensure their private chain remains ahead of the public chain, hence becoming longer. The longer the private chain is relative to the public one, the easier it is to stay ahead.

If the reverse occurs, and the public chain seemingly goes ahead, the selfish miner will be forced to abandon their indiscretion and return to the primary chain.

Once the dishonest miner discovers a new block, they don’t disclose it. There are only two results;

  • The honest miners will get the next block, staying ahead. If this occurs, the selfish pool will publish its chain. Being the longer one, the community will build on either the selfish or public chain. If the community chooses to build on the public chain, the selfish blockchain could be rendered stale. The opposite is also true. 
  • The selfish miner will get the next block and the next hence creating a fake chain. 

For selfish miners, getting ahead is getting the next block and continuing to build on their fake chain.



Final Word

The blockchain exploitation mining concept, precisely the selfish mining vulnerability, is detrimental to any network. As selfish miners create a private blockchain to continue building transactions and amassing incomes, honest ones may earn lesser rewards.

If the majority of the nodes in a blockchain(51%) aren’t honest, the risk of gas fee manipulations and network disruptions will multiply significantly. Therefore, selfish mining is dangerous to blockchains leveraging the Proof of Work consensus mechanism.



Subscribe to us for the latest bitcoin mining news