Blockchain in 6 minutes
Tags: blockchain, tutorial, beginners
Published: 2020-06-26 04:34:59

The concept of blockchain was first popularised when a mysterious person (or group) named [Satoshi Nakamoto](https://en.wikipedia.org/wiki/Satoshi_Nakamoto) published a paper on BITCOIN. [Bitcoin](https://bitcoin.org/) was the first widely accepted decentralized digital currency, also known as cryptocurrency, that could operate in a trustless network. Bitcoin itself was a remarkable innovation, but the underlying technology was the real deal, this technology was later known as Blockchain.

In the [paper](https://bitcoin.org/bitcoin.pdf) published by Satoshi Nakamoto, he describes how financial assets(in his case, bitcoin) can be transferred without any intermediary trust body, unlike our conventional systems. In a typical day to day transaction using the conventional system, we transfer funds through some regulatory body like a bank or, in some cases, the government itself. This method of transaction is the most common and widely accepted norm, but if we take a step back and look at the bigger picture, we will see that this method has a lot of disadvantages.

## The Broken System
The transactions in the conventional system are performed under the regulations of a single body whom we have to trust blindly, this leads to the Single Point of Failure problem: if by any chance this regulatory body were to go corrupt all our transactions would have no guarantee of success or completion. Even if we consider the regulatory body to be always trustworthy, there arises another common problem: all transactions we perform and our personal data are stored in the bank servers, which can be hacked and easily tampered! Last but not least, our identity is exposed; almost all regular transactions can be easily traced back to us.

## The Savior - Blockchain

The above disadvantages are just a few that I can think of, but the main point of this discussion is: how blockchains can solve these problems. So let’s dive right into the revolutionary world of Blockchains.

### What is a Blockchain?

Blockchains have been generally described as a “decentralized, distributed ledger”. To put it in simple terms a blockchain can be thought of as a chain of blocks (yes, that’s exactly what the name suggests), where each block is immutable(read-only) and contains a record of transactions. We can, for now, consider these transactions to be similar to the ones made through a bank, eg. “Jack paid $50 to Jill” except that there are no names or specific identities associated with these transactions.
The blocks in the chain are created by nodes/peers participating in the blockchain network using a process called mining; these miners are rewarded with cryptocurrency for their contribution. They are considered as the pillars of a blockchain network. 

### Where is a Blockchain stored?

We have found an efficient way to record our transactions, but we need a place to store this blockchain so that everyone can access it. The easiest way of doing so is to host it on a server and let others access it, but this would again mean that all the data is under the control of a single authority or body which we want to avoid. The next possible solution is to store the blockchain on a [distributed peer to peer network](https://en.wikipedia.org/wiki/Peer-to-peer). In this design, the blockchain is stored by every single participating node/peer, hence there is no sole authority controlling the data. This distributed architecture is one of the key features of blockchains.

### Why Decentralization in a Blockchain Network?

The chain of blocks and the distributed P2P network forms the distributed ledger we require, now let’s talk about decentralization and its need. To understand this, we go back to the traditional system where a single body regulates everything, for example, the bank. In this case, after a transaction is initiated all the decisions regarding it are made by the bank itself, this is an example of a centralized system. A decentralized system, on the other hand, is a system where the final decision is made after a consensus or majority agreement of all the participants. This means that any decision regarding the blockchain, like adding new blocks, validating a transaction, or deciding between two competing chains, etc. are done based on the consensus of all the nodes in the network. This removes the need for a trusted authority as trust can be established by a majority decision of all the participating nodes. Though there is a possibility where the consensus decision can be rigged by attackers if they gain a majority in the network, this is also known as the **[51% Attack](https://en.bitcoinwiki.org/wiki/51%25_attack)**, but this kind of attack can be mitigated as the network becomes larger and as the blockchain grows in size.

### How is the Data protected from tampering?

We already know the blockchain network operates on a consensus mechanism; this not only prevents rogue attacker nodes from making fraudulent transactions but also prevents them from tampering with the pre-existing transactions. Tamper-proofing is possible because the probability of coercing a majority vote in an extensive blockchain network like Bitcoin becomes almost zero. There are different [consensus algorithms](https://hackernoon.com/a-hitchhikers-guide-to-consensus-algorithms-d81aae3eb0e3) available now: Bitcoin operates on the Proof of Work consensus algorithm, while Ethereum 2.0 operates on the Proof of Stake algorithm.

### How is Privacy maintained?

All users in a blockchain network have [public addresses](https://en.bitcoin.it/wiki/Address), which can be thought of as account numbers in a banking system, these can be used to transfer funds. Whenever a transaction happens, it is publicly stored in the blockchain, each transaction contains data that include the public addresses of the sender and receiver(s). Exposure of the public addresses does not imply the exposure of the identities as new public addresses can be generated to perform each transaction, which practically makes one untraceable. Unlike in traditional systems where our account numbers mostly remain constant and account creation requires Identity proofs, creating a public address in a blockchain network doesn't require anyone to divulge personal details.

## How are Transactions Verified?

There is no central authority or database to store the accounting details like balance and transactions in a blockchain network. All the transactions are directly written into the blockchain which is publicly available(in most cases). The transactions can be computed to calculate the balance in an account associated with a public address and also to verify whether a new transaction is feasible by the nodes/peers. For example, let's consider two users Jack and Jill and the following transactions in a blockchain :

1. Initial $50 -> Jack
2. Jack $30 -> Jill
3. Jack $40 -> Jill 

In the first transaction, Jack is initially provided $50, let's say, as a reward for mining a block. Jack then transfers $30 to Jill in the second transaction, we can compute the account balances for Jack and Jill at this instance of time as :

1. Jack : $50-$30 = $20
2. Jill : $30

Transactions 1 and 2 were verified successfully by the nodes/peers. In the third transaction, Jack tries to send $40 to Jill, but the nodes in the network observe that Jack does not have enough funds for the transfer, and hence this transaction is never mined and gets nullified. The scenario where users try to transfer money that they have already spent, in a previous transaction, is called the **[Double Spending](https://en.wikipedia.org/wiki/Double-spending)** problem.

There are many other verifications and checks performed on the transactions before they are added to the blockchain, these prerequisite verifications may differ from one blockchain to another.

## Closing Statement

This article was a very abstract overview of blockchain technology and how it solves the problems of our conventional systems. We discussed how we can avoid the need for a single trust body with decentralization, how data/transactions become tamper-free by placing them in immutable blocks in a distributed network, and how our privacy is maintained using untraceable public addresses in the blockchain system.

Blockchains are an area of constant research and have many applications besides its predominant use in cryptocurrency. Sectors like healthcare, agriculture, supply chain, and governance have found various use cases for blockchains. The field of blockchain is very nascent, and the consideration of 'Blockchain being the Savior' is a controversial topic, but in my opinion it is a brilliant piece of technology that deserves attention.