Proof of Work (PoW) describes a system that requires a non-trivial but feasible amount of effort to prevent unwarranted or malicious use of computing power, such as sending spam emails or launching Denial of Service attacks. This concept was later modified to include digital currency by Hal Finney in 2004 through the idea of ”reusable proof of work” using the SHA-256 hashing algorithm.
After its introduction in 2009, Bitcoin became the first widely adopted application of Finney’s PoW idea (Finney was also the recipient of the first Bitcoin transaction). Proof of work has also been the foundation of many other cryptocurrencies, allowing for secure, decentralized consensus.
Understanding Proof of Work
This explanation will focus on proof of work as it works on the Bitcoin network. Bitcoin is a digital currency backed by a type of distributed ledger known as the “blockchain“. This ledger contains a record of all Bitcoin transactions, organized into a series of “blocks” so that no user can spend one of their holdings twice.
To prevent manipulation, the ledger is public or “distributed”; the edited version is easily rejected by other users. In practice, the way users detect manipulation is through hashes, long strings of numbers that serve as proof of work. Run the given data through a hash function (bitcoin uses SHA-256) and it will generate only one hash.
However, due to the “avalanche effect”, even a small change in any part of the original data will result in a completely unrecognizable hash. Regardless of the size of the original dataset, the hash produced by the given function has the same length. A hash is a one-way function: it cannot be used to extract the original data, only to verify that the data generated by the hash matches the original data.
How does it Work?
For Proof-of-work “work” is the key: the system requires miners to compete with each other to be the first to solve random math puzzles to prevent someone from gaming the system. The winner of this race is chosen to add the final batch of data or transactions to the blockchain. Winning miners are rewarded with new cryptocurrency only after other network participants verify that the data added to the chain is correct and valid.
Creating each hash for a set of Bitcoin transactions is trivial for a modern computer, so to make the process “work”, the Bitcoin network sets a level of “difficulty”. This setting is adjusted so that approximately every 10 minutes a new block is “mined” – added to the blockchain by generating a valid hash. Setting the difficulty is done by setting a “target” for the hash: the lower the target, the smaller the set of valid hashes, and the more difficult it is to create one. In practice, this means a hash that starts with a long string of zeros.
Special Considerations
Since a given dataset can only generate one hash, how do miners ensure that they generate a hash per target? They modify the input by adding an integer, called a nonce (“number used once”). If a valid hash is found, it is broadcast to the network and the block is added to the blockchain.
Mining is a competitive process, but it’s more of a lottery than a race. On average, someone produces an acceptable piece of work every ten minutes, but who it is is anyone’s guess. Miners join together to increase their chances of mining blocks, generating transaction fees and, for a limited time, the reward of newly created Bitcoins.
Proof of work makes it very difficult to change any aspect of the blockchain, as such a change would require reworking all subsequent blocks. This also makes it difficult for a single user or group of users to monopolize the network’s computing power, as the machines and energy required to complete a hash function are expensive.
Proof of Work and Mining
Think of a traditional bank account. When you deposit a check into your savings account, how do you know you’ll be credited the correct amount? How can a check writer trust that he will only be charged the amount he wrote on the check? The value of a bank is that all parties to a transaction trust the bank to move money accurately.
With cryptocurrencies, there are no bankers or financial institutions to guarantee trust. Instead, miners and proofs of work guarantee transparent and accurate transactions. In blockchains that use proof of work, miners are the watchdogs and facilitators that keep the system smooth and accurate.
The proof of work mechanism requires miners to use computing resources for permissions. It works like this:
- New transactions are grouped together. Users buy and sell cryptocurrency, and data from these transactions are compiled into a block.
- Miners compete to process a new block. Cryptominers compete to be the first to solve a complex math problem. By showing proof that they’ve done the computational work – called a hash – a miner earns the right to process a block of transactions.
- A miner is selected to add a new block. There is some randomness in deciding which miner gets the right to process a block. The winner gets new cryptocurrency coins and adds a new block to the blockchain.
Example
Proof of work requires a computer to randomly engage in hash functions until it comes up with an output with the correct minimum number of leading zeros. For example, the hash for block #660000, which was mined on December 4, 2020, is 0000000000000000008eddcaf078f12c69a439dde30dbb5aac3d9d94e9c18f6.
The block reward for a successful hash is 6.25 BTC. This block always has 745 transactions with more than 1,666 bitcoins like the previous block header. If someone tries to change the transaction amount by even 0.000001 Bitcoin, the resulting hash will be unrecognizable and the network will reject the fraud attempt.
Why is Proof of Work important?
The first cryptocurrency, Bitcoin, was created by Satoshi Nakamoto in 2008. Nakamoto published a famous white paper that described a digital currency based on proof of work protocols that would allow secure, peer-to-peer transactions without the involvement of a centralized authority.
One of the problems preventing the development of an effective digital currency was previously called the double spending problem. Cryptocurrency is just data, so there must be a mechanism to prevent users from spending the same units in different places before the system records the transaction.
While you’d be hard-pressed to spend the same dollar bill on two separate purchases, anyone who copies and pastes a computer file can probably imagine how you can spend digital money twice—even ten times or more. Nakamoto’s consensus mechanism solves the problem of double spending. By encouraging miners to verify the integrity of new crypto transactions before adding them to the distributed ledger that is the blockchain, proof of work helps prevent double-spending.
Cryptocurrencies that Use Proof of Work
About 64% of the total market cap of the cryptocurrency world uses proof of work for verification. Some of the most popular cryptocurrencies include:
- Bitcoin
- Dogecoin
- Bitcoin Cash
- Litecoin
- Monero
Proof of Work vs. Proof of Stake
Proof of work and proof of stake are two different consensus mechanisms for cryptocurrency, but there are important differences between them. Both methods verify future transactions and add them to the blockchain. With proof of stake, network participants are called “validators” instead of miners.
The important difference is that instead of solving math problems, validators lock a fixed amount of cryptocurrency—their stake—in a smart contract on the blockchain. In exchange for “staking” cryptocurrency, they get a chance to verify new transactions and earn a reward.
However, if they incorrectly verify incorrect or fraudulent data, they may lose some or all of their interest as a penalty. Proof of stake makes it easy for many people to participate in blockchain systems as validators. There is no need to buy expensive computer systems and consume large amounts of electricity to store cryptocurrencies. All you need are coins.
Criticism of Proof of Work
Proof of Work systems has attracted a considerable amount of criticism, mostly for their high power consumption:
Energy requirements
According to the New York Times, in 2009 you could mine a bitcoin with a regular desktop computer and a small amount of electricity. But in 2022, you will need to use an amount of electricity equivalent to what the average American home uses in nine years to mine one bitcoin.
Centralization
One of the most attractive features for cryptocurrency investors is decentralization. However, thanks to the high cost and energy-intensiveness of proving work, mining operations have been centralized into a small number of large plants. This could lead to most cryptocurrency operations being controlled by a few entities.
Conclusion
Proof of work is the most popular of the two main consensus mechanisms for verifying transactions on blockchains. Although not without limitations, miners using proof of work help ensure that only legitimate transactions are recorded on the blockchain. With this, miners can also help protect blockchain security from potential attacks that could cause the loss of blockchain-based businesses.