What is blockchain? How it work? (2021)

Ng Wei Sheng
7 min readMay 20, 2021

Blockchain are incredibly popular nowadays, you properly hear it with Bitcoin news. But what exactly is blockchain? What problems can blockchain solve? How do blockchain work? Don’t panic the following article will cover all of those questions. Enjoy ☕️

Photo by Hitesh Choudhary on Unsplash

Table of content

What is Blockchain?

The concept of blockchain was proposed in year 1991 by a group of researchers. The main purpose of blockchain is to timestamp digital documents so that it’s not possible to backdate or to tamper them. Almost like a notary. The blockchain concept was not famous until Satoshi Nakamoto implement it in cryptocurrency (Bitcoin).

The main characteristic of blockchain is distributed ledger. This mean the entire data in blockchain is consensually shared and synchronised(managed) across multiple computers. In other word, the data is encrypted and completely open to anyone. Hence, once data has been recorded inside a blockchain, the modification of data will become very difficult and almost impossible.

How blockchain work?

Before understanding the process, let’t go through the basic of data block.

In blockchain, data is stored inside block and linked to other block. Each data block will consist of 3 important information which are data of transactions, unique fingerprint (hash) and hash of the previous block.

a) Data of transactions

The data store inside a block is depend on the type of blockchain. For example, Bitcoin blockchain and Ethereum blockchain. Both of them will store the transaction data like sender information, receiver information and amount of coin sent.

A block can contain multiple transaction records. As instances, Ali sending Daren $10 and Trump send Gates $100. Both of them count as different transaction and can be stored inside same data block.

b) Hash

A block also has a hash. A hash is a unique word that consist of letters and numbers. It act like a fingerprint for each data block. Every block has a unique hash once the block is created or new data is added to the block. In addition, the hash for each code will never be repeated in the entire blockchain.

When the data in a block is changed, the hash will also be changed. For example, if the amount Ali sent Daren changes from $10 to $5, the hash code will completely different. In other words, single modification of data in a block will cause changes on the hash code. Thus, the hashes are very useful when tracking the changes of block.

c) Hash of previous block

The third element of data block is hash of previous block. The hash of previous block act as link to creates a chain structure between two blocks.

As you can see, the figure above show 3 data blocks. The block 3 is points to block 2, while block 2 is points to block 1. The first block in a blockchain will not point to any block, it often called as genesis block. The first block is needed to start a blockchain and the developer of a blockchain usually set it to unavailable forever.

The chain structure between blocks gives blockchain the ability of tamper resistance. For example, if the transaction data in any block go through modification, the hash of the block will be changed. When the hash of the block change, the next block will show a mismatch with the previous hash that was recorded by it.

For example, if a person modify single data in data block 2. This will change the hash of the block 2 from 5A3J to 6AFF (for example). Now the block 3 will mismatch because block 3 no longer store the valid hash from previous block. Hence, data changes can be easily track with blockchain.

Unfortunately, the use of chain structure is not enough to prevent tampering on a data block. Nowadays, even a single computer can have very high computational power. A powerful computer able to rehash the hashes between two block and make a modified data block valid again in short amount of time. To solve this issue, proof of work (POW) and peer to peer network (decentralisation) were implemented with blockchain.

Proof of Work is a mechanism that use to prevent double spending issue. In short, it is a mechanism that slowing down the creation of new block by requires a node (computer) to provide evidence before adding new block into the blockchain. The outcome (evidence) will also be validated by other nodes first before added to the chain. This ensure the correctness of data block. For Bitcoin it will takes around 10 minutes to calculate the evidence.

Proof of work will increasing the difficulty of altering data over time. This is because to tamper a data block, it required the malicious user to compute and rehash all of it’s following blocks.

Other than Proof of Work, the decentralisation of blockchain also help to secure the validity of data blocks. Instead of using a central entity to manage the chain, most of the blockchains are developed with peer-to-peer concept. They allow public to join the network as node.

When someone join the network, he/she will get the full copy of the blockchain encrypted data and able contribute as miner (node) to the network by verify that everything is still in order (mining). Of course, he/she will be awarded with some mining fee.

Now, what if I wish to create a transaction in a Blockchain. How the process happen behind the scene? To further clarify this I decided to explain the process with a simple example (Bitcoin transaction).

Let’s say Siti request to sent 1 bitcoin to Abu. The request now is send and stored in blockchain unmined memory pool with other unmined transactions.

In blockchain, a data block must go through 6 step before added to the chain.

In step 1, the transaction data is shared with bitcoin users (miners) from the unmined memory pool. In the memory pool, unconfirmed transactions will wait until they are verified and be included in a new block.

In Step 2, the blockchain miners will then compete to validate the new data block using proof of work.

In Step 3, the miner who solves the puzzle first shares the result across the other nodes. Once the block has been verified, the nonce (evidence) has been generated.

In Step 4, the nodes will start granting their approval. If maximum nodes grant their approval, the block becomes valid and is added to the blockchain.

In Step 5, the miner who has solved the puzzle will receive a mining fee.

In step 6, the 1 btc will be transferred from Siti to Abu.

That all, simple right :D

What problems can blockchain solve?

Cross Border Payments
The current state of international payments through banking channels is a complex process. It is a multistep process that involves a lot of intermediaries. Moreover, each step of the process takes a lot of time and also charge huge amount intermediaries fee. Studies show that average transaction fee for worldwide is around 7%.

Blockchain helps streamline the entire process by cutting out any and all intermediaries procedures, thereby shorten the time needed for the Cross-Border Payments.

In addition, the involved parties in blockchain incur around 40% to 80% fewer remittance fees than traditional methods. The transaction can’t be reversed or changed in blockchain, this also ensures better accountability and security than the traditional system.

Digital Copyright and Piracy
Recently, the US film industries incur loss more than $60 billion a year because of copyright infringement. Big media like Sony and others are constantly fighting legal wars against piracy and the illegal distribution of media. However, the traditional methods in combating illegal distribution of media is not suitable to the internet world.

To solve this, blockchain can help media creators digitize the metadata of their content, for example timestamps and Intellectual Property rights. The creator can now put their content on a publicly open market without much worry.

Thanks to the ability of tamper resistance on real-time and transparent royalty distribution data offered by block chain technology. Now, the owner will instantly knows once a copyright infringement happens, and they can take legal proceedings.

There are still many usage of blockchain like monitor supply chains(fake wine identification), digital voting and more. In this article, I only mention two famous use case to prevent information overloading.

Thank you for reading my article. If you enjoy my article please click the clap icon or you may also buy me a cup of coffee here (after I have enough fund for my degree study, I will close the link). Have a nice day. ☀️

--

--

Ng Wei Sheng

Software Engineer/ Data Analyst/ A.I specialist/ Economist Cheerful person. I will summarise what I learn from my daily reading session. Stay Tune and subscribe