Introduction to consensus algorithms
The value of Blockchain technology comes from the distributed security of the system. The distributed system relies on underlying protocols to keep the blockchain functional. One such protocol is the consensus algorithm.
Blockchain users need to agree on the validity of the chain before adding more blocks. Every time a node adds a new block, all the users have to validate the block by using a common protocol. Typically, the nodes reach a consensus about the correctness of a new block by Proof of Work or Proof of Stake methods. The nodes check that the new block meets the requisites of their Proof method, including validation for all the transactions inside the block. If the block is valid, they consider it as a part of the Blockchain and keep adding new blocks.
Objectives of consensus algorithms
Consensus algorithms are a decision-making process for a group with some particular objectives, such as:
- Coming to an agreement: The mechanism gathers all the agreements from the group as much as it can.
- Collaboration: Every one of the group aims toward a better agreement that results in the groups’ interests as a whole.
- Co-operation: Every individual will work as a team and put their own interests aside.
- Equal Rights: Every single participant has the same value in voting. This means that every person’s vote is important.
- Participation: Everyone inside the network needs to participate in the voting. No one will be left out or can stay out without a vote.
- Activity: every member of the group is equally active. There is no one with more responsibility in the group.
The lack of trust inherent in the blockchain system is particularly noteworthy to our topic of ‘consensus’. Because any entity, individual, or party can submit information to the blockchain (that is to say, try to add information to the database), it is necessary for the distributed operators of the blockchain to evaluate and agree on all addenda before they are permanently incorporated into the blockchain (the database). Because we cannot be sure of the author’s trustworthiness, it is vital that all new information must be reviewed and confirmed before being accepted.
Different protocols use different methods for consensus. The common protocols are Proof-of-Work and Proof-of-Stake. In a Proof-of-Work, a ‘hash function’ is used to create conditions under which a single participant is permitted to announce their conclusions about the submitted information, and those conclusions can then be independently verified by all other system participants.
These Blockchain consensus models are just a way to reach an agreement. However, there can’t be any decentralised system without common consensus algorithms. In decentralised systems, it does not matter whether the nodes trust each other or not. All nodes will simply have to go by certain principles and reach a collective agreement. The trust will be in the system as opposed to the other nodes and their intentions.
Considering the above, a blockchain is simply a file, which is updated by a process among computer nodes. Consensus algorithms are a process to validate a block and complete the processing of a transaction. Recall that any blockchain technology does the following: it will allow connected computers to reach agreement over shared data. It is from this angle of clearing and validating transactions that blockchain is likened to automated clearing houses. However, blockchains are decentralised and therefore provide alternative benefits from the centralised clearing houses.
In and of itself, consensus is not an absolute must in every matter in Shariah. Shariah principles allow for valid differences of opinion, different reasonings and approaches. The Shariah encourages harmony and cordialness irrespective of the views of people. However, in the context of blockchain, consensus is generally about agreeing to a true or false proposition on the occurrence of an event. The consensus is not on subjective views and thoughts.
When reviewing a consensus algorithm from the lens of Shariah compliance, there are two levels which need reviewing:
- The micro-level review should focus on the process of an algorithm, transaction fees, distribution of rewards, nodes’ rights, nodes’ input and the overall terms and conditions if any of the protocol.
A process can be developed in a non-Shariah compliant way wherein one party is unjustly disadvantaged, or the process is ambiguous and creates discord. Likewise, fees can be unwarranted, unfair or unjustified. Fees can also be structured in a Shariah non-compliant manner. Rewards in a system can potentially be distributed in a Shariah non-compliant manner and can lead to a gambling scenario. The rewards’ distribution mechanism must be analysed to ensure a gambling scenario has not been orchestrated. Further, the rights of participants in any system can be constructed in various ways. Shariah has principles to ensure that any participant in any system is not taken advantage of and nor are they treated unfairly. Thus, the rights of nodes need to be reviewed to ensure they align with the Shariah principles of justice and fairness. Finally, if any blockchain or consensus protocol has specific terms, those terms must be analysed to ensure that no Shariah right is infringed or breached.
- The macro-level review should focus on what this particular consensus algorithm is validating and what the blockchain is serving, what it is keeping a record of and facilitating. The macro-level review ensures that the processing endeavours of nodes is not actively facilitating Shariah non-compliant activities. This is vital because even though the micro-level requirements might be structured in a compliant manner, the overall output or consequence of a consensus can lead to the birth of a non-compliant activity or service.
Consensus algorithms are an exciting digital software that give rise to a new method to validate and process data. These protocols are what makes blockchain unique. However, every process has the potential to be structured in various ways. From an Islamic perspective, an investor, user and beneficiary need to ensure that the process they are involved in is aligned with Shariah principles.
 Hammerschmidt, C. 2017. Consensus in Blockchain Systems. In Short.