Introduction to Blockchain

by

The term blockchain has been floating around both the tech and finance communities a lot in recent years. But what is blockchain?

Blockchain is a digital ledger of all transactions across a peer to peer network. Each user in the network will have a full copy of the whole blockchain, which includes data of all transactions. Let’s say a user wants to pay another user. He would encrypt the transaction and broadcast it to the network. The transaction gets put into a new block. The ledger is maintained by miners, who work to approve the transaction and validate it using cryptographic techniques. Then the block is added to the blockchain.

Under this system, nodes unanimously and continuously agree on the state of the ledger. Everyone has access to a shared, single source of truth and bookkeeping is neither closed nor in control of any one party. If a user tries to corrupt a transaction, the nodes will not arrive at a consensus and the transaction will be rejected from the blockchain.

Contrast this to the traditional system where transactions between 2 parties would utilize a trusted third party, like a bank, to validate the transaction. These middlemen keep an internal, centralized ledger system. Blockchain bypasses the need for these third parties, and instead uses the network to approve transactions.

Cryptocurrency

When people think about blockchain, Bitcoin often comes to mind. That is because blockchain was originally designed for Bitcoin, which was the first cryptocurrency. But applications for blockchain actually extend well beyond money, which I will explain later.

A cryptocurrency is a digital medium of exchange that uses encryption techniques to control the creation of monetary units and verify transfer of funds instead of a central bank. Unlike an actual currency, it is not backed by any government or legal entity. It is believed to be resistant to counterfeiting.

A Bitcoin is divisible into 100 million units. Each unit is individually identifiable and programmable. Users can assign properties to each unit and can represent X shares in a company or X euros or X barrels of oil. Back in 2009, a Bitcoin was worth under $1, but today it is worth almost $10,000 with $168 billion market capitalization and just under 17M Bitcoins in circulation.

Blockchain Under The Hood

Structurally, the blockchain is basically a linked list but instead of using pointers, it has a hash of its previous block in its header. Nodes in the blockchain are in a distributed network. Inside the block is a Merkle Tree of transactions.

A Merkle Tree is a full binary tree of hash values. At the bottom of the tree, each transaction has a node containing its hash value. The parent node has a value of the hash of the data contained in its children concatenated together. The hash of the root of the tree is included in the header.

To form a block, a proof of work system is used. A proof of work is a function by which a piece of data is difficult to produce but easy for others to verify. Bitcoin uses the Hashcash system, which is also used in anti-DoS and anti-spam systems. The idea of Hashcash is basically that it is easy to compute y from x in the function y=H(x), but it is very hard to find x given only y. A full hash inversion has a known computationally brute-force running time of O(2^k) where k is the hash size.

The Mining Process

I mentioned earlier that miners work to approve transactions and validate it using cryptographic techniques. Let’s dig a little deeper into the mining process itself.

First, every 10 minutes (or however long the time period determined by the blockchain), miners collect a few hundred transactions and combine them in a block. Then, miners use computational power to work on solving the proof of work problem. The first one to find a hash value for the new block below a certain threshold and with a sufficient number of leading zero bits broadcasts the hash to the network.

Other members validate and confirm the hash, adding the new block to their copy of the blockchain. When a majority of miners have added the block to their own copy of the blockchain, the block is definitive.

Given this process, it is very difficult to tamper with the blockchain. In order to change the data in one block, you must make a new block containing the same predecessor and regenerate all successors. So the more blocks in the blockchain, the harder it is to overwrite data.

Uses for Blockchain Outside of Cryptocurrency

Obviously, the financial industry has many processes that blockchain can streamline. Blockchain automates the ledger work that is currently being done manually by bookkeepers, accountants, and auditors. Stock trades can settle almost instantaneously, instead of the current T + 3 process. Blockchain will make clearinghouses obsolete.

An interesting use of blockchain is in food supply chain. Agriculture conglomerate Cargill is piloting a blockchain turkey tracking program in Texas to increase food transparency. Similarly, China’s ZhongAn Technology is using blockchain to track chickens.

Blockchain will also be very useful in the medical field as a centralized method of securely storing medical records for patients. We are just beginning to see the wide-ranging applications of blockchain.

Wrapping Up

Blockchain is a powerful technology that can transform the way society functions. It has the potential to automate millions of jobs, make intermediary organizations obsolete, and  allow better control of information. Money is just one of the many possible applications. Hopefully after reading this blog, you will have a basic understanding of blockchain.

Leave a Reply

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