The 2008 financial crisis had many impacts on the world economy, however, this article doesn’t cover those. I want to focus on one key impact. People had lost confidence in the banking system, consequently, they looked around for alternatives. This gave birth to a new technology called “Blockchain”.
In this article, I will explain how the blockchain technology emerged. I need to first elaborate on the emergence of Bitcoin for this. This article describes the challenges it sought to address, and how it addressed them. Subsequently, I will explain how the blockchain technology evolved.
The emergence of Bitcoin: The “Why” of it
An individual or a group of people using the pseudonym “Satoshi Nakamoto” published a paper in October 2008. The paper was titled “Bitcoin: A Peer-to-Peer Electronic Cash System”. Nakamoto released the first version of the Bitcoin software in January 2009. The Blockchain technology underpins Bitcoin.
Nakamoto intended to address the following with Bitcoin:
1. With confidence in banks plummeting, people needed a payment system outside the control of banks and governments. They should be able to send digital money to a recipient in a decentralized manner.
2. People should be able to securely transact in that system without hackers hijacking their transaction authority.
3. The system should be stable enough to viably compete with the banking giants.
4. Since the digital currency is outside of the control of banks and governments, there’s no one to back it. Given this, people may spend the same digital currency twice. This is called ‘Double spending’. Nakamoto needed to prevent this.
How did Bitcoin ensure decentralization?
I will now explain how Nakamoto ensured the decentralization in the Bitcoin blockchain and addressed the 1st requirement. Banks can control how people conduct monetary transactions since they have centralized networks. Consumers conduct payment transactions via these networks.
Consumers can’t conduct these transactions independently. Consumers are safe if banks conduct their business fairly. If banks compromise on fair business practices, consumers suffer, as the 2008 financial crisis had shown.
Nakamoto designed a ‘Peer-to-Peer’ (P2P) network. There is no central server administering it. One computer in this network, often called a ‘node’ can open a communication channel with another node. All nodes have equal authority. A user can send Bitcoins (BTCs)to another user without external intervention. Well, at least partly! I will explain this in more details shortly.
How does Bitcoin keep users’ transaction authority safe?
Users of a digital currency need security so that hackers can’t conduct fraudulent transactions on their behalf. Bitcoin uses a digital signature for this purpose using the public key-private key cryptography.
In this scheme, there are two keys. The public key, as the name suggests, can be shared publicly. It serves as the address to which an encrypted message will be sent. An encrypted message is the scrambled form of a plaintext, and it’s typically an alphanumeric string. Cryptographic algorithms are used to encrypt plaintexts into such scrambled ciphertexts.
The recipient of the encrypted message also has a private key. It should be kept secret, additionally, it’s used for decrypting the ciphertext back to the plaintext. The public key is linked to the private key. Cryptographic algorithms enable you to create the public key from the private key, however, the converse is practically impossible!
Let’s see why. Public and private keys are linked to each other by means of integer factorization. Let’s take the number 2,896 as an example. If I ask you to arrive at the prime factors of this, you will soon find the answers, i.e., 2, and 181. This is because 2,896 is (2x2x2x2x181).
If I cite a very large number, you will take longer. Even computers will take longer. Public key-private key cryptography uses numbers so large that today’s computers will take billions of years to find the prime factors. It’s impractical for hackers hence, this is a safe cryptography method. Users only need to secure their private key.
How does the Bitcoin blockchain look like?
Before I explain how the Bitcoin blockchain prevents instability and double-spending, I need to explain how it looks like. The Bitcoin blockchain has ‘blocks’. These are data structures.
A block has a few transactions. It also has the cryptographic hash of the earlier block, except for the first block, for obvious reasons. A cryptographic hash is a scrambled form of data, created using cryptographic hash functions.
These functions employ deterministic algorithms, i.e., one input value will always produce the same hash value. Even a slight change to the input value produces a completely different hash. These functions are unidirectional, i.e., it’s easy to produce the hash from the input, however, it’s practically impossible the other way.
A block also has answers to a puzzle, but more about it later! The next block has the hash of this block, and it continues this way, making a chain. Hence, we call it “Blockchain”. All nodes, i.e., computers on the network store all the blocks. No hacker can destroy the Bitcoin blockchain by destroying one node due to this distributed nature of the database. We also call it the ‘Distributed Ledger Technology’ (DLT).
The puzzle, and ‘Bitcoin mining’
Bitcoin blocks have an answer to a puzzle and I will talk about that now. It’s a cryptographic puzzle with moderate complexity. There is no skill required to solve it, however, the nodes must try out one number after another. It requires brute computing power.
It’s an asymmetric puzzle, i.e., solving it is moderately complex, however, the solution is very easy to verify. When a user wants to send Bitcoin to another user, he submits a transaction. It goes into a common pool called ‘mempool’. Here, Bitcoin needs intervention from ‘miners’. Miners are nodes that validate transactions and maintain the sanctity of the Bitcoin blockchain in a shared manner.
Miners pick up transactions from the mempool and try to create the next block where they would add these transactions. For this, they need to solve this puzzle. Miners get fees for creating new blocks hence, it’s a competitive process.
When a miner solves the puzzle, he broadcasts the answer to the network. All other miners can easily verify the answer. Once other miners agree, the miner gets to create the new block. Bitcoin mining is a computation-intensive process. Miners need to use powerful computers hence, they often add ‘Graphics Processing Units’ (GPUs) to their computer. Miners also run up huge electricity bills. Bitcoin consumes a significant amount of energy.
This puzzle in the Bitcoin blockchain is set to a level of complexity that results in a block created every 10 minutes. Over time, the miners find the puzzle easier. To avoid reduced block-creation time, the Bitcoin community adjusts the complexity of the puzzle every two weeks. They increase the complexity level.
Consensus algorithm and the stability of the Bitcoin network
Imagine a scenario where the above-mentioned mining process isn’t there. In the decentralized Bitcoin network, every node has equal authority. Everyone can create blocks, consequently, some nodes would have created blocks that don’t conform to the standards.
If one node creates such a block, then the other nodes can ignore it. It will be the shortest chain. The Bitcoin community knows that only the longest chain is the true one. Hence, that non-conforming block will be an orphan. However, what happens if more nodes want to create such non-conforming blocks? That non-conforming chain will then keep growing hence, it can’t be ignored so easily. The non-conformists might want to branch away with that chain. This is called a “Fork”.
Frequent forks will create chaos. The network will be unstable, consequently, people will hardly have any confidence in such an alternate payment system. Nakamoto had designed a consensus process to prevent such chaos. Only the miners that show the evidence of solving the cryptographic puzzle can create new block hence, this consensus process is called the ‘Proof of Work’ (POW) consensus algorithm. It helps address the 3rd requirement, i.e., providing a stable network.
Preventing “Double spending” and “51% attacks”
It’s now time to focus on the 4th requirement, i.e., prevention of double-spending. Imagine a hacker noticed a Bitcoin transaction of a high amount in the 179th block. Suppose the hacker wants to take that money unethically. It’s already spent once, but our hacker wants to ‘double-spend’ it by routing it to his public address.
He sets about his task and changes the data in the 179th block. The hash value of the modified block is different from what’s recorded in the 180th block. Unless he changes the 180th block, the chain breaks. In a decentralized network with full transparency everyone will see that hence, the hacker must also change the 180th block.
However, the new hash value of the 179th block must be small enough, i.e., with lots of leading zeroes. Bitcoin miners know that they should accept only small hash values. So, our hacker must find a small hash value, however, that’s incredibly difficult!
Let’s assume he finds it somehow. Now, once he updates the 180th block with the new hash value of the 179th block, he has got more work! He must repeat the entire process for the 180th block. This way, he must change all blocks up to the latest one. The amount of computation required is incredibly high! Also, everyone will know something unusual is going on since it’s a fully transparent network. The POW algorithm makes it practically impossible for hackers to ‘double-spend’.
What if a hacker wants to overpower the decentralized network and change transactions at will? This is called a “51% attack”. Practically, hackers will not be able to overpower the huge Bitcoin network with its’ many miners with large processing power. This is how the Bitcoin blockchain network ensures a high degree of security.
This kind of blockchain network is also called ‘Public blockchain’ and ‘Permissionless blockchain’. Anyone can join it anonymously or pseudonymously, while the network is fully transparent.
The high cost of decentralized security
Hackers haven’t been able to hijack the Bitcoin network due to its’ decentralized security. No government can shut down this massive network since every node has a full copy of the database. However, there is a cost to it.
I had earlier alluded to the high energy cost of Bitcoin, however, there are other challenges, as follows:
- Every full node must store the entire data hence, staring a new full node can take up to several days.
- Transaction validation requires the participation of all nodes. The network can only be as fast as the slowest node. This scalability issue results in only 3-7 Bitcoin transactions per second (TPS).
- Users want to prioritize their transactions. This results in paying higher fees to miners.
- I had mentioned how despite the decentralized model of Bitcoin, users need a bit of external intervention. As you have seen, miners validate transactions. With mining costs increasing, miners are seeing a decreasing ‘Return on Investment’ (RoI). This is resulting in the centralization of mining pools, which goes against the fundamental premise of decentralization.
Ethereum: Bringing the blockchain closer to you
So far, I have explained the blockchain basics with the example of Bitcoin. Bitcoins’ sole use case is sending digital currencies securely in a disintermediated manner. The blockchain landscape changed in 2014, when Vitalik Buterin, a versatile talent in mathematics, computer programming, cryptography, and economics released the Ethereum project.
Ethereum has many similarities with the Bitcoin blockchain. It’s a fully decentralized network with POW algorithm, consequently, it offers a high security. The native cryptocurrency is called ‘Ether’ (ETH), which fuels transactions in the system. Users need to pay the ‘Gas price’ for executing transactions.
However, Ethereum introduced their ‘Ethereum Virtual Machine’ (EVM), which allowed developers to create blockchain-based applications. To this end, they introduced two new concepts, i.e., ‘Smart Contracts’, and ‘Distributed Apps’ (DApps).
Ethereum smart contracts
Ethereum smart contracts are pieces of code. They contain “If-Then-Else” statements which transfer crypto assets from one address to another based on fulfillment of certain conditions. The conditions are coded within the smart contracts.
A smart contract has specific characteristics, as follows:
- It must be open-source.
- The code must execute autonomously, and execution triggers automatically based on conditions.
- A smart contract is stored in a decentralized blockchain hence, it can’t be changed after deployment.
- Execution results of smart contracts are stored in a blockchain. The outcome of execution is irreversible.
The Ethereum project has a proprietary language for coding smart contracts. It’s called Solidity, and it’s modeled after popular advanced programming languages.
Using the Ethereum platform you can develop DApps that execute smart contracts. DApps are like web apps, however, they have the following distinct characteristics:
- A DApp should use open-source code.
- While you can code the DApp front-end in any language, the back-end must be smart contracts.
- A DApp must reside on a decentralized blockchain and execute there.
- DApps must store their data in a decentralized blockchain following cryptographic standards.
- The user community decides the future of the DApp based on consensus, for e.g., what enhancements will be taken up for it.
- A DApp must use a cryptographic token that’s created using a standard cryptographic algorithm.
- No user of the DApp can control a majority of the cryptographic tokens.
The Ethereum community has also formulated standards for crypto tokens. For e.g., the ERC-20 token standard is a highly popular one, and many start-ups use this for their crypto tokens.
Many blockchain-crypto start-ups have used the Ethereum platform, smart contracts, and the DApp concept to build entirely new business models. An example is “Basic Attention Token” that intends to solve the challenges in the digital advertising space. Most of the ‘Initial Coin Offerings’ (ICOs) in the blockchain-crypto space use the Ethereum platform.
How can you make a mark?
At the time of writing, the cryptocurrency market is worth US $ 208 billion. You can track this market using CoinMarketCap. Even outside of cryptocurrencies, the global market for the blockchain technology is projected to be US $ 20 billion in 2024.
It’s already one of the hottest skills in the global job market. Your time to learn this cutting-edge technology with significant transformative potential and make a mark is now!