The Chain logo

Introduction to Blockchain

Everything you need to know about this buzz word

By Python ScriptPublished 2 years ago 8 min read
Like
Introduction to Blockchain
Photo by Thought Catalog on Unsplash

There are certain fundamental flaws in the way that financial transactions and services take place in the present world. If person X wanted to send some money to person Y, then person X usually does it through a centralised authority, i.e., his bank, which ensures that person Y receives the money from person X. In the process the bank charges person X a certain transaction fee for carrying out the transaction successfully, and updates the corresponding databases (i.e., a digital ledger), by deducting a certain amount from the buyer and adding it to the seller’s account.

Similarly, consider the several online shopping platforms that bring together the buyer and seller. The buyer needs to buy the product on the website from the seller for the transaction to take place. The shopping website again is acting like a centralized entity for the transaction to occur. However, do we really need these centralized entities or “middle-men” to carry out these transactions for us? What if there was a more efficient technology that eliminated all the middle-men from the equation? Welcome to the world of Blockchain, which does exactly this.

I’m sure you’ve heard of the word “Bitcoin”, a term which has become quite viral in recent times. Bitcoin is a digital cryptocurrency which doesn’t require a centralized entity like a bank for transactions to take place. This means that transactions can occur from person to person without any transaction fee.

Unlike conventional currency, it can be used in any country and we won’t need any prerequisites or have problems like the bank freezing your account. The cryptocurrency works fundamentally on the backbone of blockchain technology. Let’s dive deeper and understand how this works.

Principle of working of Blockchain

As the name suggests, the word “blockchain” means a chain of blocks that contain some information. This concept was suggested way back in 1991 to timestamp digital documents, so as to ensure that these time stamps can’t be tampered with. However, this went by unused until the Bitcoin revolution came along. When we talk about blockchain, we essentially focus on the following terminology —

A blockchain is a distributed ledger which is open to anyone. Once some data has been recorded inside a blockchain it becomes very difficult to change it.

A block will hold some data, the “hash” of a block and the “hash” of the previous block. The data stored depends on the type of blockchain. For example, in a Bitcoin blockchain, the data stored will be the transaction details such as the sender, receiver and the amount of coins transferred. The “hash” of a blockchain is analogous to the fingerprint of humans. It is unique to a block and gives identity to a block in the chain. It identifies a block and the content that it stores. You may be wondering how the hash of the block is determined. Once a block is created, it’s hash is automatically calculated based on its contents.

A hash function is a mathematical function which converts a given input message into an alphanumeric unique output. If the data inside the block is changed, the associated hash will also change. Therefore, hashes are very useful in detecting changes made to the block. Once the hash changes, the identity of the block changes. Since each block also stores the hash of the previous block, each block will point to the previous block. If data in a block is tampered with, and the hash of the block is changed, the successive block will have no other block to point to. As a result, the chain of blocks is broken and the transaction will not be carried out. In other words, it makes all the successive blocks invalid.

In this way, blockchain technology adds a layer of security against any form data manipulation from taking place. However, this is not enough to ensure complete security of data. With more and more powerful computer being built, it is possible to tamper with the data and recalculate all the hashes of the blocks to make the blockchain active once again. Computers are capable of calculating thousands of hashes per second. To counter this, blockchain has a concept called “Proof of Work”. It is a mechanism that slows down the creation of new blocks. The way we do this is by introducing a 32 bit (4 byte) number called a “nonce”.

The nonce of the block makes it more difficult to calculate the hash of a number because it prefixes a certain number of zeros to each alpha-numeric hash value of a block. The more the number of zeros that prefixes a hash, the higher the difficulty of the calculating a hash. The number of zeros is decided based on how long it takes to calculate the hash. In bitcoins, it requires approximately 10 minutes to calculate the required nonce and thereby the proof of work to add a new block to the chain. If number of zeros so chosen requires more than 10 minutes to calculate the proof of work, then the number of zeros is reduced and vice versa.

The process of creating new blocks is called “mining”, and with regard to bitcoin, creating new blocks will award the miner a certain number of bitcoins. Initially, 50 bitcoins were offered as reward for mining a new block. This number halves every 4 years. Currently, one can get 12.5 bitcoins for each new block created. So, if you tamper with one block, you need to re-calculate the proof of work of all the remaining blocks. The security features don’t end here. In addition to this, blockchain is completely distributed.

Blockchains use a “Peer-to-peer” network, which means there is no centralised authority that has dominant control. Each member of the network is called a node. Every time a member join this network, he gets a full copy of the blockchain. For example, if a node adds a new block, every node will get a copy of the block. If the block hasn’t been tampered with, the creator and all the nodes will get the same block identity. All nodes verify and agree with each other that the block hasn’t been corrupted and then add it to the chain. Any blocks that have been tampered with will be rejected by other nodes.

To summarize, to really tamper with the data, you will need to recalculate all the hashes of the blocks in the chain, recalculate the proof of work of all the blocks in the chain and finally take control of over 50% of the P2P network. This is nearly impossible to do with current computational ability. This is why Blockchain is so powerful in today’s world. The security against data theft is vital in an era which is dominated by massive amounts of data. Blockchain is now used in a variety of applications like digital cryptocurrency, voting systems, collecting taxes, hospital databases, etc. to name a few.

Click here to watch a visual demonstration of the concepts explained above.

To summarize, the major benefits of this technology are:

  • Saves time — The transaction time is reduced from days to near instantaneous due to peer to peer communication rather than through a centralised entity.
  • Removes cost — Overhead and cost intermediaries are ruled out due to elimination of middle-men
  • Reduces risk — Tampering , fraud and cyber crime risks are eliminated.
  • Increases trust — The whole concept of a blockchain is built on mutual trust among all the its users and this is induced via shared processes and record keeping.

As with any new technology, Blockchain also has its set of limitations.

  1. Complexity: To achieve the high level of high security, Blockchain had to be made very complex by nature. It also involves an entirely new vocabulary which most people aren’t very familiar with. Thankfully, several online glossaries and indices makes this slightly easier to work with.
  2. Size of the Network: As mentioned earlier, one key aspect of good security in a blockchain system is its decentralized P2P network of nodes. To get good security, you need a large number of users. Therefore, if a blockchain is not large and robust enough, it becomes more difficult to extract its full benefit. In many applications, this factor is crucial in determining if blockchain is a suitable technology to be used or not.
  3. Energy consumption: The process of creating new blocks is an energy intensive process as it requires a lot of computational power. As a result, a new study showed that bitcoin mining consumed 2.6GW of power, almost just as much as Ireland consumes, and is estimated to increase to 7.7GW by the end of 2018. This is believed to reduce by 2020 when the number of bitcoins per new block will halve again. However, this is not certain because the value of one bitcoin could also increase to counteract this.
  4. Unavoidable security flaw: Earlier, I had mentioned that to manipulate data in a blockchain, changes have to be made to more than half of the nodes involved in the chain. In other words, if a lie is told by more than half the nodes in the network, the lie becomes the truth. This is called a ‘51% attack’ and was highlighted by Satoshi Nakamoto in the original whitepaper when he launched bitcoin. For this reason, bitcoin mining pools are monitored closely by the community, ensuring no one unknowingly gains such network influence.

These concepts are further elaborated in the original Bitcoin whitepaper. Click here to view the whitepaper.

Certain common terminology regarding blockchain :-

  1. Ledger: The system for keeping records in an organisation. Eg: account books, file etc.
  2. Asset: Anything that can be owned or controlled to produce value. Eg: house, mortgage etc
  3. Transaction: Transfer of an asset onto or off the ledger. Eg: selling of the house.
  4. Contract: A set of fixed rules that all the participants involved in the transaction have to follow.
  5. Smart contract: A contract that is embedded on the blockchain using a coding language.

blockchain
Like

About the Creator

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.