Vulnerabilities, innocence and… Bitcoin selfish miningby Denisa Ganea
Why would questioning and being cautious at any time be a healthy habit? Honestly, because you never know what might happen! It does not matter how safe a payment system, a transportation method or medicine claim to be, it is important to constantly watch your back! There will always be some sort of vulnerability or threat that will occur and compromise everything, even though it might not be obvious! We will now go through one of the blockchain’s weaknesses and find what bitcoin ‘selfish mining’ is, why and who is doing it and why this may affect YOU.
What is the Blockchain?
First of all, for those of you new to blockchain and cryptocurrency the most simple definition of the blockchain can be explained as a public ledger that records and validates transactions using proof of work. Since it is decentralised (which means there is not a central authority that processes what BTC payments are going through), we need miners. They are essential participants in the blockchain that help with transactions’ effectuation.
Normally, the miners are getting rewarded for their work, as blockchain is based on the “incentive-compatible” concept. However, this requires that all the miners to be honest. In reality, not all the participants are of good will.
In this virtual world, there are two main types of players: innocent miners (good people who play fair) and selfish miners (bad people who are blinded by money).
Selfish miners’ main objective is to obtain revenue higher than their “fair share”, through an unorthodox attack, that we will discuss more in detail below. Theoretically, if they become greater in number (more than half or 51%), compared to the honest ones, they can compromise bitcoin’s integrity.
What is selfish mining?
Basically, the selfish miners (usually grouped in mining pools) solve hashes but do not release the valid solution into the network and jump to mine the next block. Thus, they keep the first mined block on some sort of private chain, causing a fork and then try to maintain the lead on the longer chain, while the honest miners’ computing powers will be reduced on the public one. So why are good guys’ powers reduced? Because they are forced to spend their resources on the irrelevant blocks, while the selfish ones work secretly. When the rest of the miners catch up with them, the colluding ones rapidly share the solved blocks into the public chain. This results in a longer sequence of works that are required to be checked. Put simply, the bad miners solve more puzzles, therefore receive larger returns.The profits they gain are not proportional to their ratio of mining power because they deviate from the established protocol.
Need more details?
Each transaction that is occurring is written in blocks of information, each of them having an ID. The first one is called the genesis block that also contains the protocol that has to be followed. Each validated block also needs to have a solution for the cryptopuzzle, the information from the anterior block, the hash from the current one and the BTC address in which the mining reward is sent. Besides the new amount of bitcoin created, there is also the mining fee that the user pays which enters in the miner’s account. In the event that two different miners create two blocks that fit in the continuation of the same sequence and are valid, the chain divides into two forks.
“What we found out is that you actually need at least two-thirds of the miners to be honest, and actually this is an optimistic bound. If you don’t make any assumptions, the bound may be even worse.” (Ittay Eyal and Emin Sirer)
Cornell University lecturers Ittay Eyal and Emin Sirer suggest that because of this security issue, the blockchain network is not actually incentive compatible.
Honest miners can become corrupted and may want to join the selfish ones in order to gain higher profits. If a larger number of miners adhere to this, their pool can adopt an altered protocol that rejects the blocks created outside of it, with them only remaining as the most powerful solvers and, in consequence, taking all the profits. A good strategy is also accepting from time to time an “outside block” to hide their malicious activities at the beginning. After a time, when the selfish mining pool becomes big and powerful enough (a majority), they would control everything anyway and there would be no need to hide this outcome. The minority of innocent miners would not be able to exceed the computing power of the selfish ones and will remain all the time behind the chain. Such a phenomenon would put bitcoin’s initial decentralisation vision into serious trouble.
Why& how this affects you?
Here, it depends from case to case, according to your activities and interests.
If you are mining (and more importantly – are a good person) these news may be upsetting, unless you are planning to join the bad people. You have to keep in mind that, selfish mining does not guarantee a profit absolutely every time, as there are many probabilities of revenue distribution. So playing fair is still profitable!
If you just use bitcoin, the main consequence that selfish mining has upon you is the insecurity of your transactions. Due to the centralised malicious pool that can take over the blockchain, there will be no obligation that your payments will be effectuated accordingly. The bad people from the colluding mining pools can even stop certain transactions, due to their larger hashing power. The mining fees would also increase.
Besides of that, they would be able to easily manipulate funds with the possibility to initialise easier double-expenditure attacks (the same amount of money is being spent twice, the second time, the funds reaching a different attacker’s address).
We are making big steps towards a world where privacy becomes more respected again and where we are placing more importance on efficiency and transparency. Cryptocurrencies are still ‘a young invention’ and Bitcoin can be improved. It is very likely that even the most sceptical people from the present will have to accept some form of change, from this perspective, in the future. Nevertheless, time will solve everything!