Proof of Work (PoW) is a methodology for a group of uncoordinated and untrusting actors to establish a consensus even though there is a potentially large incentive for them not to do so.
The algorithm was designed to defend against a range of attack vectors, such as spam, Sybil, and Denial of Service attacks, which all involve an adversary trying to amplify their influence on a network compared to a regular actor. To be effective the PoW algorithm should be:
- Specific to one instance
- Trivial to verify
Proof of Work (PoW) procedure is entirely arbitrary and uses hashes and nonsense numbers (Nonces) to create a game for the miners of a blockchain network to solve. The game uses computer processing power to solve a difficult mathematical problem. To solve the problem, the computer has to iterate through millions of hashes in order to find a viable answer.
Proof of Work represents the amount of computational power required to create a block and the PoW protocol results in:
- Competition between miners for the chance to add the next block to the chain
- Economic incentives for the winning miner to only include accurate transactions within each block.
- Internalized costs – paid by miners and passed on to the cryptotoken holders via inflation and transaction fees
- External costs – primarily environmental damage from resource expenditure
Both of these features increase the costs to attack the network. in addition, by slowing down transaction speeds over the network PoW makes it easier to achieve consensus and makes attacks more expensive.
In essence, the PoW protocol works as follows:
- Data is stored in block structures that are used to log pertinent activity on the network
- Miner’s solve a mathematically/computationally hard problem in order to be able to add the next block to the chain.
- The problem is a function of the previous block and the potential contents of the current block and this cryptographically links the current block to the previous block once the problem is solved.
- The problem involves creating a hash with a given number of leading 0s. The more leading 0s required in the hash the more resources needed to solve the problem and so the more “difficult” the problem is said to be.
- Solving the problem is a pseudorandom problem and thus blocks are awarded to miners on a probabilistic basis depending on how many resources the miners commits as a percentage of the total resources currently mining that blockchain.
- To solve the problem miners have to expend real world resources (primarily electricity) helping secure and validate a network by making the miners commit to a state machine history
- The difficulty is typically adjusted automatically on a periodic basis to ensure that on average a new block is found at a set interval (for example every 10 minutes on average for Bitcoin).
- In order to solve the problem miner’s must be willing to expend real world resources and many cryptoeconomists believe this spending of real world resources is both a source of value and security for the given blockchain.
- In return for discovering the next block, a miner is typically given a reward in the given cryptotoken and thus is a token supply mechanism for PoW blockchains. However, this reward is often periodically adjusted downwards in order to induce a level of FOMO.
- Nakamoto consensus means that in the case of the blockchain forking, miners will be inclined to mine on the longest (or the chain with the most work put into it) chain in order to avoid losing potential rewards.
The PoW protocol is the cornerstone of most open blockchains and whilst it is definitely not an efficient use of resources it does seem to provide a level of effective security. However, the PoW mechanism design does result in some, perhaps surprising, behaviour such as:
- The miners dilemma
- Pooled mining
- Industrial mining
- Selfish mining
- Proof of work outsourcing
- Proof of work on chain forks
- Tendency towards centralization
- Deflationary pressure