Why Does Blockchain Needs Proof Of Work Algorithm
Proof-of-Work, regularly shortened to PoW, is an intrinsic consensus algorithm for a blockchain protocol. For DLT technologies, it is applied along with the processes of transaction approval and a new block production. By using PoW, miners try to become the first to put a new block to the record to receive a reward. The transfers consist of digital tokens the members send from one wallet to another. Blockchain accumulates all transactions combining them into blocks. Transactions approval as well as new blocks creation must be executed carefully, so volunteering nodes - miners who proceed with the mining activity - are to maintain these processes. The fundamental concepts for such sort of behavior are mathematically hard solutions with simple proofs.
Here, mathematically hard solutions means a task that will need many computational issues to be solved, for instance:
- integer factorization;
- guided tour puzzle protocol, etc.
When it comes to PoW, hashing procedure is taken as a starting point. Unfortunately, with the community that gets more and more participants daily, more difficulties arise. Selected approaches require a higher hashing capacity, thus, the problem complexity is a key point, as it has an influence on both accuracy and performance of any blockchain-based platform. On the one hand, the complexity must be adequate, otherwise the block creation may be too slow while the approval of new transactions will get stuck. If the difficulty is not figured out in a reasonable time interval, no one will generate new blocks. On the other hand, simple conditions can lead to DoS attacks and spam which is a real threat.
A mathematical result must be easily verified. In opposite case, other nodes will not be able to check the correctness of the calculations. This means that the question of trust will be involved, and one of the core Blockchain properties — transparency — will be abused.
Miners create blocks and try to solve the computation problem verifying included transactions. Problem complexity depends on an average time of the last 2016 blocks approval. Each block content depends on the hash of the previous block. This allows to guarantee more reliable and secure blockchain supplement. After transactions are combined, thus forming a new block, and are approved with hashing procedure, they are considered as accepted.
The first implementation of the PoW was Bitcoin. All others just used the efficient and reliable consensus. Bitcoin has Hashcash solution in its core. It has been used and well known since 90-s but some important changes were applied. For example, since task complexity is recalculated, an average block time is kept stable at a 10 minutes level. Other cryptos, for example Litecoin, use the same approach with their own peculiarities. Another project that uses PoW and is worth mentioning is Ethereum. About 75% of all newly invented projects are using the Ethereum blockchain.
The major benefits of PoW is a denial-of-service attack prevention, high security level and no stake impact on the process of mining.
Denial-of-service attack prevention
Using PoW requires certain restrictions of the network activity. They include huge efforts applied to the task solution. Thus, a successful attacker must possess many calculating facilities and make numerous attempts. In fact, such possibility still exists but it will not be profitable as expenses are extremely high.
The amount of money on your account is irrelevant here. A major crucial point here is if there is enough computational power to deal with the problem and hence, create a new block. It means that you cannot decide for all the network participants even if you have numerous coins on your account.
The major flaws here are expensive equipment, purposeless computations, and a 51% attack.
Mining can be performed on many different types of equipment. Yet, the best microchemes happen to be expensive. As several companies started producing special mining rigs, mining became almost useless for a single person. Moreover, mining needs a significant power supply. This centralization tendency threats the major distribution principle of blockchain.
All calculations during mining are conducted only with the goal to create a new block. In any other cases, they are useless. Basically, all those power supply is just used for nothing.
What is a 51% attack?
A 51% attack happens when the majority of full nodes control the process of block creation. This means that attackers get enough influence to manipulate the blockchain content. In theory, wrong blocks approval and correct blocks denial may become regular in this case.
Suppose Alice sends a certain amount of money to Bob via blockchain. Alice is a 51 percent attack participant while Bob is not. A newly calculated block has information about this transaction. If the attacker does not transfer money, this will cause a fork. Furthermore, miners now have to choose a branch to join. Having the majority of the approval power, they can make their chain longer, thus more rightfull, as at times of blockchain forks the longer branch remains, while the shorter one is erased. So, Alice’s transaction will be vanishes, and Bob will never get the funds.
Even though, the issue of the 51% attack seem serious, it is not profitable, as a huge calculations amount is required here. So, once it all comes out, the forked blockchain security will be considered broken. Users will abandon this project, and the cryptocurrency price will inevitably fall causing enormous losses to attackers.