The very concept of such an algorithm was developed back in 1993. But then its task was to prevent DoS attacks and excessive network spamming. The point was that the computer submitting the request had to do some calculations to confirm it. And if this practically did not interfere with the usual pace of communication, then confirmation of tens and hundreds of requests seriously loaded the computer-intruder.
And in 2009 it became known that this algorithm was finalized to ensure the security of the world's first cryptocurrency Bitcoin network. Now it was called the “consensus algorithm” and served to guarantee the reliability of new blocks of information added to the blockchain. The idea itself turned out to be extremely effective, so almost all modern cryptocurrencies to varying degrees use the Proof-of-Work algorithm.
How does it work?
In short, the individual network nodes will search for solutions to the complex equation determined by the contents of the block — the hash as fast as possible. This process requires significant computing power, and in this regard - and electricity. However, checking the correctness of this solution is much simpler. Therefore, after the next node is the first to calculate the correct answer, the remaining network participants will be able to confirm the correctness of its calculations. And if it is correct - the node will receive the right to add a new block to the blockchain, and also - all the rewards in the cryptocurrency that will be stored in this block.
Specific example
It is best to consider the operation of the Proof-of-Work algorithm on the simplest example - the operation of the Bitcoin network. Like other cryptocurrencies, the flow changes some features of the algorithm as they see fit.
So there is a decentralized network. All nodes in it are equal, that means they have equal rights and have no advantages over each other. Active nodes are called miners - they are the ones who are looking for a solution to the equation. To do this, they need to guess or pick up a pseudo-random number nonce. If it is passed through a hash function, along with the information contained in the block, then the desired result should be obtained - the block hash. When this number is found, the other participants in the network simply substitute it into the function to make sure the solution is correct.
You cannot add a new block to the blockchain until you find this nonce number, which is also called the “one-time code”. And each new confirmed block contains information about the hash of the previous block, which ensures their logical and cryptographic connection. And since to get this new block you need to do the computational work, the algorithm is called Proof-of-Work - “confirmation of work”.
This algorithm ensures that the contents of the blocks will not be faked. And that the blocks really contain information related to the previous blocks of the chain. To successfully simulate the reliability of a block, about 51 percent of the processing power of the entire network is required, which is incredibly difficult to provide. The following situation arises - more than half of the computing power begins to build a chain based on a false block. And since the system itself is organized in such a way that shorter alternative chains are automatically removed, in this situation, the “reliable” branch will also be removed.
The main problem of the Proof-of-Work algorithm is the need to use expensive equipment (for example, the latest generation video cards) and a large amount of electricity. And despite the total colossal computing power of a decentralized network, it cannot be used for anything else but to calculate a one-time code.
Conclusion
But despite this, the Proof-of-Work algorithm is still the simplest, most reliable and widespread way of confirming the authenticity of cryptocurrency transactions. And the currently available alternatives are just starting to gain popularity. Will they be able to become a full-fledged and convenient alternative - time will show. Still, cryptocurrencies, as a phenomenon, are developing not so long for making clear forecasts.