Bitcoin is a blockchain-based system that is maintained by the collective work of decentralized nodes. Some of these nodes are known as miners and are responsible for adding new blocks into the blockchain.
Bitcoin is the most popular and well-established example of a mineable cryptocurrency.
Countries like China and Russia are in a pole position to launch the first within a couple of years.
Deutsche Bank recently published a report suggesting that cryptocurrencies could overtake national fiat currencies within ten years, envisaging that these state-backed versions will lead the charge.
Also, the Supreme Court recently struck down the curb on cryptocurrency and Bitcoin trade in India.
Like any other digital payments, there are plenty of user-friendly applications that let us send and receive currencies very easily.
The difference is the backbone underlying their network, this is not a bank verifying transactions, but a clever system of decentralized trustless verification based on some of the math born in cryptography.
Note: Please bear with any simplifications that I make. These algorithms have a lot of complex research behind them. I will be providing links as we proceed for the interested readers to do their further research.
In the blockchain industry, we hear a lot about consensus algorithms, to reach consensus on the network Bitcoin is using proof of work (PoW).
Before continuing, for the non-technical readers:
A hash function is any function that can be used to map data of arbitrary size to data of fixed size.
If a hash function is secure, its output is indistinguishable from random, when you slightly change the input, maybe editing just one character, the resulting hash changes completely and is infeasible to compute in the reverse direction.
Surprisingly if you dig into the details of how this function works, you could reverse engineer the input but no one has ever figured out a way to do that.
Let’s say you have a block-chain and this scenario is bound to happen with you in the present climate of block-chain networks.
You will have multiple nodes and all these nodes will have the same stake of the block-chain.
The general question now arises is that what happens when a new block is encountered. A smart person will reply that you inculcate this block in your block-chain.
Well, who is responsible for adding this block in the already existing and well-functioning system?
And that’s where consensus algorithm comes in play.
A consensus algorithm called “Proof-of-Work” is intrinsically tied to the list of transactions in the blockchain. Currencies such as Bitcoin and Ethereum use this algorithm each one with its differences.
A miner is a node in the network that collects transactions and organizes them into blocks.
The proof-of-work is a mechanism for reaching global consensus on the valid blockchain: since all nodes have a copy of the blockchain, each node must agree on the conditions that prove how much effort a node has spent on verifying transactions.
Every time one has to add a block in a blockchain he has to proof-of-work which will take some amount of time and computing power but the moment some miner is doing that some other nodes or some other blocks will be generated which will be added in the blockchain making his attack useless.
In other words: if the content of the blockchain is easy to change then everyone can tamper with it; instead, if each block is calculated with complex mathematical functions then it takes a lot of effort to tamper with the blockchain.
Bitcoin miners receive bitcoin as a reward for completing “blocks” of verified transactions which are added to the blockchain.
For a block to be accepted by the network, miners have to complete a proof of work to verify all transactions in the block.
The difficulty of this work is not always the same, it keeps adjusting so new blocks can be generated every 10 minutes. There’s a very low probability of a successful generation, so it is unpredictable which worker in the network will produce the next block.