Proof of Work is a blockchain consensus protocol in which nodes on a blockchain's network validate transactions and prevent double-spending. It's distinct from other consensus mechanisms, like Proof of Stake or Delegated Proof of Stake, which serve the same purpose but take different approaches. For a Proof of Work blockchain, the process of coming to consensus involves cryptocurrency mining, whereas Proof of Stake blockchains do not have mining. Instead, they have staking.
More generally, Proof of Work is a phrase used to describe any system that requires computers to exert computational effort in order to complete a process or task. This extra computational effort results in a solution, which is then presented and verified before the desired process or task is executed. Proof of Work systems were initially designed to prevent spam attacks and Distributed Denial of Service (DDoS) attacks, among other things. Now, Proof of Work is most commonly associated with blockchain technology.
This post will walk you through the history of Proof of Work, the benefits and disadvantages of Proof of Work systems, and a summary of how Proof of Work blockchains function.
A Brief History Of Proof of Work
While Satoshi Nakamoto, the anonymous individual(s) who founded Bitcoin, is often credited with inventing Proof of Work systems, they actually existed long before the advent of blockchain. Proof of Work systems have a long and little-known history.
The First Presentation of a Proof of Work System
Back in 1992, just as the internet, faxes, and email were coming into mainstream usage, spam messaging was already becoming a problem. Two academics, Cynthia Dwork and Moni Naor, recognized the problem and tried to solve it. The essay, “Pricing via Processing or Combatting Junk Mail,” presented a way to prevent spammers from sending out unsolicited mass messages to ordinary internet users:
"The main idea is for the mail system to require the sender to compute some moderately expensive, but not intractable, function of the message and some additional information. Such a function is called a pricing function."
Although the term “Proof of Work” is never used in this particular essay, the ideas presented in it are the first description of a Proof of Work system. The notion that a moderately difficult computational problem will deter spammers and ensure that all (or at least most) completed processes are desirable is the essence of Proof of Work.
Later, in 1997, a member of the cypherpunk movement named Adam Back founded a protocol called HashCash. The original HashCash announcement— we might think of it as the HashCash whitepaper today— was sent out to the infamous cypherpunk email list on March 28, 1997.
Just as with the previous essay, the term “Proof of Work” was never used in Adam Back’s HashCash announcement. However, many of the ideas presented with the HashCash protocol evolved into what we understand to be a Proof of Work mechanism today. HashCash even included something called “Double Spending Protection,” a foundational concept in blockchain.
Moreover, Satoshi Nakomoto cited HashCash as an influence in Bitcoin, writing that in order “to implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-of-work system similar to Adam Back's Hashcash.” The connection is not just assumed but made explicit by the founder of Bitcoin themself.
The Term “Proof of Work” Is Coined
Two years after Adam Back published the HashCash whitepaper, yet another relevant academic essay was published. Markus Jakobsson and Ari Juels wrote a paper called “Proof of Work and Bread Pudding Protocols,” thus coining the term “proof of work.” Jakobsson and Juels state that a proof of work system is:
“a protocol in which a prover demonstrates to a verier that she has expended a certain level of computational effort in a specified interval of time. Although not defined as such or treated formally, proofs of work have been proposed as a mechanism for a number of security goals, including server access metering, construction of digital time capsules, and protection against spamming and other denial-of-service attacks.”
Bitcoin: The World's First Proof of Work Blockchain
Finally, on or about October 31, 2008, Satoshi Nakamoto published the Bitcoin whitepaper. Nakamoto was clear that proof of work was a key element of the Bitcoin protocol:
We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work.
While many believe Bitcoin was the first iteration of a Proof of Work system, it was not. Bitcoin is certainly the most prominent example of a Proof of Work protocol but it was not the first, as the previous three subsections make clear.
The main innovation Bitcoin offered was not a Proof of Work system itself, but rather turning a Proof of Work system into a competitive process called mining. More on this later.
Benefits of Proof of Work
As noted above, a Proof of Work system is one that forces computers to do a little extra work before a requested process is executed. The extra work results in a solution, which is then presented to the other computers in a network. The other computers can easily verify that the solution is accurate and approve whatever action the original computer is requesting.
This is a key characteristic of a Proof of Work system: it must be somewhat difficult to find a solution but extremely easy to verify that a particular answer does, in fact, solve the problem. Cryptographic hash functions play a huge role in modern Proof of Work implementations. In this way, Proof of Work systems are similar to Merkle Trees. Once a hash is created, all other machines can verify that it is a true result with very little computational effort.
There are several major benefits to Proof of Work systems. First, they are an excellent way to deter spammers. If a moderate amount of work is required for each process (e.g. sending an email), then most spammers wouldn’t have enough computational power to send a huge number of unsolicited emails.
Or, in the case that a spammer did have enough computational power to send a huge number of emails, the financial costs of this processing power (i.e. buying the hardware and paying for the electricity) would likely exceed the profits to made from spamming. That’s how a Proof of Work system disincentivizes spamming and other forms of malicious behavior.
In addition, Proof of Work systems can be used to provide security to an entire network. This is the primary benefit for blockchains that use a Proof of Work consensus mechanism. If enough nodes (computers or dedicated mining machines) are competing to find a specific solution, then the computational power needed to overpower and manipulate a network becomes unattainable for any single bad actor or even a single group of bad actors.
Proof of Work Blockchains
Imagine that there is a reward for being the first one to solve a specific mathematical problem. Suppose further that millions of computers are all competing to earn that reward. The first one to complete the problem gets the prize. Once a solution is found, the reward is distributed and a new problem is presented. All the machines begin competing to solve the new problem, and so on. In a very simplified way, this is how Proof of Work networks function.
Each “block” in a Proof of Work blockchain is really just a list of completed transactions (along several other bits of data). In an ultra-simplified way, each transaction is really just a transfer of data in a ledger from one address to another, something akin to: address ABC123 sends 0.5 BTC to address XYZ456.
In order for the network to complete a transfer of funds, the transaction must be confirmed and written into a block on the blockchain. A block is mined every time a miner finds a solution to a mathematical problem and broadcasts their solution to the rest of the network.
In other words, the miner solves the problem and proves their work to the other machines that were trying to solve the same problem. All the machines on the network verify the solution. If the solution is true, the miner who found it is given a reward. Then, a new problem is presented and the competition begins again. That’s how Proof of Work blockchains function.
The size of the reward for mining a block varies from blockchain to blockchain but it is always paid in the coin native to that particular blockchain. The size of the reward on a single blockchain may also change over time.
While the rewards may vary from blockchain to blockchain, the purpose is always the same: to incentivize individuals to use their computers to solve the difficult math problems required for blocks to be mined. If this incentive wasn’t in place, it’s unlikely that anyone would waste their computational resources (and thus electricity and money) on cryptocurrency mining on a particular blockchain. And with no one mining, transactions would never be processed and the blockchain would be useless.
Similarly, without a large network of computers competing to solve computational problems, a blockchain would have no security. Anyone with a sufficiently powerful computer would be able to manipulate the blockchain, erasing or altering transactions at will. This would make the currency worthless.
To sum it all up: blockchains need computers solving difficult mathematical problems in order for blocks to be mined and transactions to be completed. To incentivize people to use their computers to solve these problems, a reward is given each time a new block is mined. This increases the level of security of the blockchain and ensures that all transactions will be processed in a timely manner. This is the beauty of Proof of Work blockchains.
Technical Details of Proof of Work In Blockchain
In the case of Proof of Work blockchains, the "work" nodes on the network are doing-- that is, the mathematical problem they are trying to solve-- is finding a block hash that is less than or equal to a predetermined number, known as the "target." The block hash is the block header data run together via a cryptographic hash function. The block header itself is made up of 6 pieces of data:
- the version of the blockchain code base active at the time of the block is mined
- a compressed form of the target number, known as Bits
- the timestamp of the exact time that the block is mined
- the Merkle Root, which is all the block's transaction IDs hashed via a Merkle Tree
- a cryptographic hash of the previous block's block hash
- the nonce
So, these 6 pieces of data make up a block's header. When these 6 pieces of data are hashed together, the resulting hash is known simply as the "block hash." In order for a miner to mine a block, they must find a block hash that is less than or equal to the target.
It's important to note that the target is different from what's commonly referred to as the difficulty. In fact, the target and the difficulty are inversely related. As the target is reduced, the difficulty of finding a block increases.
This is true because miners are trying to find a block hash that is less than or equal to the target. If the target is extremely high, the chances that a miner can find a block hash less than the target are comparatively high. If the target is low, then there is a much more limited set of numbers that are less than or equal to that target. This makes it harder to find a block hash beneath the threshold.
The target of every Proof of Work blockchain is adjust periodically to ensure a relatively constant block time. With Bitcoin, for instance, the target is adjusted every two weeks. Bitcoin aims to maintain 10 minute block times. If the miners on the peer to peer network are too fast and are finding blocks too quickly, the target is reduced to increase the difficulty and slow down the rate at which miners are finding blocks. If the miners are struggling to find blocks and block times are regularly exceeding 10 minutes, then the target is increased to make it easier for miners to find blocks, thus slightly speeding up block times.
Now, recall that the block hash of any block in a Proof of Work blockchain is the cryptographic hash of the same block's header, which itself is made up of six pieces of data. Notice that 5 of the 6 pieces of data are static-- meaning they must remain the same and cannot be adjusted.
The only number that can be changed is the nonce. The nonce is called the nonce because it is the number used only once. Each block has a unique nonce.
As noted above, the objective of the mathematical race-- the objective of cryptocurrency mining-- is to find a block hash that is less than or equal to the target. Since the nonce is the only number that can be changed, miners try to mine blocks by adjusting the nonce incrementally again and again. The goal is to find a nonce that, when hashed together with the other 5 pieces of data that make up the block header, produces a block hash that is less than or equal to the target.
Once a miner finds a nonce that satisfies these conditions, that miner broadcasts this nonce and its corresponding block hash to the rest of the nodes on the network. Each node verifies that the nonce does, indeed, produce the correct hash and that the hash is less than or equal to the target. If the network reaches consensus, then that block is added to the chain. The miner receives a block reward and the race starts all over again with a new block.
Disadvantages of Proof of Work Blockchains
There are two primary disadvantages to Proof of Work systems. The first is that they waste energy, which is bad for the environment. As computers perform extra computational work, additional electricity is used. This can add up to an extremely large amount of excess electricity consumption.
In fact, this is one of the most common criticisms of Bitcoin and of cryptocurrencies in general. A Dutch researcher named Alex de Vries published an essay in May 2018 that estimated Bitcoin mining consumes roughly 24 Terawatt hours of electricity per year— approximately the same amount of electricity as the entire nation of Ireland. Studies such as this have led to many criticisms for Proof of Work blockchains and led many to support Proof of Stake chains instead.
However, the simple statistic of how much energy the Bitcoin network consumes doesn’t tell the whole story. Environmentally speaking, Bitcoin mining isn’t as bad as you might think. A report on crypto mining released in November 2018 estimates that around 80% of the electricity used in mining is green energy. In some cases, Bitcoin mining operations are making use of excess electricity that a country's power grid would be unable to store and distribute anyway.
The second major drawback to Proof of Work blockchains is about security. Proof of Work blockchains provide adequate security only if there is a large network of miners competing for block rewards. If the network is small, the possibility remains that a hacker could gain a simple majority of the network’s computational power and stage what is known as a 51% attack.
In today’s circumstances, manipulating the Bitcoin blockchain is practically impossible. However, there are dozens of smaller Proof of Work blockchains that remain extremely vulnerable to 51% attacks.
In fact, many of these small Proof of Work chains can be successfully attacked for just several hundred dollars an hour on NiceHash, a website that allows users to rent hash power in order to mine cryptocurrencies. For more details, check out Crypto51, a website that lists in real time how much money it would cost to 51% attack every Proof of Work blockchain in existence.
While these two disadvantages of Proof of Work blockchains are serious concerns, Komodo’s Blockchain Security Service provides a solution to both.
With regard to the environmental concern, Komodo’s innovative delayed Proof of Work security mechanism recycles the incredible hash rate of the Bitcoin network to provide BTC-level security to all integrated blockchains. It leverages the gargantuan amount of electricity already being consumed to protect small Proof of Work blockchains.
As for the concern about 51% attacks and other types of blockchain manipulation, they are no longer an issue once a chain is secured with the power of the BTC network. A potential hacker would need to overpower both the KMD network and the BTC network at the same time in order to successfully attack a chain integrated to Komodo’s Blockchain Security Service.
Komodo’s Blockchain Security Service is available to any UTXO-based blockchain, including chains launched independently of Komodo Platform’s technology. Send an email to [email protected] for more information about this cutting-edge security service.
Proof of Work Blockchains Built With Komodo
Komodo is an open, composable Smart Chain platform. Other blockchain platforms are merely a single blockchain with the ability to support smart contracts. While this innovation helped promote the adoption of blockchain technology, the limitations of smart contract platforms present insurmountable challenges.
Komodo, on the other hand, gives every project an independent Smart Chain that can be customized in 18 different ways. Each Smart Chain has its own consensus rules, network, and currency. Transaction fees are always paid in each Smart Chain's native coin.
While Komodo’s blockchain is a Proof of Work blockchain, using the Equihash algorithm, Smart Chains launched with Komodo’s technology can be Proof of Work (PoW), Proof of Stake (PoS), or any combination of the two.
Smart Chains also have access to Komodo's Antara Framework. This includes the ability to activate Antara Modules, which include tokens, trustless oracles, Dilithium quantum security, stablecoins, instant micropayment channels, and much more. The Antara Framework also provides an open API that can connect external apps and software directly to your Smart Chain.
If you’re interested in learning more about building with Komodo, check out the Antara Composer. It's a web application that allows you to customize and launch your Smart Chain in just a few clicks. To learn more, check out this blog post on how to make a blockchain with Komodo's Antara Composer.
To get all the latest updates from Komodo, join the monthly email list. On the first Friday of every month, you'll receive a newsletter with information about all of the most important developments from the previous month. You can also join the Komodo Community Portal to chat with other community members and the Komodo team.
Join us as we continue to lead the blockchain revolution.