Saturday Dec 14, 2024
Monday, 6 January 2020 00:36 - - {{hitsCtrl.values.hits}}
Undoubtedly, one of the industries that stand to benefit greatly from the widespread usage of Blockchain technology is the banking industry. Most banking systems in the world are built on centralised databases and as such, may be more prone to cyberattacks
Every house needs a good foundation to stand on. Every tree requires strong roots to grow. Every train needs solid tracks to run on. Sensing a theme? Good! Roots, foundations, backbones, whichever term we use, a firm, solid base is important if you want something to last.
So today, we delve into the reason that Bitcoin has lasted for nearly a decade; today, we uncover the intricacies of Blockchain – the backbone of Bitcoin.
Now, I am under no illusion that this task of deciphering Blockchain will be a walk in the park. For most people, hearing the word Blockchain or Distributed Ledger Technology (DLT) is enough to dissolve any enthusiasm they may have for Bitcoin or cryptocurrencies in general. My theory is that this is because we have heard just enough on the subject of Blockchain to scare us, but not enough for us to understand it.
Today’s plan is to change that. Let’s start with the basics: What is Blockchain? In relatively simple terms, Blockchain is a peer-to-peer distributed ledger that has been secured using cryptographic means and is used to record transactions. Yes, I do know there was nothing ‘simple’ about that explanation. So, let’s break it down: starting with distributed ledgers.
A Distributed Ledger is basically a database that exists in several locations or between multiple participants, at the same time. This is in contrast to generic, ‘centralised’ databases that exist only in one fixed location. Think of it like this: you have a list of transactions that you’d like to store somewhere and instead of just having one compilation of your entire list of transactions, you have multiple copies of your list that are all identical, stored in different places.
Now, why would you want to have multiple copies when that would just be a waste of space? That is a question to be answered later on. For now, we are left with this: Blockchain is a type of Distributed Ledger, which simply means that there are multiple copies of our list of transactions.
Peer-to-peer
Next, what is peer-to-peer? In a peer-to-peer, or P2P network, the ‘peers’ are computers connected to each other through the internet. In such a network, sharing of files and documents between these peers can be accomplished without the need of a central server, in effect making the peers both clients and servers.
Now, this ties in nicely with what we just learned earlier: a distributed ledger that exists on a peer-to-peer network means that each peer on the network is capable of hosting copies of the transaction list on their computer, thereby acting like a server, and are also capable of viewing the same transaction list that is on the computer of another peer on the network, in this instance, playing the role of a client.
So far, we understand what is meant by Blockchain being a ‘peer-to-peer distributed ledger that is used to record transactions’, but what about that part of the definition that says Blockchain is ‘secured using cryptographic means’?
Ah now, this is where it gets interesting… and sadly, a little complicated. But fear not, I am not about to explain cryptography right this second, instead, I do promise to get to it later. And yes, I am aware that this is the second thing that I’ve put off till a later time, but bear with me, it shall all become clear in the end.
Applying Blockchain to Bitcoin transactions
For now, let us go back with our rudimentary understanding of what Blockchain is, and see how it is applied to transactions, most especially Bitcoin transactions. We know that a Blockchain is a P2P distributed ledger, but do we know what form this distributed ledger is in? Hint: it is not in the format of a traditional rows and columns database that you or I may be familiar with.
Instead, a Blockchain is, as the name suggests, a ‘chain’ of ‘blocks’, a ‘block’ in this context being a record of a new transaction. This block is designed to store three different kinds of information: 1 – Information about the transaction, such as the date and time the transaction took place and the amount of the transaction. 2 – Information regarding the participants in the transaction. For example, who made the purchase from whom?
But, instead of the participant’s actual names the block stores the digital signature of the participants, kind of like a username on a website. 3 – Unique identifying information of the block. In order to make a block unique, we include in it a code named a ‘hash’ that allows us to differentiate a single block from every other block on the Blockchain.
So, imagine that you are making a payment to someone using Bitcoins. You make this payment on 20 December 2019 at 5 p.m. for the amount of 0.00125 BTC (Bitcoins) and it will be recorded on the Bitcoin Blockchain. But what information actually gets recorded? The block will simply say that some user at Bitcoin address A, made a payment of 0.00125 BTC to another user at Bitcoin address B, on 20 December 2019 at 5 p.m.
This, together with a few other transactions that happened around the same time your transaction took place, will go into a single block, and miners on the network will work to verify these transactions and add this particular block to the Blockchain. As I’ve already explained Bitcoin addresses and the mining process in a previous article, I won’t bore you with a repeat explanation. Suffice it to say that the transaction details of you making the payment in BTC is ultimately recorded in the Bitcoin Blockchain.
If you’ve been reading carefully, you’ll notice that at the end of that example I’ve said that a single block will carry information on multiple transactions, not just one. That is because a single block on the Blockchain can store up to 1 MB of data, meaning that one block is capable of housing a few thousand transactions.
Block to a blockchain
Now that the block has been made, we must add it to the blockchain. To add a block, four conditions must first be met. The first is that a transaction must happen. Well, that’s taken care of, you just made a payment to someone. Secondly, this transaction must be verified. In a traditional centralised database, there would be someone in charge of this vetting process, but how do you vet an entry into a database that has copies everywhere? Who do you put in charge? The answer, is everyone.
That is, every miner connected to the network. This is what happens in the mining process. Thirdly, the transaction should be stored in a block. Along with thousands of other transactions, the transaction that you made, once verified, is stored in a new block. And lastly, the block is given a hash, that unique identifier that we talked about earlier, and then added to the Blockchain.
When I say ‘added to the Blockchain’, it means that this particular block is added to every single instance of the Blockchain that resides in every computer around the world. In layman’s terms, all the copies of the database are updated at the same time. Now I promised earlier that we’d be exploring the reason for these multiple copies at a later time and I believe that time has arrived. So, why the multiple copies? Primarily, security.
Hacking into a Blockchain
Imagine this: you’re a hacker trying to infiltrate and change a record in a database. Now, if you’re lucky, it’s a centralised database and since you’re very good, you hack that database in record time, get in, change what you want to, and get out. But, this is only possible because there’s only one database, one single point of entry. What happens if you want to hack a distributed ledger like Blockchain?
Let’s say, since you’re an excellent hacker, you manage to infiltrate one copy and change the contents. But, the minute that people on the network see that the copy you hacked is different from every other copy, and that all of the others are identical but the hacked copy is different, the jig is up. It will be painfully obvious that somebody has tampered with an instance of the database.
So then, logically, to hide the fact that you’ve hacked into the Blockchain, you’d have to hack into all the multiple copies of the Blockchain, all around the world, at the same time. A pretty tall order and practically impossible to do. Hence, you’ll agree that multiple copies of the same database, placed at different computers on a network, turns out to be a pretty good security feature.
But just for the sake of argument, let’s say that you were an extraordinarily gifted hacker and that you were able to hack into all of the copies at the same time. You’d be thinking that congratulations are in order! You’d be wrong. Just because you manage to break into the Blockchain, doesn’t mean it’s easy to change the record. If you remember, we talked about a ‘hash’ earlier, a unique identifier. But this hash isn’t just for identification purposes, it is also a security feature.
In the Blockchain, each block contains its own hash and also includes the hash of the block that comes before it. So, imagine that you changed the contents of a block, say block no. 5, in the Blockchain: because the hash of the block is created out of the contents of block 5 and since the contents have now changed, the hash of block 5 will also change.
But the next block in the chain, block 6, still has the old hash of the block you changed, so now you will have to go and change block 6 as well and so on and so on, till the very end of the Blockchain. And you would need to do this to all of the copies.
Recalculating all of these hash values would take an enormous amount of computing power. It’s a safe bet to say that this would be impossible to do. So, our takeaway from this little hacking example? It is very difficult to edit or delete a block, once it has already been added to the Blockchain.
However, these aren’t the only security features available in Blockchain. Let’s take a look at just one more.
Bitcoin wallets
Remember that transaction you made using Bitcoin? As we saw, that transaction was recorded in the Blockchain for public consumption, but the user data was not. Instead, the public keys of both wallets were used to record their transaction. Every Bitcoin wallet has two unique cryptographic keys – public and private. The public key is the location where transactions happen and it is the key that is recorded in the Blockchain ledger as the user’s digital signature.
Think of the public and private key as sort of like a P.O. Box – the public key is the post office box where other people can send you correspondence and the private key is the key that opens the P.O. Box. Anyone can send you mail, but once in the box, nobody can take that mail out except for you, by opening the box with your key.
Now, although the post office keeps duplicates of every P.O. Box key, the private keys in the Bitcoin Blockchain are not recorded anywhere. That means if a user loses their private key, they will lose access to their wallet and subsequently, all their Bitcoins. So, if you’re ever in possession of a Bitcoin wallet, make sure to keep track of that private key!
Smart contracts
Something that we must absolutely talk about when discussing blockchain, is smart contracts. They are a part of the blockchain technology which acts as a self-executing contract helping users to exchange anything of value like money or property in a transparent manner while skipping the services of a middleman.
Smart contracts are written as code and committed to the blockchain with both the code and the conditions in which it will execute being available to the public on the ledger. When an event specified in the contract is triggered, such as an expiration date or the target price of an asset being reached, the code is automatically executed.
Smart contracts are a way to enhance the trust, safety and speed of your transactions: trust is assured since your documents are encoded in the distributed ledger and no one can say they lost them; safety, as we’ve seen is cryptographically ensured; and speed is guaranteed since the contracts are all automatically executed and there is no manual processing of documents.
Consensus
Another unique feature of Blockchain is the concept of consensus. Now, if you’ve already decided that you’ve taken in as much technical information as you can for one sitting, then this next part is not for you. If so, do feel free to skip on ahead, but if you’re feeling a bit adventurous, read on and see what Blockchain consensus is all about.
A consensus algorithm is the mechanism that’s used to create consensus among the participants of the network. Since public Blockchains do not rely on a central authority, there must be a different method through which the nodes on the network agree on the validity of the transactions. Anyone on the network can submit blocks to be added to the blockchain, so it’s important to ensure that all the transactions are evaluated and agreed upon before permanently being incorporated into the database.
Unlike in a central database where the person in charge of updating the database is a trusted individual, in a Blockchain environment, we are never sure of the trustworthiness of the person behind a particular computer in the network. Therefore, it is important to constantly review and confirm data before adding it permanently to the Blockchain.
This reviewing of information is where the consensus algorithm comes in. there are various methods of obtaining consensus including Proof of Work (PoW), Proof of Stake (PoS), Delegated Proof of Stake (DPoS) and Practical Byzantine Fault Tolerance (PBFT). But, since I would like you to keep reading this article, I will not go into specifics for each of these algorithms. Instead, I will leave you with the fun fact that Bitcoin uses the Proof of Work consensus method for its Blockchain.
Now let’s recap what we know so far: Blockchain is a peer-to-peer, distributed ledger that is used to record information securely; it’s distributed nature makes it difficult to hack, meaning it is more secure than centralised databases; Blockchain uses hashing, public and private keys, and consensus algorithms to maintain the integrity of the database and ensure security; Blockchain provides a certain level of anonymity for its users since the user information is not recorded with each transaction; and Bitcoin has quite successfully utilised Blockchain technology to record transactions.
In generic terms, it appears that Blockchain is a well thought-out technology capable of maintaining the integrity of and providing security for, the information that is recorded in it. So, this begs the question, can it not be used anywhere else? Must we stick with the cryptocurrency and Blockchain duet? Is it not possible to separate Blockchain technology from its partnership with Bitcoin and utilise it somewhere else? Well, not only is it possible, but it has already been done in certain fields, with great success.
The banking industry
Undoubtedly, one of the industries that stand to benefit greatly from the widespread usage of Blockchain technology is the banking industry. Most banking systems in the world are built on centralised databases and as such, may be more prone to cyberattacks.
As we’ve seen, Blockchain technology has a solution to this problem, in the form of decentralised databases that are difficult to hack. Further, financial institutions around the world spend millions every year to keep up with Know Your Customer (KYC) and Customer Due Diligence regulations. While these regulations are a necessity and are invaluable in helping reduce money laundering activities, they can sometimes be difficult and time-consuming to perform. However, if financial institutions could share their KYC verification details amongst themselves thus avoiding repetition of the KYC process, the costs would decline substantially. There have been several instances where this idea has been successfully implemented in countries around the world.
In fact, the Central Bank of Sri Lanka is also currently engaged in implementing a Blockchain KYC Proof of Concept (POC) project, and it is believed that with successful implementation, this POC can greatly benefit commercial banks and financial institutions in the country with their KYC processes.
Trade Finance
Trade Finance is another area that may benefit from the introduction of Blockchain technology. As it is now dominated by the requirement for sending documents such as bills of lading and letters of credit around the world, many believe that it would be beneficial to transfer this process from physical paper to a Blockchain-based system, especially since many of the stakeholders need access to the same documents.
Disadvantages of Blockchain
There are literally hundreds of more uses for distributed ledgers – medical records, land registries, cross border payments, supply chain management – the list goes on. And from what we’ve seen so far, Blockchain appears to be a magical solution to many problems. But I would be remiss if I simply painted a rosy picture of the advantages that blockchain has to offer, and left it at that. As with anything in life, blockchain has a few disadvantages too.
First and foremost, is the amount of energy that it burns through. The Bitcoin network is currently reported to use more energy annually than the country of Switzerland and in a world where energy generation has become a climate issue, this is not an ideal state of affairs.
The Proof of Work consensus algorithm governing the Bitcoin Blockchain has proven to be robust over the years. However, theoretically, this algorithm may be disrupted by a 51% attack, meaning a single entity gaining control over 50% of the network’s mining power, allowing them to exclude or modify transactions on the blockchain.
Another potential downside that we’ve already touched upon is the existence of the private key. Although it is a wonderful concept, it isn’t really people-proof, because more often than not, people will either forget their key, lose the piece of paper they wrote it on or do any number of other things that will result in the loss of the private key and subsequently, the loss of all their Bitcoins!
The existence of a few disadvantages however, does not negate all the positive things Blockchain is capable of. Although a comparatively new technology, it appears that Blockchain’s potential usage may be unlimited. It seems to be a truly disruptive force in many critical spheres such as medicine, security, government and finance.
When you consider the fascinating story of how Bitcoin and Blockchain came to be, it almost seems like Blockchain was simply a by-product of the process of creating Bitcoins; an uninteresting necessity; a way to make Bitcoin shine, if you will. But it appears that over time, Blockchain has shown itself to be the bigger star, with far more versatility and staying power than a simple cryptocurrency.
(The writer is the Assistant Director of the Central Bank of Sri Lanka. However the views expressed in this article are those of the author’s and do not necessarily reflect those of the Central Bank of Sri Lanka.)