Proof-of-Work, Explained

Proof-of-Work, Explained

Everything about the famous PoW algorithm, its working process and the reason why blockchains apply it.

PoW and the blockchain

People who’re engaged in the blockchain technologies field have learned of various protocols for sure. There’re numbers of them. The most well-known ones are Proof-of-Stake and Proof-of-work. This item is entirely dedicated to the second one. We are going to explain what is PoW and why do blockchains require these protocols.

 

Proof-of-Work protocol demands an executable yet the significant quantity of effort to hold down frivolous or willful uses of computing energy. Spam emails are the best representatives of these cases. This protocol was digested to money in 2004 by Hal Finney. His concept was a reusable Proof-of-Work. Finney’s idea was widely adopted by Bitcoin in 2009. From that on numerous cryptocurrencies use the Proof-of-Work protocol.

 

Proof-of-Work is a consensus algorithm that is exploited for transactions admission and new blocks formation in the blockchains. Using PoW miners contend with one another for completing transactions and gathering bonuses.

 

Users of the network transmit digital coins to one another. All these activities are gathered into blocks by a decentralized ledger. Special nodes take duty for every transaction recognition and blocks arrangement. The current process of approval is called mining.

 

Mining has two fundamentals: complicated mathematical puzzle and methods of easily proving the solution.

What is the mathematical puzzle in the blockchain?

In the current method, the mathematical puzzle is some complicated mathematical issue that demands a bunch of computational power to be resolved.

 

Some cases of mathematical puzzles:

 

Hash functions. In hash functions, the output is known and you need to determine the input.

Guided tour puzzle protocol. In this case, the obstacle may be called “How to find the equivalent of the hash function’s chain”. It is claimed when the server detects a DoS attack.

Integer factorization. Also, known as a Prime factorization and is used to make a public-key encryption system more secure. Integer factorization generates two prime numbers and multiplies them to one another.

 

The resolution to the PoW complication or mathematical puzzle is called hash.

 

With the growth of the chain countless obstacles are coming up and algorithms require extra hash power to resolve these problems.

 

The meaningful thing is to manage these obstacles and preserve them from turning notably arduous. Because very hard-solving puzzles take a lot of time for a formation of the block. Too difficult problems make transactions stuck without implementation and the effect is stuck workflow. If the problem can’t be resolved in a certain time period, the block creation becomes an unbelievable thing.

 

But there’s one backside to all of this. If the puzzle is too manageable it makes the network efficiently accessible for DoS attacks and spam.

 

The answer to these problems must be easy to check. If not so, not all nodes will be able to analyze if the calculation is accurate.

 

And the last but not least thing is the trust. You will have to trust other nodes and this is the point where the blockchain proofs its transparency.

Algorithm implementation

The level of the problem’s complication is related to the current power, the network load and of course the number of users. Every block is secure, cause each next block holds the hash of the previous block and this prevents the chain from attacks.

 

If a node manages to resolve the puzzle in a particular time period, the new block is formed and the transactions are put into it. The block is supposed to be verified.

Bitcoin and the PoW algorithm

There is a bunch of cryptocurrencies that have adopted the PoW protocol. But the company that put the foundation to this consensus is the Bitcoin. Nowadays Bitcoin is not singly the original but the most prosperous cryptocurrency that works via the algorithm too. The second large currency that executed PoW is the Ethereum.

 

The PoW was the important point of the Bitcoin system right from the start. Satoshi Nakamoto was clear when he wrote that the network would timestamp transactions by hashing them into an ongoing chain of hash-based PoW, forming an unchangeable record without redoing the PoW.

 

The answer to difficulties of the Bitcoin is the Hashcash. This algorithm lets changing the complexity of an obstacle based on the full power of the chain. Bitcoin network forms a block in 10 minutes (average). The similar system is administered by the Bitcoin-based coins, such as Litecoin.

Advantages of the Proof-of-Work

The principal advantage of the method is that the protocol is a great way to detect spammers. If a certain amount of work is needed for each process, then the computational energy of most spammers won’t be sufficient for sending a lot of unsolicited emails.

 

The second benefit is that PoW can guarantee the safety of the whole network. This is the main purpose of why numerous cryptocurrencies use PoW. If a lot of nodes are competing to determine the problem’s resolution, then the required computational energy will become so high that the chain will become unattainable for one or even a not so big group of hackers.

Disadvantages of PoW

The PoW method has two central weaknesses. The first is that a lot of energy is wasted for mathematical puzzles resolution by computers and this harms our environment.

 

Research by Alex de Vries has shown that estimated Bitcoin mining uses 24 Terawatt hours of electricity per year. This quantity of electricity per year is exploited by the whole population of Ireland. Several blockchains learned this and various other researches and decided to use Proof-of-Stake, alternatively to PoW algorithm.

 

But there’s a reverse side to this, the other research that was held in November 2018 concluded that 80% of the power that is managed by Bitcoin mining is green energy.

 

The second disadvantage of Proof-of-Work is connected with safety. Normal security with PoW can be given only if a huge amount of nodes are operating with the system. If the quantity of nodes in the network is poor, the group of hackers can connect many nodes to it and take authority of the blockchain. This sort of hackers attack is called a 51% attack.

What is a 51% attack?

This attack is also called a bulk attack. It is a case when a user or a group of users take charge of the mining power.

 

The hackers get sufficient capacity to take most of the events under their authority. They can make a monopoly from the new blocks generation and gather all the bonuses by themselves. Moreover, they have a chance of inverting all the transaction.

 

There’re some modifications of 51% attacks that may take place with less than 50% of the power, but these attacks are likely not going to end up with a success.

 

For instance, here are some of the companies that suffered from this type of attacks:

Ghash.io suffered from this assault in 2014.

Operating on the Ethereum Krypton and Shift was attacked in 2016.

One of the most huge attacks was in 2018. The suffered company was Bitcoin Gold, which lost almost $18 million worth of coins.

 

It demands a bunch of mining power to do a 51% attack and it’s not a productive opportunity at all.