In recent years, the popularity of cryptocurrencies has grown tremendously, and Bitcoin has become a legitimate asset with significant interest from institutional investors. These cryptocurrencies including Bitcoin are built on blockchain technology, where proof-of-work (PoW) plays a fundamental role in supporting the security and integrity of crypto-financial technology.
In simple terms, a blockchain is a decentralized ledger that consists of blocks containing some sort of information (with Bitcoin, for example, it is a list of transactions). The blocks in the ledger are immutable, meaning they cannot be changed and are meant to serve as a lasting record of transactional history. If the ledger is decentralized, i.e. does not have a single authority, who can add new blocks to the database and verify their validity? Proof-of-work provides a possible answer to this question.
The concept of “proof-of-work” was in fact introduced before the popularization of blockchains and was not even used in a blockchain at first. In 1992, Dwork and Naor proposed the idea of proof-of-work to combat junk mail, and this idea was developed further by Adam Back in the Hashcash algorithm. The algorithm required every mail sender to do some cryptographic task spending some CPU prior to sending a message. This way, sending junk which involves sending a large number of messages to different addresses becomes quite expensive for spammers.
In 2009, Satoshi Nakamoto – the mysterious creator of Bitcoin – published a white paper where proof-of-work was combined with an economic incentives mechanism to build a means of ensuring the Bitcoin blockchain’s integrity and preserve order in the productions of new blocks. This was the beginning of the biggest cryptocurrency to date – Bitcoin. Satoshi refered to Hashcash as the basis for Bitcoin’s protocol. In Bitcoin, network participants are required to solve cryptographic problems to be able to propose new blocks to the blockchain. Since then, Satoshi’s work has inspired a number of others to develop their own cryptocurrencies, and proof-of-work became one of the most widely used elements of modern blockchains.
How it works
As mentioned, blockchain is a decentralized database built with sequential blocks containing recorded information, hence the term “blockchain”. The database is supported by a network of independent participants – “nodes”. In proof-of-work blockchains, the right to add new blocks to the blockchain is given to the participants that are ready to spend computational power to solve cryptographic problems. Participants competing to add new blocks are called “miners”, and the process itself – “mining”.
When a new piece of information (like a transaction) needs to be added to the blockchain, the miners engage their computational powers to find a valid block. This is done by finding a “hash” that satisfies a particular condition set by the network protocol. A hash is the result of a hash function often used in cryptography. It maps data of any format and size to fixed-sized values. In the case of Bitcoin, the hash function used is SHA-256.
In creating new blocks, miners hash three things: the hash of the previous block, the set of transactions to be added to the blockchain, and a nonce (without it the resulting hash would always be the same as the blockchain data is invariable) until the right hash is found. The protocol sets a level of mining difficulty which is algorithmically adapted in a way that the time to find a correct hash (and hence a new block) averages out to ten minutes.
Mining is competitive, and the participant who finds the required hash the fastest is rewarded with some amount of blockchain currency. The level of reward is set by the blockchain protocol, and in the case of the Bitcoin blockchain, currently equals 6.25 BTC per block. This economic incentive, initiated via the “coinbase transaction”, is used to ensure that enough miners participate in the network to keep it going
In some cases, miners can find more than one block that satisfies the requirements of the protocol at the same time, which splits the chain end in two. Since there can only be one correct (or “canonical”) chain, the protocol needs a way of handling such situations. In Bitcoin, only the longest chain is viewed as the correct chain: Miners will continue to mine on both chains initially, but as soon as another block is found on top of one of the two previous blocks, that chain will become the canonical chain and miners are economically incentivized to discard the other block.
Security-wise, one of the characteristics of PoW blockchains is their relative resistance to sybil attacks and 51% attacks. A sybil attack describes a situation where one actor creates multiple pseudo identities in the network, and tries to get an unfair advantage over other network participants with single identities. 51% attacks occur when one user gains control of more than 51% of the resources in the network and is hence able to control the addition of new blocks. PoW does not prevent such attacks, but makes them very costly (controlling more than 51% of the computational power for the Bitcoin network would require an almost impossible amount of computing power) and therefore, less likely.
Where it is used
One of the most famous blockchains using PoW is certainly Bitcoin. Created in 2009, Bitcoin pioneered the field of decentralized digital cryptocurrencies, and to date it is the clear leader by market capitalization.
Bitcoin uses SHA-256 as its hashing function, and the miners solve the task of finding a hash starting with a certain number of zeroes. The mining difficulty is adjusted every 2016 blocks. The blocktime is relatively long compared to other blockchains, with 1 block per 10 minutes. Bitcoin mining is usually done with special hardware – ASICs (Application-Specific Integration Circuits).
Solving cryptographic puzzles burns a lot of energy, and high energy consumption is often cited as one of the main problems of PoW blockchains. However, it is not as straightforward as it seems. While the consumption is indeed high, and for Bitcoin even comparable to the yearly consumption of some countries (like Czech Republic), a large part of it comes from renewable energy. As miners want to minimize their energy cost, mining centers are often located in areas with cheap electricity which often means hydropower or other renewable resources (Sichuan province in China, Iceland, Quebec in Canada are prime examples).
Another PoW “giant” is Ethereum, the second cryptocurrency by market capitalization to date. Ethereum positions itself as a platform for dApps, powered by its native cryptocurrency – Ether. The protocol uses ethash instead of SHA-256, and its blocktime is significantly shorter than that of Bitcoin – with one block created every 13 seconds. It should be noted that Ethereum is currently in the process of transitioning to proof-of-stake, another popular method of supporting blockchain networks.
With Bitcoin, PoW blockchains are at the top of the cryptocurrency markets, supported by PoW’s proven track record of more than 11 years. Various technological updates have partially solved the issues of speed, and generally improved the scalability of the network. At the same time, more and more blockchain networks are focusing on proof-of-stake.