Blockchain

Introduction to Blockchain

Blockchain Technology

Amidst the global financial meltdown in second half of 2008, research paper “Bitcoin: A peer to peer electronic cash system” by Satoshi Nakamoto was published. It spoke about an online system, for direct payment from one party to another without an intermediary, such as banks, etc. Timing couldn’t have been better for release of this paper. However, it was not spontaneous response to people’s loss of trust in banking system, during that phase.

For Audio-visual experience click the YouTube link

Big Picture

Launch of Bitcoin and other such digital currencies, has disrupted financial markets, with billions of dollars chasing these currencies. However, at the core of this Fintech Disruption was, emergence of “Tamperproof decentralized cryptographic blockchain computing technology, to facilitate intermediary-less transactions in not so trusted economic, social & political ecosystems”.

After a surge in the combined market value of Cryptocurrencies, from less than $20bn to more than $540bn, the phenomenon — and the blockchain technology that underpins it — has become impossible for the businesses, especially from financial world to ignore, despite its denunciations of bitcoin in particular as “a fraud”, “index of money-laundering” and worse.

Watch on Amazon Prime
Watch Amazon Prime

Blockchain technology, initially considered very slow but extremely safe, is coming of age with newer iterations offering not just speed of transactions but, modularity and portability. Last couple of years blockchain has attained lot of traction, in terms of use cases in financial sector, where 100+ large institutions are working on adoption. Large no of technology companies are focussed on IoT space. Some of them are working on fusion of blockchain technology, with IoT to eliminate security risks. Blockchain is also being piloted in other areas like Real Estate, Supply Chain Management. Credit Suisse’s report suggest that by 2025 Blockchain will be fully matured technology. So also others, believe that Blockchain is going to play important role in future of computing !

Imagine millions of people in a secured peer to peer network, where anyone can interact/ transact with any one, without any controlling authority.

Market Overview

For Audio Visual experience of this section, please click the YouTube link

Marketcap of Cryptocurrencies has soared to 100s of billion of dollars. Along with that, market potential for Blockchain Technology has soared, which underpins these cryptocurrencies. Paradigm shift towards highly secured decentralized computing is changing fortunes of blockchain technology. Royal Bank of Canada Analyst believes Cryptocurrencies, blockchain and decentralized computing to be $10 trillion ecosystem. It will include IT hardware, which is currently pegged at $ 4.5 Billion. It will also include energy resources for mining the cryptocurrencies, cloud services, IT services for migration of existing systems on to blockchain. The ecosystem will include inter-bank payment systems, cross border remittances, clearing & settlements in financial markets. On the governance front, it will include public service records, real estate records, healthcare records and national ID systems. Other part of the ecosystem will be the digital media, IoT integrations, IT security & services, etc.

Blockchain Market

Most of the under implementation projects, are shaping up in collaboration among the industry players and open source community. Hence, economic value of these activities can’t be quantified. However, by 2024 global blockchain market is expected to be $ 16 Billion. Upon reaching critical mass, deployment of blockchain will increase exponentially, translating in increase in demand for commercial IT services in blockchain space. With deployment of blockchain, Indirect cost of financial institutions will reduce drastically and consumers will benefit from reduced fees for financial transactions.

Blockchain Technology

For Audio-visual experience click YouTube link above

Blockchain (a subset of Distributed Ledger Technology) is a data ledger, forged with consensus, secured by cryptography, distributed over a trusted/ trustless network of P2P, unwired/ wired, nodes over intranet / internet, which can be configured to be public or private.

It constitutes data blocks in chronological & irreversible sequence, each containing set of transactions, bundled together and added at the same time. The block is formed, upon consensus among the designated nodes, about the validity of transactions contained in it. Each block contains fixed no. of transactions along with cryptographic code and reference to previous block and time stamp. These transactions are immutable i.e. they can’t be modified or deleted.

First block of the Blockchain is called Genesis block. As seen in the figure, each block contains following:

  • Set of transactions, executed at the same time
  • Merkel tree root for transactions within the block
  • Hash of previous transaction
  • Consensus Nonce (number used once)

Blockchain DLT has primarily two types of actors. First is human, who is a seller/buyer of crypto-currency or some asset using application running on Blockchain. He creates transactions for Blockchain. Second could be human or node, who validates the transaction, builds new blocks, signs them with cryptographic codes and publish in block chain. Such validating nodes arrive at consensus based on algorithms followed in respective architectures.

Merkel tree root is a binary hash tree, a tamper proof mechanism, used to store hashes of the individual data in the block, which facilitates verification of data.

In Blockchain each block contains hash of previous block, except Genesis block. Each block gets appended to the Blockchain by linking with hash of previous block. If a block is required to be changed, then each preceding block also requires to be modified, which makes blockchain immutable.

Nonce is a 32 bit arbitrary no. used for mining process in Bitcoin, using game theory and complex algorithms.

Blockchain is in essence a distributed consensus i.e. a way of agreeing on the state of database.

Blockchain DLT

For Audio Visual Experience of this section, click Youtube link

Before diving into Ledger systems, let us quickly understand General Ledger (being used since 15 century). It is governed by three accounting principles – First, Debit the receiver, credit the giver; Second, Debit loss and expense, Credit profit and gain and Third, Debit inflow and credit outflow. These principles are inviolable.

Centralized Ledger System

 In Conventional ledger system, having intermediaries, if Lucy wants to send $10 to Bob, she sends request to the bank. Bank checks the authenticity and balance of Lucy’s account and accepts the transaction for processing. After that, through central intermediary, bank checks credentials of Bob and transfers fund to Bob. In the process, it charges transaction fees. Finally, bank creates ledger entry, with both sides of transactions and fees. Both the parties will get reflection of this central ledger into their ledger. In these transactions intermediaries have complete control over transactions.

Distributed Ledger Technology

Blockchain Distributed ledger Technology, consists of blockchain,    smart contracts and consensus logic. Ledgers are distributed among users of network. In this case, when Lucy transfers funds to Bob, this transaction is broadcasted on the network for validation. The transaction is validated through a consensus mechanism. Different DLTs will have different consensus mechanisms. This write only, time stamped & immutable record is appended in the block chain as  a new block. This transaction has cryptographic key and reference to previous block, making it a chain of blocks. This block gets registered to the ledger of all the users in the network, so everyone has same copy of ledger.

Blockchain has come long way in last 12 years. From public Blockchains, underpinning Bitcoin, Ethereum, etc. to Federated or Consortium Blockchains like R3 & Corda, which are adopted by banks, energy, insurance sectors to Private Blockchains e.g.  Multi-chain, etc, In the last four years, with the advent of Hyperledger project, governed by Linux Foundation, few more iterations of Open Source DLTs are available for corporations to adopt, tune up and deploy. 

Distributed Ledger Technology

In DDBMS, data is not stored centrally on a server, rather it is distributed over few servers, PCs or cloud. There are many examples, Hadoop,  No SQL, Peer Network Node data stores, Distributed SQL, etc. These are architectures widely used by likes of Facebook, Google, Amazon. After launch of Bitcoin, Distributed Ledger Technology came in light, though it was discussed in some research papers, during 1990s. People may say DLT is an extension of DDBMS.

Distributed Ledger Technology

Distributed Ledger Technology (DLT) is transactional type of DDBMS. DLT deploys time stamping which is used for a while in many DBMSs. Time stamp based concurrency/ ordering control algorithm ensures time linked sequencing of transactions. It endorses immutability of transactions, which is already used by Google HDFS, etc. It incorporates consensus mechanism for validation of transactions in the network, the same is used outside DLT space in Raft & Paxos.

For Audio Visual Experience of this section, click YouTube link

However, DLT has a leverage of Cryptography over DDBMS. Its true decentralized read/write network, that doesn’t have parallels. Along with that ability of DLT to secure transactions, using host of protocols, sets it apart from all the conventional ones. Smart Contract are integral part of DLT, they add capabilities of building business logic and business processes, which can facilitate automation of transactions, based on predefined conditions. These technologies, encapsulated in DLT, forge trust among not so trusted users.

There are two users in DLT – Transactional users & miners/ blockchain operator/ blockchain generators, these users operate DLT through processes in following sequence – Network discovery, Transaction creation (including asset creation & developing smart contracts, Block generation & submission (Mining and consensus process) and Block validation.

Broadly DLT data model constitutes 3 components – transaction, block and block header. Together they capture the state of ledger.  Block and Block Header are standard and essential to every Blockchain platform. Block contains transactions. The block’s metadata is kept in the Block Header, consisting of hash, previous hash, markel tree, nonce.

Language of transaction consists of methodology for registering ledger services, testing deployed ledgers, reference implementation for storing on-chain configuration settings, Handling on-chain permissions for users and identity management, as a whole.

Every other Blockchain DLT uses different protocol for consensus management e.g. Proof of work (PoW), Proof of elapsed time (PoET), Proof of Stake (PoS). The selection is based on business applications.

Distributed Database v/s Distributed Ledger

Over last fifty years, information technology has come long way. From days of card readers, mainframes with enterprise applications and centralized database, dumb terminals for access to information, rise of PCs & Servers, relational database, Intranet, Client-Server applications, Internet, Cloud computing, global data access, social networking to current transition from centralized computing to decentralized architectures and systems.

Distributed database & distributed ledger terminologies are getting entwined over last few years. Some people question, what’s new in distributed ledger technology, we had distributed database for long?

Distributed Database

In Distributed Database (DDBMS), entire data is not stored on single server or CPU. It is stored across network, even it can be configured to use cloud storages solutions.  This network is essentially under control of an organization or group, which utilizes this data. Multiple nodes within this network have partition or complete dataset or full replicas of dataset, stored on them. They freely share and seek information with users. Each node is trusted by others for the data being shared. They also offer a consistent view to external users, through strict access control. They validate the external information received for use or processing. It is network of “Trust” that is bonding these terminals, within a homogenous group. The network architecture and workflow environment is controlled by administrator.

“Distributed ledgers – or decentralized databases – are systems that enable parties, who don’t fully trust each other to form and maintain consensus about the existence, status and evolution of a set of shared facts”… Richard Gendal Brown, R3  
Distributed ledgers

In Distributed ledger, it is network of nodes, spread across geographies, organizations and users, which don’t necessarily trust each other. However, outcome is same- consistent data, shared within network. The data stored in immutable, i.e. it can’t be modified or deleted. This is achieved with the use of complex algorithms and cryptography to offer decentralized concurrent control mechanism to secure consensus about the existence and status of shared information in trustless network. In this technology control of read-write is truly distributed. Ability to maintain data security over trustless network is X-factor of Distributed Ledger Technology. Many DLTs, underpinning crypto-currencies e.g. Bitcoin, Ethereum, etc. share data in public networks, which can be seen by anyone. However, Hyperledger, R3-Corda, etc. share data, in controlled private network environment. 

In nutshell, nodes of a distributed database trust each other and collaborate with each other to present a consistent, secure data.   By contrast nodes within network of distributed ledger technology, don’t trust each other. They independently verify data they receive from each other and only share data they are happy to be broadly shared.

Smart Contracts

In 1996, Nick Szabo proposed an idea of Smart Contracts, in the context of IT. He described a smart contract as “a set of promises, specified in digital form, including protocols, within which the parties perform on these promises.”  These contracts would be executed between two entities, be individual or enterprise. These will work on flow chart control principles, e.g. if-then, do-while, etc. It was around the time, when internet had started blossoming. Over the years internet exploded with billions connected through it. But, what could have been a great bonding among them, “the smart contract”, went into oblivion; Until emergence of blockchain based distributed ledger technology.

Blockchain smart contract

It is a conditional contract, which will get executed digitally, upon trigger of predefined set of conditions. Output of every smart contract, can be verified objectively. Hence, they are language of transactions to automate transactions which are repetitive or conditional in nature. Ethereum, Hyperledger and few other block chains incorporate smart contracts. Consider a normal business situation, A company buys machine from B company. After testing the machine, company A initiates the procedure of   payment to company B. It involves

processing delays, which costs company B. If Smart Contracts are implemented in their value chain. The positive test report of the machine will trigger payment for company B, by virtue of the programs defined for such scenarios. This will be game changer in commerce in terms of avoidance of delays and in turn cost saving. Implementation of smart contracts would improve business confidence and trust among companies. 

Consensus Algorithm

In Blockchain based DL technology, data is distributed over lot of nodes and for effective functioning of the DL, all the nodes should have identical data. It is achieved by consensus, which is a process of agreement among all the nodes, about the correct state of data. It is a complex algorithm, which results in, all nodes sharing same data set and protects blockchain against malicious actors. Every different flavor of blockchain DLT, has its own Consensus Algorithm.

“Proof-of-work (PoW) is the outcome of a successful mining process and, although the proof is hard to create, [it] is easy to verify.”…. Kudelski Security Report
Consensus Algorithm

Bitcoin blockchain uses “Proof of Work” algorithm. In this blockchain there are two types of actors, first who transact i.e. they buy/sell Bitcoins, second are “Miners”, who certify the transactions and add them in the blockchain. These miners solve complex mathematical puzzle, based on game theory, which is called mining. Upon mining, they are rewarded with Bitcoins. This is a tamper proof process wherein, to manipulate blockchain, malicious actor has to collude with more than 51% of miners, spread across world. PoW consumes extremely high electricity power in mining process, since it takes long time to solve the mathematical challenge, with high configuration nodes.

Proof of Stake was designed for Ethereum networks. It has Validators, who validate transactions. They don’t have to go through resource hungry mining process. Nodes are randomly selected and selection depends on stake of the node in network vis-a-vis other node. Node with higher stake has high probability for selection. Here too, Validators are rewarded with coins, which are already in the system.  

Broadly in Permissioned networks algorithms are lottery-based or voting based algorithms. Lottery based can scale higher with moderate finality; Whereas, voting-based algorithms provide low-latency finality. Hyperledger Sawtooth uses Proof of Elapsed Time algorithm. It is a random lottery system, on first come first serve basis, rather than a mining process of solving cryptographic puzzle. Validators are given random wait time, leader with shortest wait time creates new block.

SBFT and PBFT are focused on this byzantine fault tolerance, in a Permissioned network scenario. A designated validator, selected from network, bundles proposed transactions and forms a new block. Consensus is achieved by satisfying 2F + 1 formula to certify new block, i.e. in a network of 7 nodes where 2 nodes are faulty, remaining 5 must reach consensus. The speed reduces as the size of network increases.

Proof-of-Authority (PoA) is used for Permissioned ledgers. Designated nodes within the network are ‘authorities’, which are tasked to create new blocks and secure the ledger. In PoA algorithm majority of authorities are required to arrive at consensus, in order for a block to be created.

Consensus Algorithm is designed and adopted, depending on the type of blockchain (Permissioned or Permissionless), target audience/ market of the blockchain, scalability- finality trade off.

Types of Blockchains

Blockchain can be broadly categorized based on access to it. First, for public access, called Permissionless, which can be joined or viewed by anyone across the world. The other being for private access only.  Which requires authentication of user credentials and subsequent permission to access the blockchain. It is called Permissioned blockchain.

Selection of blockchain depends on use case, i.e. particular application under consideration. Example, If a startup decides to launch a platform for Buying/ Selling of used goods, it will adopt a Permissionless blockchain. In this application two transacting parties can build transaction, based on the trust of transparency, offered by the platform. Similarly, crypto currencies or Initial Coin Offerings can be launched on Permissionless blockchain. In this blockchain, people can view every block of transaction, right from Genesis block, however users will be anonymous.

However, if a corporation goes for blockchain in supply chain management, its choice would be Permissioned blockchain, which will be deployed across value chain, spread across multiple organizations, be them vendors or clients. Each organization in that blockchain would have at least one designated authorizer. This will be a true enterprise application of blockchain DLT, where the shipment can be seamlessly tracked at each stage.

The following table explores the differences between permissionless blockchains and Permissioned distributed ledgers. These parameters will help organizations in selection of right blockchain DLT for their applications.

Types of blockchains

. Blockchain Landscape

Bitcoin had a humble beginning with almost a decade in existence and ever since, development has taken place in the blockchain technology, underpinning Cryptocurrency and a big time. It has emerged as a computing system of highly secured open distributed ledgers, having a potential of disrupting transactional ecosystems across economic, social & political arenas. This development can be tracked in following contexts:

  • Emergence of public blockchains for cryptocurrencies with mining process
  • Integration of smart contracts and faster blockchains
  • Development of Private blockchains with interoperability & modularity between various frameworks of blockchains,  auxiliary software used for deployment and maintenance of blockchains, examining the data on the ledgers, as well as tools to design, prototype, and extend blockchain networks,  APIs to facilitate communication between various layers and user applications.
  • Development of Consensus algorithms

Blockchain developed traction steadfastly between 2009 to 2017, from being a secured but slow public distributed ledger system underpinning bitcoin, to fast, scalable & modular blockchain with wide iterations intended to suit unique needs of businesses, e.g. choice of permissionless or Permissioned, smart contract to automate transactions and interfacing to match current technology trends. These advancements in blockchain technology resulted in diversity in blockchain arena, with wide option of iterations with unique features to suit business requirements. Companies like Intel, IBM developed their versions of blockchain and offered to Linux Foundation for taking in forward in open source arena. With more than 100 companies like there collaborating in Hyperledger project, another  100+ financial institutions  working together on R3 and few hundred on Ethereum.

There has been a lot of activity on Github, which is the largest software collaboration platform in the world, with 68 million projects and 24 million participants. That makes it barometer for gauging software development activities, across spectrum of IT & across geographies. In the specific case of blockchain, it provides details about people and organizations behind blockchain development, type of programming, talent pool & its concentration, structure of networks and communities in blockchain, risk factors of deploying resources in blockchain, etc.

After the “Code Drop” of Bitcoin blockchain in April of 2009, activities grew steadily for first few years, with projects growing upto 86,000. However, initial pace of projects, till 2012 was very low till 2012. But, after 2012, it rose exponentially with 2016 with 27000 projects. It averages to approx 8600 projects, per year. Following are few highlights about blockchain activities on Github (as on 12, October, 2017 | Source : Delloite report)

  • Total no. of projects – 86034
  • Projects by companies, research institutes & startups – 9375+
  • Average projects, per year – 8603
  • Highest no. of projects in a year – 26885 in 2016
  • Only 8% projects are maintained
  • Average project life 1.22 years

As seen above, almost 89% projects were created by individual developers and organizational interest was just about 11%. However, less than 10% projects are maintained and updated (i.e. once in 6 months) with average life of just over 1 year. Initially the developer community engaged in Blockchain projects were mainly new technology enthusiasts, but over a period developer community has increased steadfastly, but not as much as required. Currently major developers are concentrated in USA, UK and surprisingly China, as against expectation in Israel or India.

In terms of programming language association is concerned, needless to mention that C++ has highest association. Slowly over last couple of years, developers have started getting associated with Go language ( launched by Google in 2009). It is now second largest language used for blockchain projects on Github, people have started taking note of its simple language and scalability. Clearly for integration of other technologies with blockchain is concerned, Go appears to be highest preference of developer community.

If we consider statistics about developer community (source : Evans Data Corporation), out of 21 million estimated developers, 9 million are Java Developers (largest pool) and 4.4 million C++ developers, with Go far distant from these languages. In spite of Java being the largest developer community, there is no platform for Java developers to synchronize with blockchain. A development of this front will help Blockchain reach critical mass, for wider acceptance.

Let us discuss some of the popular iterations of blockchains.

Bitcoin blockchain, which first started in Jan, 2009, enables direct transaction between two parties, without need of a trusted intermediary e.g. banks, etc. This is write only, irreversible transaction, appended at the end of a blockchain. This results in economic benefits to the parties e.g. reduced transaction fees, reduced credit cost for micro transactions, prevents double spending. Above all, it supports a crypto-currency.

Ethereum is open source DLT, with smart contracts, which are programs for automation of conditional transactions. This block chain oriented platform has a decentralized virtual machine called the Ethereum Virtual Machine (EVM), which carries out Turing-complete (computationally universal) smart contracts over network spread across the world. It supports native cryptocurrency, Ether. Open source Ethereum platform and EVM can be used for developing decentralized applications, using power of smart contracts. With this platform, launching Cryptocurrency has become very easy.

Ripple, an open source, public DLT platform with a native crypto-currency, XRP, was first issued in 2012 with The Ripple Transaction Protocol (RTXP), which facilitates free, instant transaction across the world without any chargeback. This protocol supports transaction of any currency, commodity or any asset. Lot of financial institutions are using this infrastructure for their operations.

Hyperledger, governed by Linux Foundation, since 2015, is again an open source project, mostly working on iterations for Permissioned DLTs, meant for private implementation of blockchain. It is supported by tech giants such as IBM, Intel, etc. They have few blockchain frameworks, under development such as Indy, Burrow, Iroha, Sawtooth and Fabric supported by tools such as Explorer, Composer and Cello for implementation and monitoring.  These frameworks support enterprise applications & identity management, which are useful for deployment of blockchain for  international trade, supply chain management.

Corda by R3 is open source DLT, which supports consortium or federated type of blockchain. It is controlled within a group of organizations. It is faster and offers secured environment for transactions. R3 was created by consortium of over 100 financial institutions, designed to record, manage & automate legal transactions between organizations. It offers security  while achieving scalability and speed.

Quorum is Permissioned flavor of Ethereum blockchain, designed by J P Morgan, offers data visibility, on need to know basis, using voting based consensus mechanism. Chain Core is an enterprise Permissioned blockchain, mostly focused on financial services, e.g. currencies, securities, derivatives, gift cards and loyalty points. The company partners with clients to launch and operate a network under the client’s brand.

Steller Network is unique blockchain with Lumen as native currency. It offers public blockchain and currency exchange services at fractional cost, which is USP. Validating nodes are called “Stellar Core”, which anyone can install, to be part of stellar network. These nodes validate transactions using stellar consensus protocol. Every transaction has small fees, which prevents malicious actors from spamming the network. It has best use case in currency exchange. Apart from base account, there are other entries which can be added e.g. Trust-line, offers and data. These add-ins allow account controller to have credit lines, offer entries and relevant data to their accounts. Smart contract layer can be used to automate transactions on those lines. Typical transaction record time is 5-10 seconds. Integrated Horizon API server offers RESTful API to allow client applications with steller network. It has SDKs for Java, JavaScript, Go, Python, C#, etc. It also has libraries for Java, Java Script & Go. This platform offers complete solution to build wallets, banking applications, payment systems and currency exchanges.

IOTA is a unique crypto currency with M2M blockless blockchain technology, Offering machine-to-machine (M2M) connectivity for devices participating in Internet of things. It is a Cryptocurrency on a platform, which entails generalization of the blockchain protocol (the technology called Tangle) that sits at the backend of the IOTA platform. Instead of paying miners to validate the transactions, the architecture of the network involves peer-based validation. This allows the platform to be completely free of cost, without facing the scaling challenges that are inherent in the first generation of blockchains. Use of this platform for IoT, makes it true end-to-end solution blockchain solution for businesses. It enables businesses to explore new business-to-business models by making every technological resource, a potential service to be traded in an open market in real time, with no fees.

6 thoughts on “Introduction to Blockchain

Leave a Reply

Your email address will not be published. Required fields are marked *