Securing the Network with Proof of Work

Problem

In my last post, I discussed how protocols design systems to discourage participants from manipulating the network and how important this is in the absence of a centralized institution. What is to prevent a network validator with a copy of a ledger from sending false information to other nodes?

Bitcoin’s Solution

Bitcoin solved this Peer-to-Peer (P2P) issue. The network was designed to prevent anonymous actors from corrupting the network. Bitcoin leveraged code to facilitate trust.

PoW presented computationally intensive, arbitrary math puzzles that must be solved to “write” (e.g., add a transaction) to the network. These math puzzles take a considerable number of computational resources to solve making it economically damaging to try to corrupt the network. The effort balances deterrence and reward: each validated block yields a token reward to the miner.

The science behind PoW blends cryptography, mechanism design, and networks. These factors made up the building blocks for a network to become more fault intolerant. The design started with the assumption all participants are corrupt and worked backward to reward proper behaviors and discourage malicious ones.

This matters for one reason: it enabled participants to trust code as an enforceable contract instead of relying on a legal agreement and, by extension, a centralized institution.

Diving Deeper in Proof of Work

Bitcoin enabled something remarkable: code as a settlement layer. Since this writing is centered around first principles, we need to build up an understanding of PoW before we dive into other elements of Web3.

I mentioned PoW in concept but did not define it explicitly: PoW is a mechanism to verify if a transaction sent on a network is valid. Verification is the critical component. If there is no centralized institution like Visa to confirm a transaction, you need some transparency within the protocol for network participants to trust the system and feel confident in participating.

Let’s look at this from an example:

I send you some BTC tokens on the Bitcoin network. Referencing the last article, we learned that tokens are just entries on a ledger. So, when I send tokens to you, the network validators (nodes) compete to add the entry (change of state) to the distributed ledger. The competition is based on which node can solve a complex mathematical problem fastest.

Under the Hood

A node will attempt to collect all recent network transactions, including their metadata, verify those transactions, guess a random, single-use number called a “nonce,” and then execute that data into an algorithm (SHA-256 or Secure Hashing Algorithm) to find the hash of the newly created block. It makes your eyes bleed in trying to parse apart what’s going on here, but it also gives some indication as to why it is called Proof-of-Work. 😊

Circling Back to Competition

If a node is the first to find the hash value, the node can add that hash value to the next block and, subsequently, the ledger. The node would then broadcast the blockchain’s new “state” to the other nodes. The other nodes will then validate the presented hash – if it matches. When validated, other nodes will add the hash of the newly minted block to their copy of the distributed ledger until the entire network converges on this state of the blockchain.

The process of determining the hash is complicated. It takes effort and energy. But what is incredible about Bitcoin’s design is that while finding the hash is hard, verifying the hash is easy: it leverages a simple matching function.

The node that is the first to determine the hash value receives a “block reward.” This is one of the PoW components I mentioned earlier in this post: As a reward, the validator received mined tokens, acting as the incentive for being a network validator.

Rewards

Per Bitcoin’s whitepaper, each validated block currently rewards the network validator 6.25 BTC per block. The reward rate halves every 210,000 blocks, which comes out to every four years. Each block takes about 10 minutes to validate, so after 210,000 blocks, roughly four years will pass between each halving. Recall that the rewards act as incentives for participants to put in the effort to verify transactions. Without these incentives in place, there is no draw to validate the network besides interest or hobby.

Game Theory

Guessing the correct nonce to match the hash requires work: a computer’s processing power and electricity. For a nefarious actor to present an invalidated hash, the attempt would require a significant amount of energy and power to fake. Consequently, any attempt at manipulation is economically prohibitive. When you hear the media complain about the power Bitcoin miners consume, this is the process to which they refer.

Advantages and Disadvantages of Proof of Work

The main advantages of a proof of work system include a high level of security, as demonstrated by the effort and mechanism design employed in verifying new blocks to the ledger. It is also the first method of verifying transactions in a decentralized, permissionless manner – there’s no need for a Visa to play a role in verifying a BTC transfer. Additionally, network validators (nodes) are given the chance to earn rewards to the role they play in the ecosystem.

One disadvantage is inefficiency: each block takes roughly 10 minutes to mine, whereas newer layer ones that leverage Proof-Of-Stake like Solana allows for one block every 400 milliseconds. Given how computationally intensive the verification process is, it also takes up an incredible amount of energy. Lastly, the fees paid to network validators are more expensive than other consensus mechanisms.

Conclusion

Proof of Work defines the consensus mechanism popularized by the Bitcoin network. It requires a considerable amount of “effort” based on computing power and energy to participate, acting as a deterrent to malicious actors. Without PoW, it would be difficult for a group of outsiders to trust code as a source of truth.

Remarks

Special thanks for Zoe Enright and Samuel Wheeler for their feedback and edits on this post.

Subscribe to Filice.ETH
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.