Tag Archives: Environmental Sustainability

Consensus Algorithms and Environmental Sustainability

Consensus mechanisms/algorithms (especially POW – proof of work) that power some of the biggest and most popular public (permission less) blockchains such as Bitcoin, Ethereum, Litecoin etc. have received a lot of criticism recently due to their adverse effects on the environment. In order to create (mine) new coins (data) that get recorded in blocks and get transferred later on, vast amount of energy needs to be consumed to solve the mathematical puzzle (finding the nonce value) which is based on probability. And miners burn energy and compete with others with their hash power to find this nonce value in a huge data set, which lets them get rewarded in coins (Block reward) with the creation of a new block.

Although, Blockchain technology has tremendous potential to power the unbanked, improve trust between unknown or known parties and reduce redundancies, reconciliation activities thereby improving efficiency in any business process, the question of making more environmentally sustainable blockchains that will power the future of everything still remains unanswered.

Some of the newer Blockchain protocols that have emerged (such as Dfinity – Proof of stake, Decred – POS/POW hybrid, EOS -Delegated proof of stake etc),  in the past few years use different and more environmentally sustainable consensus algorithms that do not require vast amount of energy consumption. However, proponents of proof of work (POW) still argue and present some interesting facts about the unparalleled security POW provides.  

Let’s take a look at all of these consensus algorithms in public (permission less) and private (permissioned) blockchains, and discuss some of their pros and cons and how they affect the environment.

Before we dive into these consensus mechanisms, it’s important to understand what “Consensus” really means and why is it necessary for a blockchain to function efficiently. The term “Consensus” means having a general agreement or having everyone on the same page. Historically, for transfer of value humans have always used trusted third parties that verify transfers and settle disputes if arise. Since Blockchains are designed as systems /protocols that enable participants to create and record value (data) and execute contracts without any one party being in charge of the protocol (yet all parties being participants), consensus among all participants is required for the protocol to function and being governed (decisions about current and future development of the protocol) efficiently. For example, in Bitcoin’s blockchain, consensus (about creation of blocks that start with coins or block rewards and settlement of transactions in blocks) is reached by POW – proof of work algorithm (miners spending energy to solve complex mathematical puzzle to mine coins and start blocks, nodes verifying the transactions and keeping a copy of the entire blockchain and users transferring value to one another and thus giving their consensus that they trust the POW algorithm and being a part of it by using it to transfer value). Thus, Bitcoin’s governance decisions are made by a consensus between miners, developers and users.

Now, let’s take a look at different consensus algorithms and their pros and cons :

1. POW (Proof of work) – POW is the first blockchain consensus algorithm, which started with Bitcoin’s blockchain. As discussed above, this involves miners to solve complex mathematical problems (based on probability, finding the nonce value among a huge data set) by using computational power (hash power – higher the hash rate/power, higher the likelihood of solving the puzzle, mining blocks and getting block rewards). Many other blockchains have followed BTC and incorporated this consensus algorithm for their blockchains. Eg. Ethereum (soon will move to Proof of stake), Litecoin, Monero, Zcash etc. The creation of a new block is set to every 10 minutes by the algorithm (in Bitcoin). Once a block is created, it is verified by the network (all participants running full nodes) as it gets attached to the existing blockchain and starts recording transactions. This algorithm assumes that since miners invest a lot of capital in mining equipment and electricity to mine blocks and contribute to the existing chain, it is in their economical interest to remain honest with the system in order to be a part of the system and get rewarded for mining blocks. And longest chain of blocks that is verified by majority of the network is believed to be actual chain, which gets extended as new blocks get added.

Let’s talk about some of the most highlighted concerns with POW first as they are more popularized by mainstream media and its critics.

  • consumption of large amounts of physical resources (energy) which adversely affects the environment. It is widely reported that last year alone, bitcoin and other POW based blockchains combined consumed more energy/power than 159 individual nations including Ireland, Nigeria and Uruguay. The charts below show that if bitcoin were a country it would rank as shown below.

Source : Digiconomist.net

Source : Digiconomist.net

  • extremely inefficient as the network is slow and can not be scaled
  • and threat of centralization (participants with higher hash power have a higher likelihood of finding blocks and could be more successful in mining as a business). The chart below shows the hash rate distribution and some of the most popular bitcoin mining pools.

Source : Blockchain.info

It is quite obvious for anyone that reads and listens to mainstream media and critics of Bitcoin and POW algorithm to start wondering why does a system that consumes huge amounts of energy (harming the environment), that is prone to centralization and that is slow still exists ?

Hence, it is important to consider some of the arguments presented by proponents of bitcoin’s POW before forming an opinion on it.

Satoshi Nakamoto (the person/group that created bitcoin) designed the POW algorithm with the purpose of creating a self-sufficient system that is not dependent on any third party (centralization) when value is exchanged between participants. Hence, it was imperative that all participants remain honest and are incentivized to keep the system running. Satoshi devised a new way of reaching consensus i.e. through cryptographic hashes via consumption of energy. POW is simply the proof that energy was spent (work was done) and hence is a validation of the completion of work. Satoshi knew that a decentralized and distributed ledger could only remain immutable and transactions could only reach finality if the value was costly to produce.

Mainstream media and critics (author of site digiconomist, from where the energy consumption graphs shown above come) have made a few mistakes in calculating and estimating energy consumption of POW algorithm :

  • the energy spent is per block and not per transaction. A block has many transactions recorded in it (depending upon the block size, which in bitcoin’s case is 1 Mb and for other POW blockchains it varies). Hence, more transactions does not mean more energy consumption.
  • The arguments against POW don’t take into account some of the current features and second layer solutions (Lightning network, segwit) that do not involve transaction settlement on the base layer, making the protocol more efficient and increasing its speed significantly. Thus the assumptions about increase in number of transactions will indefinitely lead to increase in energy as all transactions will be recorded on the base layer is flawed.
  • The argument against POW doesn’t take into account the security POW algorithm provides to the network. The process of mining coins and a fair way to incentivize participants and reward them for the work they do, keeps the network secure and makes it economically infeasible for participants to act against the network.
  • They assume that more cheaper and renewable sources of energy could not be and won’t be used in POW mining, thereby preserving the security of the network without adversely affecting the environment.

Finally, Bitcoin maximalists and POW proponents argue that in order to run and maintain a network that will be seen as Digital Gold, the energy consumption is relatively extremely less as compared to other existing systems. Gold mining and recycling, paper currency production, the banking systems consumer far more energy annually than Bitcoin’s POW algorithm.

2. Proof of Stake (POS) – Unlike POW, Proof of Stake does not involve mining of coins (solving mathematical puzzle to generate blocks). POS blockchains usually use a randomized mechanism to determine who gets to produce the next block in order to include transactions. Initially coins are pre-mined and distributed among the different participants, which could be developers, early investors and users (air dropped or sold).The validators or block producers have to lock up some of their coins as stake in order to participate in block producing and validating process. As, POS does not involve burning electricity, it is considered more environmentally friendly, faster and scalable than POW. Ethereum is planning to move soon from POW to POS to achieve the scalability and speed it badly needs in order to remain the most widely adopted smart contract platform it has become. It is however important to note that even though POS looks more scalable and faster than POS, it comes at a cost – reduced security and possibility of centralization. On one hand, it is believed that if participants stake more coins, they will be incentivized to act honestly to maintain the network. On the other hand, it is important to consider that in POS, the more coins you stake, the more control you have in consensus algorithm – validating blocks and governance about development of the protocol. Hence, it could lead to centralization of power in the hands of a few participants. It is also possible that more influential participants (ones with more coins at stake) force a Hard fork of the blockchain and continue with their own version, which aligns with their incentives. Also, in case of  a Hard Fork of a POS blockchain, stakers will have their coins staked in both new chains and hence will have a say in the development of both new chains. There might be a solution to this in future, but at least this is what it seems as of now. POS validation process could also lead to a “Nothing at stake problem”. Lets understand what this means – In POW, miners burn energy (resources) in order to mine blocks (one miner can not validate 2 blocks produced simultaneously at the same time, one of the blocks being malicious), however in POS they just stake their coins and vote to validate blocks and hence a miner can use their stake to validate both blocks (correct one and malicious one) without any repercussions. In order to solve this problem and other problems related to centralization in POS algorithm, ethereum developer Vlad Zamfir introduced Casper – a new protocol amendment which will be implemented when Ethereum moves from POW to POS and this introduces punishment for validators for bad behavior (POW algorithm only rewards good behavior and doesn’t punish bad behavior). This will penalize the nodes that vote on multiple chains at the same time by slashing their staked coins. While the inventor of POW (satoshi) and other POW maximalists believe that POW is absolutely superior to any other consensus algorithm, Vitalik buterin and POS supporters believe that miners/block validators could be incentivized to act honestly and punished for bad behavior and a blockchain can still be run without compromising on security and without harming the environment.

3. Delegated Proof of Stake (DPos) –  Delegated Proof of stake is a faster and superior (debatable) version of Proof of stake. Unlike POS, where majority of participants are required to be involved in staking coins and consensus mechanism, DPos delegates the staking responsibility on only a few selected participants and thus is considered to be faster as it achieves consensus faster than POS and POW. DPos became popular with EOS blockchain. It requires participants to use their stake to vote for and select a few delegates, who are responsible for block production and validation. Just like in POS, delegates are rewarded for for creating and validating blocks from the transaction fee. Things like how many coins mean one vote, how many votes are needed to be selected as a delegate and how many delegates should there be – are all included in the design of the blockchain itself. This is more suitable for blockchains that require high throughput and can tolerate some level of centralization. Centralization, though considered as a disadvantage by the broader public blockchain community, could be mitigated by periodic voting and change of delegates. Apart from EOS, other notable examples of DPos are Tron and Bitshares.

4. PBFT (Practical Byzantine Fault Tolerant) – PBFT is more widely used in permissioned blockchains such as Hyperledger, Ripple, stellar etc. where participants are known and consensus is required among all known participants for the blockchain to functioned and governed. This type of consensus algorithm, though highly centralized as all participants are known and anonymity doesn’t exist in the system, is more environment friendly as it doesn’t require mining. It is more suitable for known businesses such as banks ( a consortium of banks that wants to use blockchain technology for cross border payments for example) or supply chain management (walmart using blockchain with all its suppliers to track where each product is coming from and its condition, when combined with IoT sensors).

5. Other Consensus algorithms–  There are several other consensus algorithms that are being used by newer blockchains. Example – Proof of Elapsed Time (randomly assigning block creation to participants based on the amount of time they have been waiting for), Proof of Capacity (miners using computational power and storage capacity to generate blocks), Direct Acrylic Graphs ( this cannot be called a blockchain as it doesn’t have blocks or chains and it requires participants who are submitting transactions to verify some previous transactions ). Although DAG’s are very promising and are also praised by Nick Szabo, they are still unproven in practice.

Forks in Blockchains (Hard and Soft)

Coming to consensus in a decentralized manner (no central authority) is a very complicated process and can lead to chaos and different groups adopting different paths. There are two kinds of forks in Blockchain protocols – Soft fork and Hard fork. People over complicate these two and do not fully understand what each means. Basically, a soft fork happens/is required when more restrictions are put on the protocol i.e. extra/more rules have to be enforced and it doesn’t require blockchain to split. A hard fork on the other hand is required when rules/restrictions are relaxed i.e. allowing certain things/rules that were not allowed before e.g. changes in block size, block reward, block time etc. (example : BTC and BCH hard fork, in which a group of developers wanted to increase the block size of BTC protocol from 1 Mb to 32 Mb and this led to a disagreement and eventual splitting/Hard fork of the blockchain).

Environmental Sustainability and what the future holds

As discussed above, consensus algorithms such as POW, that require energy to be spent in order to mine coins, adversely affect the environment. Though supporters of POW argue that the work done in order to produce blocks (mine coins) is absolutely necessary to preserve the security of the network and that POW is far superior to POS and other algorithms, which are more prone to centralization and 51% attacks. Environmental friendly consensus algorithms such as POS, DPos certainly have their benefits in scalability and speed, however their limitations (such as reduced security and high centralization as highlighted by POS supporters) are yet to be seen. Going forward, I expect developers contributing to all of these consensus algorithms mentioned above to come up with innovative solutions (such as Casper in POS) to increase performance (speed and scalability) and reduce environmental impact.