Blockchain — The Backend Evolution Powering Web 3 (Part 2)

Matti Jeremiah
6 min readSep 15, 2022

In continuation of the previous article “Blockchain — The Backend Evolution Powering It”, If you haven’t read it, click this link https://www.linkedin.com/pulse/blockchain-backend-evolution-powering-web3-matti-jeremiah/

After the article, I got questions centred around “What is the difference between the current Web2 backend and that of Web3?

More so, I think there is a need to elaborate more on the consensus process that leads to the production of the next block on the blockchain network.

Without further ado, let's dive in!

The present-day internet framework, known as Web2, operates on a centralized network owned and controlled by large institutions.

Everything we do on the internet today is stored in a central database located somewhere around the world.

For example, if the app you use uses Amazon Web Services (AWS). All your information and transaction records will be stored on an AWS server in the United States.

Only the app developer has direct access to such information.

Let me bring this home using a few examples.

Social media

Most of us are registered on one or more social media apps. For this article, let's take Facebook.

As a Facebook user, all your personal information, pictures, and other details are stored in Facebook’s database. Facebook gathers all this information about its users and sells it to companies interested in advertising on its platform, making you the product.

So the big question is, “How is blockchain changing this current model?”

Blockchain, also known as distributed ledger technology (DLT), is evolutionizing this current backend by ensuring information is not stored in a single location but rather on many distributed computers called nodes worldwide.

Not only are these records stored in a decentralized manner, but they are also publicly available for anyone to verify. Therefore, no entity has autonomy over those data.

Finance

When we need to send money to our loved ones or business associates, we typically have to go through a lengthy process. We have to start by opening a bank account with a financial institution near us. After that, we have to deposit our money into that account and then use the bank’s services to transfer that money to the intended recipient. The bank not only holds our funds and personal information but also serves as a middleman, making it necessary for us to rely on them to transfer our money.

However, blockchain changes this entire process. First of all;

Blockchain technology revolutionizes the way we transfer money by eliminating the middleman, in this case, the bank. With blockchain, users can make peer-to-peer transfers in a trustless manner without relying on a central authority. This means that users can have complete control over their funds without giving access to anyone or any entity.

Moreover, blockchain technology offers a significant advantage over banks when it comes to transferring funds. While banks charge high fees and take time to process transactions, blockchain allows instant transfers at any given time, including weekends. Furthermore, transaction fees are considerably lower with blockchain technology.

These examples illustrate the fundamental differences between the web3 backend and that of web2. By leveraging blockchain technology, we can eliminate the need for intermediaries and enjoy faster, cheaper, and more secure transactions. This is what makes blockchain the evolution of the backend, and this is just the beginning.

To the next big question: if blockchain keeps all this information and transaction records decentralized, how do we trust the integrity of these computers and, by extension, the records stored on them?

Integrity, in this case, means the information cannot be tampered with or altered. That’s where the consensus mechanism comes in.

In a blockchain network, each block of data is confirmed through a consensus mechanism. This means that all nodes (or computers) on the network must agree before a new block is formed.

Here’s how it works: when a transaction occurs (e.g., MOJ transferring $100 to John), it is broadcasted to all computers on the network. Each computer then attempts to solve a mathematical calculation called hashing. The computer with the correct answer immediately broadcasts it to the other computers, which all agree and store the transaction record on their systems. This agreement process is called consensus, and the transaction’s conversion to a set of numbers is also called hashing.

By relying on this consensus mechanism and the cryptographic security of hashing, blockchain ensures that its records are trustworthy and tamper-proof. This is what sets it apart from centralized systems that require a single point of authority for validation.

There are two significant types of consensus mechanisms which are;

  • Proof of Work (PoW)
  • Proof of Stake (PoS)

Let me break down these two primary consensus mechanisms into a more straightforward form.

Proof of Work

Using our initial example, MOJ wants to transfer $100 to John. Here is how the consensus flow on the proof-of-work works.

In the proof-of-work consensus mechanism, the transaction is broadcasted to all the computers on the network. The computational power of the participating nodes is used to validate transactions and create new blocks in the blockchain. Each node competes to solve a cryptographic puzzle by running complex algorithms, and the first node to solve the puzzle adds the next block to the chain. This is called “mining,” and it requires a lot of computational power and energy. In PoW, the reward for validating transactions and mining blocks is paid out in the blockchain’s native currency.

Another way to see it is to imagine a mathematics quiz competition where we have ten contestants. The rule of the competition is that once a mathematical quiz pops up, all the contestants are required to try to solve the problem immediately and simultaneously.

The first contestant to solve the quiz hits the buzzer in front of them, indicating to the other participants that they have the answer. The other participants check and confirm he’s right, then records the quiz as solved and move on to the next question. The contestant who was the fastest to solve the quiz gets a reward in the form of coins.

This is how the proof-of-work consensus mechanism works. At the same time, all computers must use computation effort (The Work) to solve a mathematical problem called hashing and immediately share the answer with others. Others check and agree with the computer.

The Bitcoin blockchain is one of the networks that use this model, and computers are rewarded with Bitcoin coins.

While PoW has been a popular consensus mechanism used in many blockchain networks, it has faced criticisms due to its energy-intensive nature. The mining process consumes a significant amount of electricity, leading to high carbon emissions and a negative impact on the environment.

Proof of Stake

Using the maths quiz example shared earlier. Imagine each contestant in the mathematics quiz competition is required to stake some money down before they can participate in the quiz. Then when a quiz pops up, a system is set in a place where it randomly selects a participant to answer the question. However, the probability of selection is based on the amount staked by the participant.

For example, let us assume we have 10 participants who staked varying amounts. The participant with a higher staked value has a high chance of being randomly picked over the others who staked lesser.

Once the participant solves the quiz, the answer is shared with other participants to verify it is correct, after which they all record it, thereby creating a new block on the network.

In the blockchain context, the proof-of-stake consensus mechanism, participants are selected to validate transactions based on the amount of cryptocurrency they have “staked” or held in their account. In other words, the probability of being selected to validate transactions increases with the amount of cryptocurrency a node has “staked.” This reduces the need for extensive computational power and energy that is required in PoW.

In the PoS model, validators are chosen by an algorithm based on their “stake.” They are then responsible for validating transactions and adding them to the blockchain. Validators are incentivized to act honestly because they have staked their own cryptocurrency. If they validate fraudulent transactions or create new blocks that do not meet the network’s requirements, they risk losing their staked cryptocurrency.

Probability of Selection on a Proof of Stake

PoS is seen as a more energy-efficient and cost-effective consensus mechanism compared to PoW. It has a significantly lower carbon footprint and requires less computational power to operate. Because of this, PoS has gained a lot of attention in recent years, and many blockchain networks, including Ethereum, are planning to migrate from PoW to PoS.

In summary, while PoW uses computational power and energy to validate transactions and create new blocks, PoS relies on the amount of cryptocurrency a node has staked to validate transactions. Both consensus mechanisms have their pros and cons, and the choice of which to use depends on the network’s requirements and goals.

--

--