Tuesday, October 25, 2016

Blockchain for beginners

I came across the term just a few months back and promptly ignored it move on to a pressing delivery issues. The bland definition on offer - It’s a distribute ledger - was also a factor.
Blockchain which is regularly termed as single biggest technology innovation after ‘World Wide Web”, needs a better introduction for uninitiated. Here is my attempt at giving a shorter still a more complete definition of Blockchain.

Defining Blockchain

Following are the definitions from prominent sources -

Ethereum -“Blockchain, an enormously powerful shared global infrastructure that can move value around and represent the ownership of property.”

Investopedia-“A Blockchain is a public ledger of all Bitcoin transactions that have ever been executed. It is constantly growing as ‘completed’ blocks are added to it with a new set of recordings.”

Bitcoin-wiki-“A Blockchain is a transaction database shared by all nodes participating in a system based on the Bitcoin protocol. A full copy of a currency's block chain contains every transaction ever executed in the currency. With this information, one can find out how much value belonged to each address at any point in history.”

Wall Street Journal-”A blockchain is a data structure that makes it possible to create a digital ledger of transactions and share it among a distributed network of computers. It uses cryptography to allow each participant on the network to manipulate the ledger in a secure way without the need for a central authority.”

IBM-“A Blockchain has two main concepts. A business network, in which members exchange items of value through a ledger, which each member possesses and whose content is always in sync with the others.”

PwC-“A Blockchain—the technology underlying bitcoin and other cryptocurrencies—is a shared digital ledger, or a continually updated list of all transactions. This decentralized ledger keeps a record of each transaction that occurs across a fully distributed or peer-to-peer network, either public or private.”

To summarise and simplify, Blockchain is the technology behind BitCoin and other Cryptocurrencies. BitCoin is the most widely used cryptocurrency in circulation and is the genesis of other Cryptocurrencies that followed. Bitcoin is also the genesis of Blockchain and the first practical implementation of the concept.

Bitcoin

Bitcoin was invented by Satoshi Nakamoto, a pseudonym adopted by the writer of the white paper (Bitcoin: A Peer-to-Peer Electronic Cash System) which introduced BitCoin to the World.

The Bitcoin network was started in Jan-2009 when the code was released just after the publishing of whitepaper. The first block was mined on Jan-3-2009 and it referenced a story on Times of London - “The Times 03/Jan/2009 Chancellor on brink of second bailout for banks”. This was a political commentary on prevailing scenario when banks were bailed out of Taxpayer’s money. It also hints at motivation behind it the innovation, a world without the evil of financial intermediaries – modern banks.

As other people started joining the network grew. The bootstrapping and initial growth of network is an interesting story to follow.

In the initial period after release of code, Sathoshi communicated a lot on forums, issuing clarifications on queries and concerns. Satoshi also patched the code along with other developers. By end of 2010, after about 2 years, others slowly took over the code maintenance and governance. Satoshi stopped communicating since then. Nobody knows who Satoshi is and he/she never cared to come out in public, except once when he/she communicated to deny wild theories of his appearance. Satoshi holds a big chunk of Bitcoins from his initial mining when there were not many on the network and the price of Bitcoin was less than a dollar. At present it’s priced at ~600USD, which would make Sathoshi very rich at this point.

There is an interesting story about first real-world transaction using Bitcoin. It happened on 22-May-2010 to buy two pizzas in Jacksonville, Florida for 10,000 BTC (bitcoins). User Laszlo made this transaction. At present day’s price that would be 6 million USD for 2 pizzas. However at that point user "SmokeTooMuch" auctioned 10,000 BTC for $50 (cumulatively), but no buyer was found.

At the time of writing the market cap of BitCoin stands at $11 billion.

Where is Blockchain in Bitcoin?

Bitcoin is a virtual store of value, or virtual currency, which is not offered by a Central Bank or any institution and is not stored within the boundary of a single institution. The value is stored in a cryptographically secured data structure called Blockchain distributed across a peer to peer network (BitCoin network). Bitcoin allows transfer of value between two parties without any intermediary, through a peer to peer network. Since there are no intermediaries the transaction knows no boundary of country or geography and settles immediately. The ledger is public and yet anonymous. 
The key concepts which can revolutionise the businesses across domains are –


  • Immutable ledger.
  • Public yet secure ledger where each transaction could be tracked.
  • No intermediaries required for transfer of value.
  • Anonymity
  • Low cost peer to peer network used to store and validate transactions.
  • Instant Settlement.
Blockchain is the technology backbone of Bitcoin.The concepts mentioned above can revolutionise financial world and hence Blockchain is termed as single biggest revolution in the world of technology since the advent of ‘World Wide Web”.

Hash pointers and Blockchain

Bitcoin networks keep the ledger in a data structure called Blockchain. The Blockchain is a linked list created using hash pointers.
A hash pointer is a pointer which stores a combination of a pointer to data and a cryptographic hash of that data at some fixed point in time. The pointer not only points to the data but also helps in verification of data.


A linked list is series of blocks where each block has data as well as a pointer to previous block.
A Blockchain is a linked list where each block has data as well as a hashed pointer to previous block.  So each block not only has pointer to previous block but also a digest of data in each block.


Each Block contains –
  • Hash pointer to previous block
  • Timestamp of block
  • A collection of transactions in the form of a Merkel Tree.
  • Proof of work information

The data structure is immutable and tamper-proof. It can only be appended but not modified. In Bitcoin network the transactions are stored on Blockchain and each node has a copy of the Blockchain.

Each transaction transfers a value from a public key to another public key. Each transaction refers to an input (which is spent) and creates an output (unspent). Summing up unspent output gives the balance that a public holds.

Each node of the networks can do a transaction which is to transfer a Bitcoin from one public key to another public key. Each transaction is broadcasted to the network. Each node of the network keeps track of transactions, validates transactions and competes to group valid transactions into a Block. Once a block is created, the block also needs to be broadcasted and then add to the Blockchain.  On receiving the block the node add it to its copy of Blockchain.

The process of block creation is called mining. The name comes from Gold Mining as in the process of creation of block, Bitcoins are generated and given to the creator of block. Since it’s the value which is being generated and it has to be scarce, there is a completion which needs to be won to create the block and unlock the value i.e. generated Bitcoins. The competition is to calculate a hash which has to be less than a targeted value; the targeted value is contained in “Proof of work information”. The process mentioned above is the consensus mechanism to agree on the current state of Blockchain.

The process mentioned above – though greatly simplified- ensures that each node has the latest copy of Blockchain.

Why Blockchain?

Bitcoin has its roots in cypherpunk movement which imagines world with minimal government. This world needs its money to transact and Bitcoin is imagined as one which knows no boundary, no government.

While this is a utopian and rather anarchist view of world, there is value in creating a mechanism to transact value anonymously, without an intermediary, and settle the same instantaneously. These along with the promise of distributed data that knows no boundary, promises to create a platform where internet can be used to transact value without intermediaries, without compromising on identity of users and it can settle instantaneously reducing the systemic risk associated with financial transaction. The public ledger of information promises extreme transparency which can enable regulators to monitor without peeping into private data and private life of citizens.

References

Blockchain – Definition

Princeton Lectures

Others