Definition
Selfish mining is a malicious attempt to discredit proof-of-work blockchain network integrity by a participant of a mining pool who withholds validated blocks from being broadcast to the rest of the pool.
Understanding the term
A selfish miner is usually a participant in a public mining pool network but maintains their own private chain. But they choose to share it openly at times to get more rewards, which are (under normal conditions) available to miners based on the hashrate they contribute to the mining pool.
A selfish miner hides the block that they have successfully mined and continues to mine the next block in line. This way, a selfish miner can easily demonstrate their proof of work in the mining pool, which is more than any other miner in the same group.
During selfish mining, one has to keep mining new blocks to add to their private chain and hide from the rest of the mining pool network. Once a selfish miner reaches a sufficient gain, they release mining information and obtain a significant number of mining incentives. To avoid selfish mining, one can:
- Randomly assign miners to different branches of the blockchain when a fork occurs
- Setting threshold limits for mining pools on the network prevents them from gaining significant advantages over others.
Takeaway
In the case of selfish mining, since an attacker withholds validated blocks from being broadcast to the mining pool network, it is also known as a block withholding attack.