Selfish mining is a strategy for mining bitcoin in which groups of miners collude to increase their revenue. Bitcoin was invented to decentralize production and distribution of money. But selfish mining can result in centralization of bitcoin mining operations.

📌 Breaking down Selfish Mining

Selfish mining was first proposed by Cornell researchers Emin Gün Sirer and Ittay Eyal in a 2013 paper. They proved that miners can earn more bitcoins by hiding newly-generated blocks from the main blockchain and creating a separate fork.

Bitcoin mining relies on miners who solve cryptographically complex puzzles to generate coins. Income from the activity varies because the process is dependent on several factors, from the difficulty of puzzles being solved to electricity costs to the quality of internet connections. The bitcoin protocol is configured to reward miners in proportion to their mining output. This ensures that even if miners organize themselves into large pools, the rewards are still dependent on coins produced by individual miners in the public blockchain.

But the above scenario assumes that miners will make their newly-generated blocks available on bitcoin’s public blockchain. In their 2013 paper, Sirer and Eyal showed that miners can increase their share of overall revenue by hiding new blocks and making them available to systems within their private network. This practice speeds up the discovery process and irons out infrastructure problems related to mining, such as network latency and electricity costs.

📌 Selfish Mining Algorithm

Selfish Mining is a strategic mining algorithm that demonstrates that the prescribed protocol is not an equilibrium for minority miners in general. Let’s see the mechanics of Selfish Mining, and then discuss when and why it works.

Initially, the selfish miner tries to extend the longest chain, as she’s supposed to. However, once she generated a block, she keeps it secret rather than publishing it, and then tries to extend it further, forming a secret branch.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0a975850-060f-4a32-825a-02848248c28c/Untitled.png

Meanwhile, the other miners extend the public chain, which will eventually become longer (with probability 1) since they are the majority. The selfish miner continues to extend her secret branch until the public chain is one step behind. Then she publishes her secret chain.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/40e2954c-e816-4273-ac3c-4c3a0923aa57/Untitled.png