A blockchain is a kind of distributed ledger with added features. Not all Distributed ledgers use blockchain for ledger maintenance. Neither all blockchains use Distributed Ledger Technology as a base. The other family of Blockchain solutions uses a Directed Acyclic Graph Model instead of DLT. Blockchain is a layer that gets knitted over DLT. Here we deal with DLT based Blockchain Platforms. A distributed ledger is shared, synchronized, replicated, consensus-driven, maintained at computer systems which are connected over a network but geographically apart. Blockchain uses a distributed ledger as the base, but this ledger is chained as blocks in append-only mode. Blocks are cryptographically hashed. The consensus protocol for blockchain applications may differ as demanded by the application.
Blockchain solutions either improve the existing businesses or unlock new businesses. The use-cases for blockchain are mushrooming every day. BCT removes friction and has paved a new way of doing business in healthcare, finance, real estate, global payments, supply chain management, G2C services, B2B services, Rights and royalty management, and the election voting of democratic governments.
Smart Contracts for Digital asset Exchange, Copyright and intellectual property protection finance, Digital Identity Compliance and management is much more reliable and secured with blockchain engine.
Smart Supply Chain Solutions, IoT applications, manufacturing with Blockchain solutions radically improve the processes in these organizations and zoom the bottom line of these businesses.
G2C (Government to Citizen) services using blockchain enhances the quality of service, transparency, and reliable data access.
In financial services, blockchain solutions redefine activities like back end operations, clearing, settlement, cross-border transactions, stock market operations, etc.
In healthcare, Smart Contracts enable automatic verification and updation of records, reducing pen-paper processes. With optimized services, patients get the best care possible. Blockchain based smart contracts enhance customer service to the next level by providing data sharing among the insurance companies, healthcare systems, motor vehicle services, etc. Insurance claims and migration across different service providers become more transparent with no loss of benefits to the insured.
BCT-IoT enabled smart Life is an assured and secured service in the connected world.
The music and art industry is excited about better-managed ownership management, royalty compliance, and first use policy with increased revenue to the artists.
Real estate transactions have become the most benefitted with transparency enablement of Blockchain. The real estate assets are digitalized with smart tokens to enable blockchain transactions. The ownership of assets becomes crystal clear.
Cryptocurrency mining and trading, Digital Wallets are the early use-cases of Blockchain. Cryptocurrency is legitimately getting accepted by most of the e-commerce platforms. Dapps (Decentralized Apps) are becoming popular. Samsung is releasing blockchain apps in its Galaxy smartphone.
Table 12.1 details the uses cases of Blockchain applications and figure 12.1 is an alternate representation of BCT solutions.
Table 12.1 Use-cases of BCT
|Application||Applicability||Benefit of using BCT|
|Smart Contracts||Any digital asset of value||a market place for Transparent, reliable, third party free transactions|
|Voting Systems||Citizenship identification||Avoiding manipulation of votes in Democracy|
|Digital Identity||Driving licences, Passport, Voter Identity, Citizenship cards||Reducing counterfeit fake identities|
|IoT||Smart vehicle, Smart city, Smart traffic||Smart data into transactional applications|
|Banking||Currencies, loans transactions, monetary tools, multiparty transactions||Secure and Safe Transactions|
|Manufacturing||The chronology of a product and parts that go into making the product like automobiles with their procurement and batch details||Health of the product and service|
|Supply chain||Stocks management, Truck movement||logistics tracking etc|
|Healthcare||Patient health records, treatment records||Automation with improved confidentiality|
|Publishing||Patents, copyrights, digital rights, trademarks, Intellectual Property Rights, Research Publications etc||Ownership authentication and identification.|
|App Development||Version management and uploads in Playstores||Valid Ownership tracking and holding|
|Shares and Metals trading||Ownership change||Authentication and secured trading history|
|Private documents||Personal certificates, Property documents, Notary documents, etc.||Valid proof of ownership|
Enterprises require the support of technology for developing solutions, managing solutions and maintaining the same. "No one Blockchain for all" is the industry status. Many players provide architectural and technological support for building Blockchain applications. Ethereum, Ripple, Hyperledger, R3- Corda, Multichain, ERIS, etc are few to be named here as enablers of Blockchain application development.
As we know BCT is not a single technology. The choice is required for the components of BCT like DLT, Cryptography, Membership service, Ordering service, Access management, Identity management, Blockchain services, Consensus Protocols etc. Also, a solution has to coexist and interact with cross platforms. Typically every BCT solutions will have the architectural components as described in figure 12.2. Here we introduce the technological support provided by Hyperledger, Ethereum and R3-Corda for business applications development. Ripple is a cross border financial settlement provider and works across various sovereign and cryptocurrencies. We leave Ripple learning as an exercise to the reader.
Hyperledger is cross-industry collaborative efforts headed by Linux Foundations to identify and develop features that are essentially required for DLT- blockchain business application solutions. Hyperledger is Opensource and Open standards DLT based Blockchain solution development platform providing cost efficiency, speed and transparency for business transactions. There are more than 100 members from cross-industry like Information Technology, Banking, Insurance, Supply chain, Retail, Finance, Virtualisation, Manufacturing, Internet of Things, etc. These members help define the system and tools requirement, as the industry steers with BCT solutions. Figure 12.3 details the various services, events and Interfaces provided by Hyperledger Fabric. Hyperledger is called fabric because it offers a wide variety of plug-ins.
- An enterprise grade DLT based blockchain platform for non Cryptocurrency business applications
- Configurable and modular architecture – Pluggable Consensus protocol, Pluggable identity management protocol, Pluggable Key management protocol, configurable cryptographic libraries,
- Versatile to enable building BCT solutions for a variety of use-cases
- Permissioned Peer to Peer DLT platform
- Pluggable consensus protocols
- Smart Contract called "Chaincode" is the business logic of blockchain application. Chaincode follows "execute-order–validate" architecture. Hence it is deterministic ensuring finality of transactions. Chaincode is written in Go, Java or Node.js.
- Highly scalable system
- Supports multiple DBMS for ledger maintenance
- Critical Enterprise characteristics are met:
- Participants identifiable
- Permissioned Network
- High Transaction thruput
- Low latency for transaction confirmation
- Privacy and confidentiality of both transactions and data
Ethereum is a DLT based blockchain for both cryptocurrency and Smart Contracts. Ethereum is an Open Source platform for Blockchain. ETH, ETC are the tokens of Ethereum and Ethereum classic respectively. Like Bitcoin client, Ehtereum client can be installed on any computer that is connected to the Internet and thereby can become a member of the Ethereum network.
Smart Contract code is run Ethereum Virtual machine (EVM) and is written in a language called Solidity. Solidity is more similar to Java. Serpent and LLL (Lisp Like Language ) were also used for coding in the early EVMs. Ethereum Client code is Open Source. Hence one can tweak to his requirement. It is, for this reason, Ethereum has gained popularity for Smart Contract, Decentralized Autonomous Organization (DAO) – a smart contract for Venture Capital Crowdfunding and Initial Coin Offering (ICO). Etheruem architecture is very fast that a transaction takes only 15 secs as against 15 min in Bitcoin.
Ethereum works on the principle of Singleton state machine with shared state. It is a Transaction based state machine. With every transaction and state change of the transaction, the Ethereum Virtual Machine maintains state change. Ethereum is Public permissionless Blockchain. However, enterprise Ethereum is available as private or consortium model with codebase for business applications. Figure 12.4 shows the Ethereum client architecture.
The computer which has the EVM installed is called Ethereum Client and has the following features:
- Connect to Ethereum network
- Allows the client to create new transactions and Smart Contract
- Run Smart Contracts
- Mine for new blocks
- Accounts – An account has a state and an address which is an identifier of 20 byte length. It is a client.
- Externally owned account – controlled by private keys; no code associated with them. These accounts can initiate transactions.
- Contract account – controlled by contract code associated with them. These accounts cannot initiate transactions, but they can fire a transaction in response to other transactions
- State – Transactions occurring between two accounts generates messages and these messages change the state of the transaction and the Ethereum state machine.
- Gas and Fees – Every computation that occurs in Ehereum network incurs a fee. This fee is measured in the denomination called GAS and paid in Ether. Imposing fees makes the network participant serious about their business. Computation happens for executing a transaction or mining a coin.
- Transaction - Ethereum generates a receipt for every transaction. The receipt entries include Block number, block hash, transaction hash, GAS used, GAS balance, logs for the transaction, etc.
- Blocks – Transactions are grouped as blocks as per the set policy and chained serially. Every block has three Merkle tree structure roots, one for the state machine, one for the transaction and one for receipts. All three information is verifiable. The block contents are shown in figure 12.5.
- Transaction executionWhen a transaction is submitted to the Ethereum network, first it is verified to meet the validity conditions before further processing. At the end of execution, the state machine moves from state n to state n+1.
- MiningEthereum 1.0 uses PoW, while Ehterum 2.0 (also known as "Serenity") uses PoS. The advantage of PoS is the requirement for less computational resources, while mining. Ethereum’s PoW for consensus is called Ethash and is different from Bitcoin PoW.
R3 Corda - R3, a distributed ledger technology company that leads a consortium of more than 200 firms and develops applications for finance and commerce on its blockchain platform, Corda. Corda is Opensource. Corda allows multiple participant groups to coexist in the Corda Network. Corda supports Smart Contracts. Like Ethereum, this recognizes the real world scenario of a transaction as "State Object". State Objects, Transaction and Flow framework are the main functional components. Corda handles 600 TPS is an advantage to enterprises applications.
CounterParty – A platform for Smart Contracts and Digital Agreements to be developed and executed on Bitcoin Blockchain.
Monax – Another open Source Blockchain Platform for business applications development and run time. Monax offers private Blockchain.
Cosmos, COMIT – Both have an architecture for cross-chain Interoperabilty.
Multichain, Hydrachain, BigchainDB, IOTA, and OpenChain are a few more popular Blockchain development platforms. Most are open source.
STELLAR, RIPPLE – Stellar is a multi-currency exchange platform without access to the banking system, while Ripple has access to Banking system too.