Understanding Proof of Work
If you haven’t already, read Understanding Hash Functions and Understanding Blocks as a primer for this article.
Proof-of-Work (PoW) is a consensus mechanism for distributed blockchains. PoW is used to create new blocks and forces miners to use massive amounts of electricity and computing power to produce a valid block.
When a miner produces a valid block, they are rewarded and given the ‘block reward’. In Bitcoin, that block reward is currently 12.5 Bitcoin.
Target Hash
To produce a valid block, the hash of the block must be of a certain value. Hashes are just large numbers represented in hexadecimal form. In order for a block to be valid, the hash (a number) must be below a target value. This target value is adjusted based on the amount of computing (or hashing) power of all the miners.
Nonce
Recall that blocks include something called a nonce. A nonce is a number that is combined with the rest of the data in the block to produce a hash.
Miners are racing to find the correct nonce (a number) to combine with the other block data. If the hash of this nonce and block data is above the target value, it is not a valid block.
The miner will then retry with a new nonce, and hash the data again. This is done over and over again until a miner finds a nonce that when combined with block data, produces a valid block.
This process of trying different nonces, hashing, and then comparing to the target value is what Proof-of-Work is. This process requires a lot of computing power and therefore a lot of electricity.
Why PoW?
Proof-of-Work is necessary for stopping attacks on the Bitcoin network. Due to how much electricity miners must use, PoW incentivizes honest behavior. Mining on a different version of the blockchain or going back and trying to change blocks is just a waste of electricity, a waste of money.
PoW makes it so a malicious miner must have 51% of the network’s computing (hashing) power in order to successfully carry out an attack, this is known as a 51% attack. Equipment costs and electricity costs to achieve 51% of the Bitcoin network’s computing power make this attack much less likely.
Stably is a US-based FinTech providing fiat onramp and stablecoin infrastructure to digital wallets, decentralized applications, Web3 projects, and blockchain development organizations. Our mission is to power the next billion Web3 users with a superior fiat <> crypto onramp to all popular and emerging blockchain ecosystems.
For more information, contact Stably.
Follow Stably: Twitter | Linkedin | Facebook | Stably Discord Community
RISK DISCLAIMER: Digital assets involve significant risks, including (but not limited to) market volatility, cybercrime, regulatory changes, and technological challenges. Past performance is not indicative of future results. Digital assets are not insured by any government agency and holding digital assets could result in loss of value, including principal. Please conduct your own thorough research and understand potential risks before purchasing/holding digital assets. Nothing herein shall be considered legal or financial advice. For more information about the risks and considerations when using our services, please view our full disclaimer.