Most people are now familiar with bitcoin, or at least have heard of this popular cryptocurrency. You hear about it all the time in the news since the price has completely skyrocketed since the beginning of this year and continues to be incredibly volatile. Then you start to wonder: where do bitcoins come from? They have to be mined, but what does that actually mean — bitcoins being “mined”?
Unlike traditional currency (cash), bitcoins are not printed by the government; they are “mined” into existence and discovered by computers competing with one another, searching for coins. It sounds kind of odd, but we will go through and break down how exactly this process works.
Every transaction, sending or receiving bitcoins, is kept as public record in a ledger, which is what we know as the ‘blockchain’ network. This network compiles all transactions that are made during a set period of time into a list that can be referred to as a ‘block’.
When a block is created, it is the job for the miners (other computers) to add the block to the end of the blockchain or master ledger. In order to do this, the miners apply a mathematical formula to this new list, creating a hash sequence of numbers and letters to represent the block digitally — this is how the block is stored and what keeps bitcoin transactions somewhat anonymous.
Hashes are a very handy feature with several interesting properties. It is near impossible to determine what data type of data a hash is representing or what type of data is being stored just by looking at a hash. Each hash is also unique, meaning if you change even a single letter or number, the entire hash will change completely.
The hash of each block is also used to help create the hash for the next block in the chain, so if someone tried hack the network and change a hash, the subsequent hashes would also be incorrect. This hashing procedure helps miners ensure that a block is “sealed off” and secure.
This is where the competitive part of the process comes into play. Miners compete with each other to seal off blocks using computer software specifically for mining bitcoin blocks. Miners get rewarded 25 bitcoins every time they successfully create a hash, then the blockchain network gets updated, and the process continues with new transactions.
However, with technology today, it is very easy for computers to create hashes for a collection of data. Bitcoin protocol wants to keep incentivizing the miners to mine bitcoin, while also not making this process too easy and simple, otherwise miners would hash hundreds of bitcoin blocks every second, and the entire bitcoin supply would be depleted and completely mined within minutes.
To increase the mining difficulty, bitcoin protocol demands certain requirements of a block’s hash. For example, for a hash to be accepted, it must contain a specific number of zeros at the start of the hash. There is no way to predict the final outcome of a hash, and adding new pieces of data will always change the hash to something completely different. If an initial hash does not meet the standard requirements, the data will be hashed again and again. This could end up being a long, lengthy process for miners, but it ensures that all of the bitcoins will not be mined immediately.