How Blockchain Works

 

I’d like to help you understand blockchain.

The term blockchain is tossed about freely these days, yet very few people understand what it means. I hope to explain this potentially world-changing technology in a straightforward way.

First, think of a blockchain as a permanent record of an infinitely expanding list of transactions. These can include financial payments; the date a work of art was made (and what its digitized copy looks like); your vaccination schedule; the provenance of a specific line-caught tuna and where it went after it left the fishing boat; the exact sources of wool and cotton in a luxury jacket; and almost any other piece of information that needs to be recorded.

Next, imagine this ledger as a software platform to which apps can be added to suit business or personal needs. Since the blockchain itself only stores codes that represent data, such as money or documents, apps are built on top of the chain to store the larger data files, such as a novel or a fingerprint ID, that are represented on the blockchain. These apps makes it easy to verify and examine anything that is represented on the chain.

Among the many revolutionary apps being developed alongside blockchain technology is something called the smart contract. These strings of computer code contain all the possible components of a transaction — such as what you would owe for the electricity you used to charge your Tesla at a certain time of day. A smart contract would be able to automatically release your payment to the electric company at the moment that you receive your electricity.

The contracts can connect to more than one blockchain at a time, and make payments to and from various accounts, using different forms of money. All of this takes place without human touch, which makes tracking huge numbers of small transactions possible.

The electrical grid, which is evolving into a marketplace where appliances and electric vehicles buy power from, and sell power back to the grid, is one of many businesses that will greatly benefit from this function of smart contracts. Of course, all of these exchanges are permanently recorded on the blockchain. Smart contracts have the potential to make many dreams possible, such as the somewhat frightening idea of autonomous companies run by robots. But no one knows exactly how they will evolve.

Each blockchain is designed to be run in a decentralized way, guided by every computer, phone or other device that is connected to it. This is why blockchains are called distributed networks — there is no central storage area or controlling interest. For instance, bitcoin, the original blockchain application, operates according to an algorithm, along with the inputs and actions of everyone on the chain. There is no central bitcoin bank located in a highrise in New York or Shanghai. Instead, people trust the distributed network, which is located in devices all around the world, from the steppes of Mongolia to the air conditioned sunrooms of Paradise Valley.

With blockchain, when an individual makes a transaction, it is broadcast to all the storage devices (computer hard drives; phone flash drives; and other devices) participating in the chain. The transaction looks like a small digital receipt, with different lines for different data and cryptographic codes. Bundles of these transactions, sometimes connected, sometimes disparate, are gathered into a block. There might be 2,000 transactions in a single block. Without a central authority to certify the creation of this block the distributed network must reach a consensus that this block exists at a certain point in time. Otherwise, it can’t become part of the chain.

This consensus, I believe, is that hardest aspect of blockchain for people to understand. Yet this agreement among the users of a blockchain that a specific block is verified, time stamped, and closed, is what makes the data in the chain immutable. Once a block is closed, there is no way to change any of the data within it without other members of the chain noticing that it has been altered. That’s how trust is built in to the chains.

For example, currently we rely on banks or other central authorities to certify that our financial transactions don’t involve “double spending” or other deceptions. In contrast, when money is exchanged on the blockchain, we rely on the fact that we can see where the money came from, and how much was there, without any need for a middle agency to certify the truth.

There are several consensus algorithms that make this possible. The most widely known is called “proof of work,” and it’s the one used by bitcoin. In a chain, each digital block is connected to the previous block by a cryptographic code, called a hash. (See how the hash concept works by easily making your own at http://www.xorbin.com/tools/sha256-hash-calculator.)

With proof of work, people compete to certify (and secure) a block by solving a complex math problem generated by an algorithm based on the hash of the previous block. Once the block is certified, it can never be altered. That’s because the hash data from one block is incorporated into the identifying data of the subsequent block. If one hash is changed (by a hacker or other interloper), it will immediately be obvious to all parties involved that the particular block is out of whack. Every subsequent block with also be out of whack.

Graphic by Dataconomy

Sally Buys Your Harley

Here’s how a simple transaction might work in the future: You sell your motorcycle to your neighbor, Sally. Your ID and vehicle registration are already locked into a block of data that recorded the date of your ownership and other details about the bike. Sally has seen this, and trusts that you are the owner. For the sale, you make a hash of your transfer of ownership to Sally and enter this transaction on the blockchain and broadcast that to every device on the network.

Some of those devices (and the people behind them) will compete to certify the validity of your transaction. Once a device solves the puzzle, the block is time-stamped and the closed block is sent to every device and installed on the chain. Sally is now certified as the new owner of your old Harley. The devices move on to certifying the next block. All of this distribution is done without human intervention.

The only way to successfully change the information recorded in a block would be to alter every previous hash all the way back to the beginning of the chain. That could easily mean having to alter tens of thousands of blocks. Even if you could do that in one straight line on the chain, you’d then face another problem: every blockchain is stored in the memory of every device on the chain. So you’d also have to change the codes in each one of potentially thousands of memory drives on the chain. This is believed to be impossible. The ledger is immutable. Once something is broadcast to the blockchain and recorded in a block, it can’t be altered.

No third party was involved with the sale of the Harley to Sally. In theory, the same system could work for the sale of a house, with no need for title insurance, brokers, or even lawyers to assure that all is on the up and up. A painting could be verified as real, without the assurance of art dealers or museums. The revolutionary aspect is that no intermediary has participated in these transactions. The trust has been assured by machines and algorithms. An entire class of institutions, likes banks, that we now depend on for our validity has been bypassed. This has enormous implications for redistributing power in our society. Of course, these institutions are well aware of blockchain’s potential, and are already trying to figure out how to avoid becoming irrelevant. The coming battle will be significant, and no one knows how it will play out.

There’s one big problem with current blockchain technology. Right now, huge amounts of computing power are used to solve the math problems in the bitcoin chain, and other chains. The electricity use is staggeringly wasteful. This is unsustainable, environmentally and economically. No one predicts that this is the future of blockchain technology.

For this reason, many creative people are working on alternative methods for securing blocks on the chain, so that they are immutable, unchangeable, and secure. Ideas called proof of stake, proof of activity, proof of capacity, and more are being tested. None of these are yet valid for a scaling blockchain, although the experts expect this problem to be solved soon.

Now that you understand the basics of blockchain, you might want to start thinking about how it might affect your life and business. You could create your own blockchain, but that’s a challenging task best left to programmers. Instead, you can turn to existing blockchain platforms, such as Hyperledger, the Etherium blockchain, or others. You can contract professionals to help you design blockchain applications that suit your needs. Two companies with vastly different approaches to this task are staid old IBM, and radically innovative Consensys. Both do incredible, inventive work.

Leave a Reply

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