The success of Bitcoin and Ethereum has provided the genesis for many developers to begin working on blockchain technology. As previous chapters have shown, the decentralized nature of both networks leads to some interesting use cases.
Businesses must secure and protect corporate and user data, and blockchains are a novel technical idea for how to do so. Blockchain technology could be put to many uses within organizations. However, in practice this often requires rethinking the way that Bitcoin, Ethereum, and other open consensus networks operate in order to conform with data security, regulatory, and other requirements businesses must comply with.
For open blockchains like Bitcoin and Ethereum, the main use cases thus far have been mostly speculative—the coverage of markets, dapps, and DeFi in this book have made that clear, we hope. But for businesses and other organizations, blockchain has some other interesting uses, and there are many trials occurring in this area.
Let’s look once again at the basics of what blockchain is useful for besides cryptocurrencies and speculation. Here are the core technologies that are put together to create what is known as blockchain today:
What are the specific properties derived from blockchain technology? On a basic level, a blockchain does the following:
Many who are interested in blockchain are looking for reasons to use it to solve problems that existing technology hasn’t solved. Open blockchains provided a way to make a payment to someone without a third party’s involvement, but the main use for them today has become speculation. Unfortunately, speculation is not a use case that’s relevant or attractive to organizations with technology issues.
So what are some use cases for businesses? Consider databases. Securing and sharing databases is a challenge for many organizations, and it has been made even more complex by the advent of technologies like cloud and mobile, which open up new security vulnerabilities. Blockchain could finally provide a way for organizations to coordinate information that needs to be secured yet shared by multiple parties.
Companies can ask questions like the following:
Is blockchain a transactional mechanism counterparties can agree on?
Can parties agree on what kind of data is to be written using blockchain?
Can problems be solved with this technology?
The answer is definitely yes in each case.
A database is a structured set of information stored inside a computer system. Databases are key to storing information, and can often be accessed in several different ways depending on the data’s use. Database management systems (DBMSs) are interfaces end users can use to categorize and retrieve data. These users are often critical components of an organization, working in areas such as communications, payroll, and human resources, among others. The most popular databases today are relational databases, which use tables to arrange information. The data is organized in such a way that it does not repeat across columns.
Replication systems are used with databases to make them distributed. Replication involves storing data in multiple places in a way that allows it to be easily updated or synchronized. This increases the availability of the data. Database systems must balance high availability with efficiency, and replication also allows users to work with various datasets in parallel. Replication systems must continuously work to update data in order to make sure everyone is working on the same set of information. There are various replication models that keep data up-to-date.
Ledger is a term used to describe a record-keeping system. The term permissionless ledger is sometimes used to describe cryptocurrency-based blockchains. This includes Bitcoin, Ethereum, various forks, and most altcoins. These networks are called permissionless because anyone can join in and participate; there is no central authority that grants or denies permission.
Blockchain in the permissionless world is a distributed computing system with accounts and payments built in. However, some organizations don’t particularly see the benefit of this. Permissionless systems need accounts, payments, and cryptocurrencies to properly incentivize users, but that may not necessarily be the case for permissioned ledgers. In the permissioned world, providing infrastructure for payments and accounts is optional.
Distributed ledger technology (DLT) is enterprise terminology that describes a more blockchain-type ledger database. Database structures generally follow specific schemas that allow developers to read, write, and query them. DLT brings a new schema to database infrastructure, enabling reading and querying to occur in real time (writing in a consensus-based system is not always done in real time, and akin to following a clock).
Databases are centralized portals. In organizations, an administrator usually controls access to the entire system. Using a ledger system can allow multiple parties to access information without requiring one single gatekeeper.
There’s nothing wrong with centralized databases. However, blockchain technology enables the sharing of information through consensus incentives instead of centralized rent-seeking (e.g., targeted advertising on social networks or taking a fee like online marketplaces do).
Early cryptocurrency proponents embraced decentralization as a core part of the technology. However, many other blockchain platforms—particularly those being developed for organizations—are much more centralized. Let’s take a look at some of the differences.
In open blockchains like Bitcoin, anyone with mining equipment can join the network and begin hashing. With private blockchains, such as for business use, there is a need to control who participates. In fact, centralized control is a key component that makes the system work. “Composition is more important than consensus” is an axiom used to express this. While having a way to agree upon transactions or data that is published in a block is important, it’s more important to ensure that only authorized participants are involved. This is a big difference between decentralized and centralized blockchains.
Ben Laurie, founder of the Apache Foundation and a cryptographer working at Google Research, has laid out a Framework for Distributed Verifiable Ledgers that outlines characteristics that are desirable in blockchains that are not of the open permissionless variety.
We’re calling these other blockchains in this chapter because there is a good amount of variety between the different implementations. However, in all these systems it is important to consider the following aspects:
Public blockchains and cryptocurrency networks don’t make good implementations for businesses. This is because many organizations need to keep control of their information for competitive reasons, compliance, or other factors. However, blockchain technology potentially has many uses if the privacy concerns can be worked out. One option some enterprises have pursued is to fork the Ethereum blockchain and create a custom implementation including the privacy features they require.
Nightfall is an implementation of Ethereum by the accounting firm EY. It adds privacy features to the network’s smart contract technology, enabling ERC-20 and ERC-721 tokens to be transacted on the Blockchain privately. Nightfall accomplishes this by using zk-SNARKs, generating proof via ZoKrates. This provides Nightfall with readable proofs that come from computation. There is a Java wrapper for ZoKrates functions.
Developed by investment bank JPMorgan, Quorum is an Ethereum-based blockchain that supports private transactions and private contracts. It’s compatible with development tools that Ethereum engineers are familiar with. Quorum uses Zether, which is an encrypted value tracking system. It “attaches” to ERC-20 contracts, creating Zether accounts that are private. This is done by using ElGamal ciphertext to encrypt each account balance under a public key.
There are also groups working on more specific proprietary blockchains. Many of these groups started with Ethereum and then decided to build their own solution from the ground up for specific use cases.
Hyperledger is an open source platform for blockchain development hosted by the Linux Foundation. The most well-known Hyperledger project is Fabric, a ledger technology that uses the programming language Go. There are other implementations, including a C++ implementation called Iroha and Sawtooth, which is multilanguage. Hyperledger Fabric offers support for smart contracts, transactions, and consensus, similar to Ethereum. Many enterprise blockchain projects, including those by IBM and Oracle, are based on this framework.
Developed by the consortium R3, Corda focuses on institutions seeking privacy. The platform is based on the Java Virtual Machine (JVM), familiar to the existing base of developers in the finance industry. There is no global blockchain or representation of state. Instead, Corda uses a ledger system that replicates to relational databases for easy querying. Its smart contracts are basic legal terms instead of code.
Corda is designed to make transactions between businesses more trustworthy and efficient, as illustrated in Figure 9-1. Without Corda, the databases of the two companies are siloed. With Corda, the companies can safely collaborate to manage transactions.
Usually, when two separate entities perform transactions they each maintain a ledger, and at intervals they reconcile them. For example, a toy manufacturer receives constant shipments of parts from its supplier. Each company keeps track of those shipments using its own software and processes. Every month the two companies reconcile their ledgers when the supplier sends an invoice, and the manufacturer checks the invoice to confirm that the numbers are the same in its system.
Every business has multiple relationships like this. The more partnerships a company has, the more effort and resources are required to keep track of them.
There are two main attributes of public blockchains that businesses can benefit from:
However, there are also several attributes that are not attractive to businesses:
The Corda protocol was built to satisfy all those business requirements.
A Corda network is a peer-to-peer network of nodes. Each node represents a legal entity, and each runs an instance of Corda with one or more Corda applications. Figure 9-2 illustrates.
Anyone can start their own Corda network, but every node in the network must receive permission by the network operator to join, and must also be identified to all participants in the network. Every node in the network communicates directly and in private with every other node in the network through Transport Layer Security (TLS).
Each node in the network hosts its own centralized database, and all transactions are performed peer-to-peer. Two or more nodes can perform a transaction. After multiple nodes complete a transaction, the nodes each store the transaction in their own database. Only the nodes involved in the transaction or nodes that are given access have visibility into the transaction, as illustrated in Figure 9-3. Transactions are tamper-resistant and include digital signatures by some of the parties involved.
In Figure 9-3, Bob has performed transactions #1 and #7 with Alice, and performed transactions #5 and #6 with Carl. Bob can see all four transactions, but Alice can only see transactions #1 and #7.
In order for a transaction to be included on the ledger, it must pass the following two checks:
Validity consensus. All nodes involved check to make sure the following are true:
All signatures that are required in the transaction are valid.
The transaction satisfies all of the constraints that are defined in the associated smart contracts.
Uniqueness consensus. Corda follows a UTXO accounting model, similar to Bitcoin. Uniqueness checks prevent a double spend, confirming that inputs included in the transaction have not already been spent.
The skills required by engineers to build a Corda solution for enterprise are well known and widely used in the tech industry, making it easy to find and train qualified engineers. Corda dapps are written in Java and can work with enterprise databases Azure SQL, SQL Server, Oracle, and PostgreSQL.
Developed by a company called Digital Asset, DAML is a blockchain-agnostic smart contract language for distributed applications. It supports all of the previously mentioned blockchain platforms. Developers work on DAML contracts on a layer separate from its blockchain. The focus on smart contract development depends on the business use cases. It is thus easier to shift ledgers or storage models after a contract has been created.
The concept of Blockchain as a Service (BaaS), where vendors provide easy-to-implement solutions that can be customized, is likely to grow as use cases for the technology increase. Similar to Software as a Service (SaaS) and cloud offerings, these blockchain products provide elements such as centralized management of users and distribution of nodes. Here are a few examples:
Large financial institutions and central banks have been looking at blockchain implementations in a search for ways to circumvent what may be outdated, inefficient, or otherwise expensive processes. Not all of these fully work yet, but experimentation in this sector is a sign of blockchain progress.
The Royal Mint, which produces coins in the United Kingdom, partnered with the Chicago Mercantile Exchange (CME) to create a blockchain-based asset tied to gold. The cryptocurrency company BitGo was brought in to provide wallet and KYC technology for the project. However, the effort was shelved in late 2018 after CME dropped out, leaving questions about where the asset would be traded.
The central bank of France was early in exploring ways to utilize blockchain. In 2016, it ran a trial based on digital identity for euro payments. The bank has been calling for global regulations within the blockchain industry. Most recently, it has published job postings looking for blockchain experts familiar with both crypto-economics and the Hyperledger, Corda, and Quorum platforms.
In 2019, president Xi Jinping announced an acceleration of development in blockchain for the country. China is moving toward central bank cryptocurrency, and a digital yuan is expected to use blockchain tech. The plan is for the system to be two-tiered, offering some degree of features similar to cash as well as an offline feature for mobile transactions.
The United States’ central bank has been observing cryptocurrencies over the years. In 2019, the Boston Federal Reserve published a paper describing Ethereum- and Hyperledger-based blockchain tests that it had run (Figure 9-4). It used wallets representing various banks and smart contracts to reconcile payments made to the Federal Reserve, which the Boston branch is in charge of.
Investment bank JPMorgan has developed Quorum as its own blockchain based on Ethereum. It has also created its own stablecoin, JPC Coin. The cryptocurrency will be used as a method of making cross-border payments, which can be expensive and inefficient, via the Quorum blockchain. Users will be able to deposit fiat with the bank, be issued JPM Coin, and redeem it for fiat payment elsewhere.
The use cases for permissioned systems are often very different from those of open blockchains. As we’ve pointed out, open blockchains can be good for speculation, tokenization, and storing digital value, but enterprises have other requirements. These include speed, privacy, and development capabilities. These requirements have led to the development of an array of new use cases for blockchain, after extensive testing of permissioned platforms.
Security is an ever-present component of enterprise IT systems. Digital Asset’s DAML SDK supports editing in Visual Studio, which is popular in many companies. Smart contracts tied to ledgers can help verify the validity of data critical for systems. This arrangement can include network management, database monitoring, and service desks. An example could be to use a contract to validate a software package or a Docker image.
As mentioned earlier, from securitization to settlement to rethinking fiat money, banks and central banks alike have increasingly been looking at blockchain technology. Banks must operate with a number of other organizations, and blockchain could serve as a trustless intermediary that disparate groups can all agree upon. One example that has gained traction and exemplifies this is digital bonds, which the bank Santander has issued. Custodians, issuers, and investors use tokens in this process, illustrated in Figure 9-5.
Central bank digital currencies (CBDCs) are digital forms of a country’s fiat currency. Instead of requiring intermediaries or third parties like banks, CBDCs could enable real-time payments directly between parties. While CBDCs may use existing databases for implementation, there is consideration of deploying blockchain or distributed ledger technologies. China, the US, Sweden, and the United Kingdom are among the countries considering or testing CDBC concepts.
The legal industry is by its nature adversarial. It involves opposing parties making claims while a neutral judiciary makes decisions. Blockchain, as an immutable technical innovation, can help to verify information during legal proceedings. In addition, technology to automate a number of legal processes is advancing; using concepts from smart contract development could be helpful. The law firm BakerHostetler, for example, is using smart contracts for freight agreements.
Anyone who has played video games understands the value of items like virtual weapons, power-ups, or clothing. In-game these items often have tremendous value, but they are normally locked into one particular game or ecosystem. The concept of items connected to a digital asset to signify uniqueness is gaining popularity, thanks in part to the Ethereum-based CryptoKitties.
Blockchain technology can also be used to combat cheating. On-chain chess, illustrated in Figure 9-6, is a project conducted by the Technical University of Berlin using Ethereum smart contracts. Players knew the game could not be cheated because of the public contract code.
The health-care industry generates a lot of data, and much of that data is scattered around. Patients go to general practitioners, specialists, hospitals, outpatient care clinics, and other locations for health needs. All of these visits generate data. Regulations are coming into place that will require that health-care providers enable patients to access all of their digital data. Google is working on something called a verifiable data audit, a ledger-based system that will cryptographically verify data records.
Billions of smart devices, from power strips to light bulbs, can run more efficiently when cooperating with a larger network. To date, businesses are still struggling with ways to pay for all of these devices to connect into the Internet of Things (IoT) and provide verifiable information. Blockchain, with accounts and even payments in a controlled infrastructure, may be part of the solution. IBM’s artificial intelligence platform Watson interacts with IoT devices and securely stores data with the IBM Blockchain Platform, which is based on Hyperledger Fabric.
There is a role for blockchain-based payments, but open blockchains have struggled to compete with the likes of existing networks such as Visa. Still, many still see an opportunity to use blockchain for specific payments use cases, such as the following:
Most enterprise blockchain experiments are focused on behind-the-scenes business processes. However, there is an opportunity for companies to use cryptocurrency and blockchain fundamentals to offer new features to users and customers. It’s early in this game, but consumer-focused companies like Facebook want to bring blockchain to everyone, particularly in terms of making payments on the internet. Libra is the name of the effort being spearheaded by the company.
With its billions of users, Facebook has been exploring blockchain implementations for some time. The company’s Libra Association is a consortium of organizations that have come together to implement an entirely new blockchain system called Libra. The following are some of the companies involved, and their roles:
Payments: PayU
Technology: Facebook, FarFetch, Lyft, Spotify, Uber
Telecom: Iliad
Blockchain: Anchorage, BisonTrails, Coinbase, Xapo
Venture capital: Andreessen Horowitz, Breakthrough Initiatives, Union Square Ventures, Ribbit Capital, Thrive Capital
Nonprofits: Creative Destruction Lab, Kiva, Mercy Corps, Women’s World Banking
The Libra Association intends to create an entirely new payments system on the internet by using a proof-of-stake consensus Byzantine fault-tolerant algorithm developed by VMware, known as HotStuff. The association’s members will be the validators of the system.
HotStuff uses a lead validator. It accepts transactions from the clients and uses a voting mechanism for validation. It is fault tolerant because the other validators can take the lead’s place in case of error or downtime. Byzantine fault tolerance is used in other blockchain systems, most notably on some smaller open networks utilizing proof-of-stake. Figure 9-7 illustrates Libra’s consensus mechanism.
The Libra cryptocurrency is expected to hold a stable value, backed by a basket of assets that will include fiat currencies and treasuries. Unlike most stablecoins, it does not plan to peg to the US dollar and will instead exist as a digital currency with its own valuation against fiat.
Libra is expected to support the use of smart contracts by third-party developers to create applications. This will be accomplished through a new programming language called Move. This language will allow programmers to create contracts and even update the state of the Libra blockchain. Move is being labeled as a language “with programmable resources.” With vetted validators and specific resource types, Libra’s smart contracts will likely be more limited in scope than those of open blockchains such as Ethereum.
Facebook itself will develop its own wallet, known as Novi, to facilitate transactions. The impact of the Novi wallet could be large given Facebook’s billions of users across its many platforms, including Messenger, Instagram, WhatsApp, and Oculus VR.
Libra will also support a number of third-party wallet implementations. The network itself is expected to be open, with wallets being the gateways for financial services. KYC/AML will need to be a component of Novi, and this is something Facebook can easily implement into its products since it already has a trove of user data at hand.
Libra’s network contains two types of nodes: validator nodes and full nodes. Validator nodes are permissioned and are made up of organizations in the Libra Association. These nodes manage governance of the network and process Libra transactions using the LBFT consensus protocol.
Full nodes can be run by anyone and serve two purposes:
They act as real-time broadcasters of the current state of the Libra blockchain. Full nodes maintain a full copy of the blockchain and answer client requests to read from the blockchain.
They revalidate transactions that have been processed by validators.
Full nodes make Libra more scalable by removing the burden of validator nodes servicing read requests. This also protects validator nodes from potential DDoS attacks.
When a client application—for example, a Libra mobile wallet—wants to interact with the network, it reads data from full nodes and sends transaction requests to validator nodes.
The LBFT protocol is a set of rules that define how transactions and governance are performed on the Libra blockchain. Even though all validator nodes on the network are identified and trust each other, there is still a risk that at some point one or many of them could become a bad actor and try to include invalid transactions on the network. One example is if hackers compromise a couple of validator nodes. The hackers could then try to process transactions that send funds from other accounts to their own.
Each block of transactions added to the blockchain in LBFT is proposed by the leader of a round. Validators rotate as the leader, each taking a turn. Unlike in proof-of-work consensus, no energy or time is spent deciding which node gets the right to generate a block. This makes LBFT fast and scalable. Libra is anticipating a speed of one thousand transactions per second—compare that to Bitcoin’s seven transactions per second.
After a leader proposes a new block of transactions, all network validators vote on whether the block is valid or not. If more than 2f + 1 validators agree that the block is valid, a Quorum Certificate is generated. This Quorum Certificate is attached to the next block, cryptographically connecting every block to its parent block.
A block can only be committed to the Libra blockchain when it has three consecutive child blocks that all have Quorum Certificates as well. Until this point, the block could possibly become an orphaned block. Figure 9-8 illustrates.
Transactions in Libra are structured in a similar fashion to Ethereum. Libra follows an account model, as opposed to a UTXO model like Bitcoin, so there are no inputs or outputs. The structure of a Libra transaction is illustrated in Table 9-1.
| Field | Description |
|---|---|
| Sender address | The account address of the sender of the transaction. |
| Sender public key | The public key that corresponds to the private key used to sign the transaction. |
| Program | The program is comprised of the following:
|
| Gas price (in microlibra/gas units) | The amount the sender is willing to pay per unit of gas to execute the transaction. Gas is a way to pay for computation and storage. A gas unit is an abstract measurement of computation with no inherent real-world value. 1 microlibra = 0.000001 LBR (10^−6). |
| Maximum gas amount | The maximum units of gas the transaction is allowed to consume. |
| Sequence number | An unsigned integer that must be equal to the sequence number stored under the sender’s account. |
| Expiration time | The time after which the transaction ceases to be valid. |
| Signature | The digital signature of the sender. |
Some businesses want totally private blockchains, and for them an R3 Corda implementation might be useful. Some want a usable network for the general public. That’s the kind of role the Libra project is trying to fill.
No one knows yet which service will become the Amazon of the blockchain business. AWS is so easy to deploy and develop on that, while it does have its competitors, it reigns supreme in cloud computing. No one reigns supreme in these other blockchain systems—at least, not yet.
Open networks like Bitcoin and Ethereum created the world of blockchain. Now businesses have taken blockchain concepts and are using them to improve many aspects of their operations.
This is just the beginning. There will be continued experimentation in the future—the subject of the next chapter.