Blockchain — an insight into the technology and a survey of the popular platforms


Blockchain is the buzzword in the finance world nowadays. Traditional databases with a central authority are no longer attractive enough for users, who want to have more control and transparency in their transactions.

Some of the popular blockchain platforms in use include Ethereum, Ripple, Stellar and Hyperledger.

Understanding Blockchain

Blockchain is a public ledger of transactions. Blockchain can be visualised as an open book for all to see, which contains a record of all the exchanges and interactions (database) between users that took place through it. It consists of a peer-to-peer (P2P) network and a decentralised distributed database. This is in contrast to a centralised database that is in use presently.

The P2P network is composed of nodes, which are computers in a desktop implementation, and smartphones in case of a blockchain mobile app. In a centralised data- base, a single entity exists that controls the read and write operations to the database.

Blockchain transfers power in the hands of users, allowing all users to read, and ensuring no single user decides who can write. This all- reading property lends transparency to the transactions in the blockchain. Updating the blockchain by adding new blocks is analogous to writing to the centralised database. This addition of a new block can be done by using techniques like “proof of work” (POW) or “proof of stake” (POS) consensus mechanisms, depending upon the blockchain platform being used.

A block in a blockchain contains a record of immutable transactions. It can be seen as a page in the open book mentioned above. Any miner can update the blockchain by creating a block, so a dilemma arises on trust.

There needs to be some criterion to determine that the updated block contains the most recent transactions, since there is no central authority. This criterion in a block- chain is termed as consensus, which makes the blockchain trustless or requiring no third party trust relationship to decide which block represents the most recent transactions.

Proof of Work

POW involves solving an exceptionally difficult mathematical problem that involves expensive computations. Arriving at a solution to the problem is mainly a guessing game, but checking if the solution is correct is easy. This process is referred to as mining in the blockchain domain. Some reward is given to the first miner who arrives at a correct solution. In Ethereum mining, ethers are given as a reward.

Mining requires real world resources to solve the problem. These real world resources are computers and electricity. POW leads to a wastage of a lot of computational power and electricity, undesirable from an ecological point of view, and leading to a small exclusive set of users who are ready to do mining. This exclusivity, however, goes against the idea of having a decentralised set, leading blockchain plat- forms to employ other means of arriving at a consensus.

During mining, transactions are bundled together to form a block. A miner checks whether the transactions in a block are legitimate or not by solving POW problem. Mining, thus, achieves verification of the legitimacy of the transactions, and creation of new digital currencies given as reward to the miners. This legitimacy verification solves the double-spend problem to ensure the same amount of money is not spent twice, by verifying the time- stamp of the transactions to validate the digital currency spent originally, from any second attempt to use the same digital currency.

Proof of Stake

POS is a more just consensus mechanism than POW, as the computational resources required to accomplish such mining or validation can be done through any computer. POS requires the miner or the validator to lock a certain amount of his coins in the currency of the blockchain platform, for verifying the block. This locked amount of coins is called a stake.

If, for example, a validator in Ethereum has a stake of 4%, then he can mine 4% of the transactions across Ethereum. Computational power is then required to verify whether a validator owns a certain percentage of the coins in the available currency or not.

There are several proposals for POS. POS rewards the validators too. In the POS used in Ethereum, the amount of coins lost in penalty, or from the stake if a block by a validator is not included in the blockchain, is equal to the reward. Validators are rewarded with new coins, which are often generated by inflating the coin supply. Most POS proposals set a target interest rate, which the validators can expect to earn by staking their coins.

POS enables a better decentralised set, takes the power out of the hands of a small exclusive groups of miners, and distributes the work evenly across the blockchain. In POS, the probability of mining the block is proportional to the miner’s stake just as in POW, it is proportional to the computational hashing power.

The POS protocol chooses a vali- dator randomly based on the stake. As long as a validator is mining, his stake is no longer available for him to use. He can use his locked coins by withdrawing from participating in mining. A downside of this kind of mining is that the richest validators are given the easiest puzzle to solve, but the mechanism encourages more community participation.

User Social Network

A user’s social network is used in Ripple and Stellar consensus protocols. The Ripple protocol, for example, requires a node to define a unique node list (UNL), which contains a list of other Ripple nodes that the defining node is confident would not work against it.

A node consults other nodes in its UNL to achieve consensus. Consensus happens in multiple rounds with a node declaring a set of transactions in a “candidate set”, which is sent to other nodes in the UNL. Nodes in the UNL validate the transactions, vote on them and broadcasts the votes. The initiating node then refines the “candidate set” based on the votes received to include the transactions, getting the largest number of votes for the next round. This continues until a “candidate set” receives 80% votes from all the nodes in the UNL, and then it becomes a valid block in the Ripple blockchain.

The next round starts with new transactions and pending transactions from the last round. Consensus in the entire network is reached when each sub-network form of nodes in the UNL of each node reaches consensus.

Some consensus protocols use traditional Byzantine Fault Tolerance (BFT) theory. BFT is a characteristic of a system that tolerates the class of failures known as Byzantine Generals’ Problem.

This problem consists of a scenario of a group of Byzantine generals, whose divisions surround an enemy camp. The generals observe the enemy and must reach a consensus whether to attack or not. They communicate with each other through messages. If all attack, they win. If none attacks, then they can fight another day. However, if only some generals attack, then all will die.

The problem here is that some generals are traitors and they send wrong messages so that the loyal generals cannot reach a consensus. To achieve tolerance of “m” such traitors and still reach consensus, “3m+1” generals need to exist. Working this out, it is not possible to achieve consensus, if the total number of generals is three and one is a traitor.

The same thing, when applied to the blockchain environment, ensures that the network will be of BFT, achieving consensus, despite malicious behaviour of “m” nodes in a total of “3m+1” nodes. The total number of nodes that form the P2P network has to be greater, or equal to four.

  • Nida Khan, developer of two pioneering Islamic financial technology tools, is currently pursuing an industrial doctorate degree at University of Luxembourg. The views expressed are of the writer and do not necessarily reflect the stand of the newspaper’s owners and editorial board.