Blockchain Technology Explained
You must have heard about the term “blockchain,” in reference to Bitcoin and other cryptocurrencies. Many people believe Bitcoin is Blockchain; however, blockchain is a technology that underlies digital currencies.
If you are new to blockchain technology and cryptocurrencies, this article will help you understand the technology in more depth.
Let’s start with the history of blockchain and understand how blockchain emerged and how it is different from other technologies.
In this article, we shall discuss the following topics:
- History of Blockchain Technology
- What is Blockchain?
- How does Blockchain work?
- Types of consensus protocols
- Applications of Blockchain Technology
- Types of Blockchain Platforms
It seems unbelievable, but people started to think about the blockchain as a new internet era back in 1991. W.Scott Stornetta and Stuart Haber imagined the technology that people call blockchain today. They initiated working on cryptographically secured blocks in a chain that no one could tamper with timestamps.
These guys upgraded the system and incorporated Merkle trees to enhance efficiency and collect various documents on a single block. But the technology started to gain importance in 2008 when an unknown person or group named Satoshi Nakamoto introduced the blockchain again.
Satoshi published a whitepaper titled “Bitcoin: a peer-to-peer electronic cash system.” The document defines how to create a secure and transparent digital currency without a central entity or bank’s involvement.
Though the document did not contain the term “blockchain,” it outlined the way blockchain technology works. Satoshi launched Bitcoin in January 2009, but he left the project after some time and handed over the Bitcoin development to other developers.
Since then, developers have started to build a new peer-to-peer currency that does not involve central entities. The world’s first cryptocurrency exchange, Bitcoin Market, was set up in 2010 and the Bitcoin Pizza Guy, Lazlo Hanyecz, made the first real payment in BTC.
If someone asks when blockchain was invented, we can say it was founded in 1991.
According to the authors of “Blockchain Revolution,” Don & Alex Tapscott, “The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.”
Blockchain is neither a company nor software; it is a new and innovative way of documenting information on the internet. A blockchain is a chain of time-stamped blocks that contain an immutable record of data and is managed by a cluster of nodes, not by any single authority.
Every block of data is secured and linked to each other with cryptography principles.
Let’s discuss the blocks in more depth.
A block can be considered as a page in the ledger. Each block comprises data, timestamp, a hash of the block and a hash of the previous block.
The data saved in a block depends on the type of blockchain. For instance, blocks in the Bitcoin blockchain store the details about a transaction like a sender, receiver and balance in the form of number of coins.
Hash of the block acts as a fingerprint as it gives a unique identification to the blocks and the contents it includes. All transactions in a block are represented as a hash.
Hash of a previous block is always added to a new block to maintain chronology and ensure that blocks are valid. A timestamp includes the time when the block was created to keep track of the block’s creation and updation time.
A new block should always point to the previous block. In case a block added to the chain does not contain the valid hash value of the last block, it means the block has been tampered with.
Altering any block within the network would make all the blocks invalid in the blockchain.
Hashing mechanism is not enough to protect the blockchain from tampering or manipulation. As computers are fast nowadays, hackers can quickly recalculate hash values of the blocks and invalidate them.
To ensure that there is no single entity controlling the network’s information, the blocks get distributed across all machines, specifically called nodes on the network.
Every node keeps a copy on the ledger so that data is never lost and remains accessible to all members present on the network. When some information is added to the blockchain, all nodes agree if the data is valid.
Now the question is, how do nodes agree on adding new blocks to the blockchain.
The answer is a consensus algorithm.
Since there are different blockchain platforms available, different consensus algorithms are used to agree if a block should be added to the blockchain or not.
Now, let’s understand how does blockchain technology work.
Blockchain works on the following concepts:
- Private Key Cryptography
- Distributed Network with a Shared Ledger
- An incentive to service the network’s transactions, security and record-keeping
Private Key Cryptography
If two people want to transact over the internet, every one of them should hold a private and public key. The blockchain uses this concept to ensure a secure digital identity of the users.
The combination of private and public keys can be viewed as a type of consent by creating a unique digital signature. Holding public and private key offers reliable control of ownership to the users.
However, cryptography is not enough to protect digital relationships. It should be combined with authorization (a means of validating permissions and transactions).
In the case of blockchain, authorization is done via a distributed network.
Distributed Network with a shared ledger
The benefit of a distributed network can be explained by the example “trees were cut down.” We could be sure about cutting down the trees in the forest if there were cameras to record that incident. Though the particulars (why and how) behind the event can be unclear, we have visual evidence that it happened.
Similarly, in the case of blockchain, validators on the network are like cameras who reach a consensus that they noticed the same thing happening simultaneously. However, they use mathematical verification of computation instead of cameras.
A node on the network starts a transaction by creating it and signing it with its private key. Transactions comprise the logic of transfer of value, source and destination addresses, rules and validation information.
The next step is that the transaction must be verified. A network of computers on the blockchain verifies the transactions to be stored in a block. Once they confirm that the transaction happened, they add it to the block.
Block containing the information, digital signature and timestamp, is broadcast to all the nodes in the network to provide them accessibility at all times.
Once written to the blockchain, the data cannot be edited or deleted, making it an incorruptible ledger of transactions.
Following are the different types of consensus protocols used for validating transactions on the blockchain
Proof of Work
Proof of Work is a consensus protocol that aims to deter cyber attacks like distributed denial of service attacks, exhausting a computer system’s resources with multiple fake requests.
The proof of work was introduced when Bitcoin came into existence. But this term was coined by Ari Juels and Markus Jakobsson in a published document in 1999.
It is a way to define an expensive and cumbersome computer calculation called mining. Mining is performed to create a group of trustless transactions on a distributed ledger, blockchain.
Mining is used for the following functions:
- Verifying the transactions’ legitimacy or ignoring double-spending
- Creating digital currencies by giving rewards to miners for performing previous tasks
The node that finds the mathematical power solution can only authorize transactions and add new blocks to the blockchain network. Proof of work consensus prevents tampering of the blocks as one needs to re-evaluate the computer computation for all blocks in the network.
Proof of Stake
Proof of Stake (PoS) is a consensus algorithm to achieve distributed consensus and validate transactions. Suggested initially in 2011, it was first implemented by cryptocurrency, Peercoin, in 2012. The algorithm is energy efficient and secure.
In proof of work consensus algorithm, miners who solve mathematical problems are rewarded for creating new blocks and validating transactions. However, with the proof of stake algorithm, the next block’s creator is selected randomly, depending on how much wealth (cryptocurrencies) the user holds or for how long the user has been keeping that specific digital currency.
Proof of stake requires considerably less energy and therefore, it is cost-effective compared to the proof of work algorithm. Moreover, there is less need to release too many coins to incentivize miners to manage the network.
The algorithm is helpful in inspiring individuals to participate in the system and protecting the network from any individual who wants to control it. An individual or a group of individuals has to own the majority of coins to carry out a 51% attack on the network.
First of all, it would be expensive for attackers to acquire enough coins. Individuals would exit the digital currency if a single party started buying everything. Also, the price would ramp up to prevent a hostile takeover. Moreover, attacking the network would decrease the coins’ value that the attacker is holding.
Proof of stake algorithm also has a drawback and faces a “nothing at stake” problem. The challenge occurs when block generators don’t have anything to lose by preventing the conflict from resolving and supporting changing blockchain histories.
Delegated Proof of Stake
Delegated Proof of Stake (DPoS) is a type of consensus algorithm that aims to secure a blockchain by enhancing the speed of block creation and transactions while not affecting the decentralized incentive structure.
Users have to put their currency at stake with the proof of stake consensus mechanism to earn the right to authorize transactions, earn rewards and forge blocks. On the other hand, Delegated Proof of Stake Consensus, a variation of PoS, aims to achieve consensus efficiently.
DPoS uses the election process to maintain the consensus. Users of DPoS based blockchain vote to choose witnesses and earn more votes to validate transactions on the network. Users can also pass on their voting power to other users whom they can trust to vote on their behalf.
Votes are evaluated based on the size of the voter’s stake. It means that users do not require a significant stake in getting into the top tier of witnesses. Instead, votes from users with a considerable stake can select users with a small stake for the witnesses’ top tier.
The number of witnesses required in the top tier is capped at a specific number who need to create blocks, validate transactions and are awarded the associated fees.
Witnesses cannot modify the details of transactions, yet they can prevent certain transactions from being included in a new block. Therefore, they are similar to that of the miners in a proof of work system.
Users in DPoS consensus-based network can also vote for a group of delegates, trusted parties for managing the network. The representatives look after the blockchain protocol’s performance and governance but do not validate transactions and create blocks.
Leased Proof of Stake
Another addition to the original Proof of Stake is the Leased Proof of Stake. The Waves platform introduced this new consensus algorithm that offers a better catch with a limited amount of power consumption. The original proof of stake never allowed individuals with limited coins to participate in staking.
In the Leased Proof of Stake algorithm, the smallholders can also participate in the staking process by leasing their coins to the network and avail the benefit. The situation changed drastically after the introduction of leased PoS.
Proof of Elapsed Time (PoET)
PoET is one of the efficient consensus algorithms used on the permissioned blockchain where you need permission to access the network.
Proof of Elapsed Time algorithm uses a specific technique to cover transparency in the whole network and ensures a secure login. Every individual on the network waits for a particular amount of time, but that time limit is random. An individual who finishes their share of waiting time can get on the ledger for creating a new block.
Now, the question is whether individuals wait for the specific time they were assigned or not. The algorithm depends on a CPU requirement called Intel Software Guard Extension.
The Intel Software Guard Extension is responsible for running unique codes on the network. By using this system, PoET ensures that the winning is purely fair.
Byzantine Fault Tolerance (BFT)
The Byzantine Generals Problem was introduced in 1982 by Lamport, Pease and Shostak to ensure that malfunctioned components giving conflict information are managed within a system.
BFT manages different types of faults related to the Byzantine General’s Problem. The algorithm states that two nodes on the network can interact securely across the network, knowing that they display the same data.
In a peer-to-peer network, the consensus is reached if non-faulty or loyal nodes achieve a uniform agreement on their decision. In BFT, an incoming message is repeatedly sent to the other recipients of that message. All the nodes assume that repeating a message eliminates the issue of Byzantine nodes.
Practical Byzantine Fault Tolerance (PBFT)
Practical Byzantine Fault Tolerance usually focuses on the state machine. It gets rid of the Byzantine general problem by replicating the system. The algorithm starts with assuming that independent nodes can malfunction the network and possible failures in the system.
Also, all the nodes are arranged in a particular order. In PBFT, one node is selected as the primary node, while others serve as a backup plan. All the nodes in the system work uniformly and interact with each other.
In the PBFT consensus mechanism, every node wants to verify information found on the network, thereby avoiding unreliable information problems.
However, they can find out even if one of the nodes gets compromised and all nodes reach an agreement with majority voting.
Delegated Byzantine Fault Tolerance (DBFT)
Though the blockchain ecosystem usually follows the widely known consensus algorithms, Proof of Work and Proof of Stake, some try to impose advanced consensus systems. NEO is one of the popular blockchain platforms that has developed a new consensus protocol, Delegated Byzantine Fault Tolerance, similar to the DPoS.
Every user on the NEO blockchain can select delegates who represent their interests. Users holding the native cryptocurrency have a specific interest in the platform.
It works similar to a country’s government that has citizens, speakers and delegates. Citizens imply NEO tokens holders, delegates imply bookkeeping nodes, while the speaker is one of the randomly chosen delegates.
Citizens vote for delegates where every citizen can vote regardless of the tokens they hold. One of the delegates is selected randomly to become a speaker. The role of delegates is to listen to citizens’ demands, which are the different transactions that occurred on the network.
Delegates keep a tab on all transactions and record them on a ledger. The speaker who is randomly chosen proposes their block to verify a block. They send the block to all other delegates so that delegates could match their block with the speaker’s block and ensure validity.
2/3 of the delegates have to agree upon the block proposed by the speaker before it is validated and added to the network. In case 2/3 of the delegates do not agree, a new speaker is chosen and the whole procedure repeats.
Simplified Byzantine Fault Tolerance (SBFT)
The simplified Byzantine Fault Tolerance consensus algorithm works in a bit different way. In this mechanism, a block generator first collects all the transactions and authorizes them after batching them together in a new block.
All the network nodes have to follow specific rules applied by the block generator to validate transactions. Once the generator applies the rules, a block signer confirms them and adds their signature to it. Transactions get rejected if any of the blocks miss one of the keys.
Asynchronous Byzantine Fault Tolerance (ABFT)
Asynchronous Byzantine Fault Tolerance consensus mechanism represents the system’s ability to keep honest consensus in the network despite propagating invalid messages or malicious nodes failing.
Deterministic Byzantine cannot be asynchronous ultimately with unbounded message delays, yet guarantee consensus using FLP theorem. However, non-deterministic systems can reach an agreement with probability one.
Once we have understood different types of consensus algorithms, it’s time to discuss some of the blockchain platforms used to build blockchain apps with ease.
- Smart Contracts
A smart contract is a computer code that executes automatically when specific conditions are met. Ethereum blockchain platform is an open-source project that was developed specifically to introduce smart contracts. Unlike traditional contracts, smart contracts do not depend on any third-party or intermediary to bring trust. Instead, smart contracts are coded as the agreement between two or more parties. Since smart contracts are based on a decentralized system between all authorized parties, you don’t need to pay intermediaries, thereby saving time and conflicts. Settlements in various business processes can be made automatically and quickly with smart contracts on the blockchain.
- Sharing Economy
Companies like Airbnb and Uber are growing at a rapid pace and therefore, the concept of sharing economy has marked a success. However, users have to depend on an intermediary or centralized authority like Uber to access ride-sharing services. With peer-to-peer payments, the blockchain represents an opportunity to enable direct interaction between parties. Startups like SnagRide and BeeToken are becoming blockchain’s Uber and Airbnb, respectively. These platforms allow users to connect directly with each other instead of a centralized authority or third-party. It allows you to transact without any transaction fees.
- Supply Chain Audits
Socially-active consumers nowadays want to know that claims companies make about their products are real. Distributed ledgers offer an easy and quick way to backtrace the products within the supply chain in real-time at all locations. Blockchain-based timestamping of a date and location brings transparency to the supply chain ecosystem. For instance, there is a UK-based Provenance that provides supply chain audit services for consumer goods. The provenance project built on the Ethereum blockchain ensures that Indonesia’s suppliers have harvested fish sold in Japanese Sushi restaurants.
- Intellectual Property Protection
Digital information can be distributed and reproduced quickly using the internet. As a result, it has given web users a goldmine of freely available content. Copyright holders currently lose control over their intellectual property, thereby facing financial loss.Smart contracts come as a solution as they can protect copyrights and automate content sales, eliminating the risk of redistribution.
For example, Mycelia uses blockchain smart contracts to build a peer-to-peer music distribution system that allows musicians to sell their songs directly to audiences and producers’ license samples. Also, the platform enables users to make payments in fractional cryptocurrency amounts.
- Identity Management
Everyone nowadays performs various tasks on the internet ranging from shopping to sending payment online and communicating with people on social media channels. All such tasks require a digital identity and with increasing online interactions, data loss and thefts are emerging day by day.Every time a person enters their personal information on digital platforms, it gets stored on various unknown databases on the internet. Their information is shared without even their consent. However, blockchain can overcome such challenges by eliminating central authorities’ need and giving control over the digital identity to individuals.
Sharing multiple IDs for different purposes can lead to data breaches and privacy concerns. Blockchain provides the path to self-sovereign identity on a decentralized network that assures identity documents are verified and endorsed by permissioned participants on the network. It offers the control of digital identity in identity owners’ hands instead of third-party companies or intermediaries.
Ethereum is an open-source blockchain platform used for running smart contracts on a custom blockchain. It comes with an Ethereum Virtual Machine that offers the run-time environment to Ethereum based smart contracts. Each node on the network runs an EVM implementation. Ethereum is a public blockchain platform developed to provide restricted access versus mass consumption. The current version of Ethereum uses the Proof of Work consensus algorithm; however, it might change to the Proof of Stake algorithm in the ETH 2.0 version.
It has a native cryptocurrency called Ether, used to fuel the entire Ethereum ecosystem. A developer building the apps on Ethereum needs to pay fees in Ether to execute transactions and run apps on the network.
EOS is the robust blockchain architecture designed to offer vertical and horizontal scaling of dApps. EOS platform provides authentication, asynchronous communication, accounts, databases and application scheduling across multiple CPU clusters/cores.EOS blockchain platform can scale to millions of transactions in a second, allow quick deployment of dApps and eliminate user fees. It enables parties looking to launch blockchain apps to determine the permissions. As a result, developers can create both private and public blockchains using the EOS platform.
Stellar is an open-source distributed payment ledger that can connect payment systems, banks and people. It allows developers to build banking tools, mobile wallets and anything that involves payments. With the Stellar Consensus Protocol (SCP), the consensus can be achieved without relying on a closed system to record financial transactions. By pausing the network’s progress until an agreement is reached, SCP optimizes for safety over liveness.
Hyperledger Sawtooth is a blockchain platform for enterprises designed to build distributed ledger networks and applications.
By separating the core system from the app domain, Hyperledger Sawtooth streamlines the blockchain app development. It allows developers to specify the business rules of the applications in the language of their choice.
The platform is highly modular and allows applications to select the permissioning, consensus algorithms and transaction rules according to the unique business needs.
Hyperledger Fabric is a distributed ledger platform supported by a modular architecture to deliver high degrees of scalability, resiliency, confidentiality and flexibility. Unlike an open, permissionless system that allows unauthorized identities to partake in the network, Hyperledger Fabric is private and permissioned. It enrolls participants of the network through a trusted Membership Service Provider (MSP).
Hedera Hashgraph is a lightning-fast, secure and fair platform that provides a new type of distributed consensus. Built on the hashgraph distributed consensus algorithm, the platform can process hundreds of thousands of transactions per second in a single shared. As a result, its consensus latency is measured in seconds.
Using asynchronous Byzantine Fault Tolerance, the platform is resilient to DDoS attacks against the consensus algorithm and achieves a high-security level at scale.
Smart contracts on the Hedera Network offer an optional mechanism called “binding arbitration.” This mechanism states that the smart contracts deployed with a list of public-key arbitrators can be updated to add new features and fix bugs/issues.
Once the designated arbitrator agrees on smart contracts updation, the arbitrator’s keys approve the transaction with a new bytecode and the change is reflected.
At LeewayHertz, we have a workforce of blockchain developers helping businesses become transparent yet secure with blockchain technology.
All information will be kept confidential.
Launch NFT marketplace on Cardano and leverage the benefits of scalability, sustainability, interoperability and security of third-gen Blockchain
Cross-chain swaps enable the exchange of tokens across different blockchain ecosystems without any central authority or intermediaries.
NFTs are popularly being used to tokenize digital artworks, and then these NFTs are traded in NFT marketplaces to earn a profit.