Blog: Bitcoin security
There are many different factors involved in Bitcoin security and it depends on the actions of the various actors in the Bitcoin network. This text addresses issues related to Bitcoin security.
Let’s first go over a little about the basics of how Bitcoin works, which will also help to understand what Bitcoin security is all about. So let’s start with an important question: what is Bitcoin? Simplified, Bitcoin is a decentralized and open ledger that can be called a blockchain. Bitcoin's operation is based on open-source code, which means in practice that anyone can propose changes to Bitcoin's code and thus create a different version of Bitcoin currently known. The activities of Bitcoin, and in particular the key actors in the Bitcoin network, will be discussed in more detail below.
The first key actor in the Bitcoin network is the miners, which are the operators that maintain the Bitcoin network. In a nutshell, the miners add new Bitcoin transactions to the Bitcoin blockchain and create new bitcoins. Simply put, adding transactions to a Bitcoin blockchain is done by adding information about the transactions to a new block, which is added as the last block in the Bitcoin blockchain. This addition of transactions to the blockchain in the form of a new block is called mining. Mining is done because Bitcoin works with the Proof of Work consensus algorithm. The idea of the Proof of Work consensus algorithm is that creating new bitcoins requires miners to use computational power for this process. Today, the equipment used by the miners is designed exclusively for Bitcoin mining, and the prices of the new generation of equipment are in the thousands of euros. Bitcoin differs significantly from, for example, traditional fiat currencies, such as the euro and the dollar, which can be created virtually unlimitedly without a sacrifice which is an integral part of Proof of Work.
Mining can be seen as a competition between miners to be the first to find the right solution to a problem that entitles adding transactions in the form of a new block into the Bitcoin blockchain. More specifically, miners use computational power to correctly guess the number that entitles the creation of a new Bitcoin block. The difficulty of guessing this number is controlled in the Bitcoin network by automatic difficulty adjustment, which ensures that a new block is created an average of ten minutes after the previous block.
The incentive for miners to do this is the block reward included in each new Bitcoin block, as well as the transaction fees for the new block. Thus, in addition to transaction fees, the finder of a new block is rewarded with a block reward, which means new bitcoins created in connection with the creation of that block. It is also important to note that the block reward is the only way to increase the bitcoin supply. Currently, the block reward for one block is 6.25 bitcoins, and this block reward is halved in the Bitcoin halving after every 210,000 blocks which means once in every four years. The previous halving of the block reward occurred in May 2020. Due to the regular halving of the block reward, the maximum number of bitcoins, i.e. 21 million, has been known since the inception of Bitcoin. 90 percent, or 18.9 million bitcoins, had been mined by the end of 2021 and the last bitcoin will be mined around 2140.
Another key actor in the Bitcoin network is nodes. Nodes are servers that store the history of the Bitcoin blockchain. Thus, Bitcoin can be seen as a global network of nodes. It is possible for anyone to connect their own node to the Bitcoin network because Bitcoin is an open system. In March 2022, there were more than 15,000 nodes in the Bitcoin network worldwide, and the components needed for the node are available for about 150 euros. The task of the nodes is in practice to monitor the transactions sent to the Bitcoin network and to share the information from these with other nodes. Consequently, nodes are monitoring that the Bitcoin network operates in accordance with jointly agreed consensus rules.
Miners and nodes as guarantors of Bitcoin safety
Let us now consider the role of the nodes and miners in Bitcoin security. An essential part of Bitcoin security is related to the decentralization of both Bitcoin miners and nodes. Miners responsible for the maintenance of the Bitcoin network are located around the world, and mining bans in one country or continent may temporarily undermine Bitcoin security, but are unlikely to destroy the network or affect its normal operation. A good example of such an event was the mining bans imposed by China in 2021. According to some estimates, more than half of Bitcoin's mining took place in China before the bans, and Bitcoin continued to work normally despite halving of the total computing power. The total computing power of the network also returned from this drop of about 50 percent to the level before the bans in about six months.
Also, the thousands of nodes running Bitcoin's open ledger around the world ensure that Bitcoin's consensus rules are followed, even in extreme situations. Thus, even if hundreds or thousands of nodes, usually in people's homes, were to be destroyed in a country or continent, the Bitcoin network would probably continue to operate normally.
The operating conditions for Bitcoin miners and nodes would also not have been completely gone, for example during regional internet outages, as both can be operated, for example, using satellites. There is also a practical example of this from the beginning of 2022 when there were internet outages in Kazakhstan for several days. The outages caused problems for several miners in the country, but some of the miners were able to continue operating normally because they had a satellite connection.
In addition to miners and nodes, an essential part of Bitcoin security is the SHA-256 cryptographic hash function used by Bitcoin. The SHA-256 is used on the Bitcoin network for both mining and creating Bitcoin addresses. The basic idea of the SHA-256 function is that an input value of random format and length can be entered into the function, from which the SHA-256 forms a fixed-length output value. The SHA-256 is a powerful function as it works only one way. This means that anyone can use the SHA-256 by entering an input value and thereby obtaining an output value. As a result, checking the correct output value using the input value is very easy and fast. However, this does not work in the other direction, because it is practically impossible to form an initial output value from the output value, since the difference of even one character in the input value makes the output value completely different.
When it comes to Bitcoin security, the key figure is the Bitcoin hashrate, which refers to the total computing power used by miners to maintain the Bitcoin network. There is a clear link between the security of Bitcoin and hashrate: the higher the hashrate, the more secure the Bitcoin network is. In addition, the security of the Bitcoin network (and the hashrate describing it) has an interesting two-way relationship with the price of Bitcoin: the higher the price of Bitcoin rises, for example, in euros, the more valuable the four-year fixed bitcoin block reward is in euros. This affects Bitcoin security as follows: the higher the block reward, for example, in euros, the more incentive miners have to use computing power to maintain the network. Thus, as the price of Bitcoin rises, the hashrate of the Bitcoin network, i.e. the security of Bitcoin, should also increase. This connection also works the other way around: the higher the hashrate of the Bitcoin network, the more valuable and better Bitcoin is considered to be, which in turn should raise the price of Bitcoin. This link between the price and hashrate is quite evident when examining the historical price and hashrate of Bitcoin.
One of the most unique features of Bitcoin, which distinguishes it, for example, from gold, can naturally be touched in this connection between the security and price of Bitcoin. If, for example, the prices of Bitcoin and gold doubled overnight, this would naturally tremendously increase the interest in Bitcoin and gold mining. In the case of gold, increased mining would also mean that more gold could be found, and thus the supply of gold would increase as a result of increased price (and demand). In the case of Bitcoin, increased mining would have little effect on the number of new bitcoins due to automatic difficulty adjustment. Thus, the new block is still found on average ten minutes after the previous block, and the output of new bitcoins in the form of the block reward remains unchanged until the next halving of the block reward. Increased demand will therefore not increase the number of new bitcoins, unlike in the case of gold and a number of other assets. This could, in the case of significantly increased demand, amplify the increase in the price of Bitcoin compared to other asset classes.
The operation and security of Bitcoin involve quite a variety of things that take time to fully understand. The key actors responsible for Bitcoin security are the miners who maintain the network and the nodes that monitor the network. These actors are located around the world, thus ensuring network decentralization, which is especially important in extreme situations. In addition to miners and nodes, the SHA-256 cryptographic hash function used in mining and address creation is an important part of the operation and security of Bitcoin. The most important key figure when looking at the security of Bitcoin is the hashrate, which describes the total computing power of the network and also has an interesting two-way connection with the price of Bitcoin. Also, an important part of the operation and security of the Bitcoin network is the unique automatic difficulty adjustment feature that distinguishes Bitcoin from, for example, gold as the amount of demand does not affect the number of new bitcoins. Bitcoin has been virtually problem-free throughout its history and has, for example, survived the halving of hashrate caused by China's mining ban. Bitcoin will likely continue to operate smoothly in the future and the network hashrate is set to continue to set new records as more and more players want to become miners to maintain the world’s first open and decentralized monetary system.
Ville Viitaharju Cryptocurrency specialist