Proof Of Work — Part 1

Cryptonomy
Game of Life
Published in
5 min readMay 12, 2018

--

Proof of Work is the first and most popular consensus algorithm used by most blockchains like Bitcoin, Ethereum, and Litecoin. To better understand how blockchain works, it is important to have a good understanding of how Proof of Work actually works and why is it so critical for decentralization.

Proof of Work was initially invented as a spam prevention mechanism. In a nutshell, it requires the user to solve a complex mathematical puzzle in order for his message to be valid. The puzzle used is a cryptographic hash puzzle. Before moving on, it is important to understand what a hash function actually is.

Hash function — a hash function is a mathematical function which takes in an input and outputs a “random” fixed length output. The reason I put randomly in double quotes is that it isn’t exactly random. For any input, there is going to be a completely different output which we can’t determine before running the entire function, but for every input for a hash function, the output will always be the same. A key point of the hash function is that it is impossible to know the hashed input given only the output, this means the only way to find the input resulting a specific output is by running the hash function on all the possibilities until the output matches the required one.

The puzzle in Proof of Work uses a hashing function to create and To solve the puzzle, one will have to find out a number which when hashed together with a pre-determined input resulting in a number lower than a certain target number.

Trending Cryptocurrency Hub Articles:

1. Is Groestle Coin The Next Digital Gold?!

2. Krypton Capital Invests in Gladius — Will Help with Product Development and Market Expansion

3. Three ICOs with Working Products Already Being Used by the Public

A good analogy explaining that is a lotto analogy. In a lotto, you need to guess numbers from a form and send it, which a small amount of money. As you send more forms you have a greater chance to win but it gets more expensive as you send more forms. If you win the lottery, you receive some money which should be more than the price one paid to win the prize, but you always have the possibility of not guessing correctly and thus lose all money invested.

In Proof of Work, you guess numbers, which is like filling up the form. Then you need to calculate the hash function which consumes computational resources (which the payment for comes as the hardware and electricity expenses). The more numbers you try the greater your chance to find the answer. And if you guess correctly you will receive a compensation in the form of a cryptocurrency (new coins + fees).

But now let’s talk about why do we need Proof of Work in the first place. I will use Bitcoin as the example here but it applies to all other Proof of Work-based chains as well.

The goal of Bitcoin is to be a decentralized electronic cash. Decentralization means the network is operated and maintained by the public, without any trusted authority with special rights controlling it.

To be decentralized, Bitcoin had to find a way to prevent people spending money they do not have, but without having a central authority validating and approving all transactions. For this mission, it had to find a way to manage the writing authorization with no trusted entity. Satoshi Nakamoto used Proof of Work for this mission. When someone wants to write a new block he has to solve the Proof of Work puzzle first. One more thing to note about hash puzzles is that they are very hard to solve but very easy to prove the correctness of an answer. That’s because when trying to solve you need to run the hash function many times but to validate it you only need to run it once. When producing a new block, the Proof of Work puzzle must be solved correctly in order for others to accept them to their copy of the blockchain. This, in fact, creates the situation where your chances to produce the next block are equal to your portion of the hashing power in the network. Satoshi phrased it as “1 CPU 1 vote”. This uses the concept of economic barriers to decentralized the network. Because hashing power is expensive, as there are more participants in the network it becomes more expensive for a single party to take over the network. This gives the economic assurance that no one will be available to afford the computational power needed to have 51% of the system’s “voting rights”.

In this article, I focused on how Proof of Work works in general and how it allows achieving decentralized consensus. In later articles, I’ll explain to more extent how does Proof of Work actually gives blockchains their security and immutability characteristics.

Explore Cryptonomy and Follow us on Twitter and Facebook.

This guest article was written by Ben Kaufman, founder of BitCampus.io

Join tens of thousands of other crypto-enthusiasts on Cryptonomy for iOS or Android.

--

--

We're a group of developers who are working on building an ecosystem for other crypto-enthusiasts, and that's why we created Cryptonomy! Live on iOS & Android