June 25, 2022

Eating blockchain

I've already talked about blockchain technology in general terms. The average person encounters it only in the field of cryptocurrency and studies very little about the technology itself, focusing on the financial side. But blockchain is the foundation of crypto, so we will delve a little deeper into this concept...

Types of blockchains

Basically, blockchains are divided into private and public.

Private blockchains.
Private blockchains are blockchains in which the creation of blocks is centralized and all rights to conduct such transactions belong to a single organization. The "general public" can only read the information.

Such blockchains are mostly used by banks and companies with registries and accounting systems because of their controllability and predictability.

Private blockchains have a number of advantages over public blockchains:

1) Low cost of transactions because validation is performed by trusted and high-performance nodes instead of tens of thousands of user devices, as in the case of public networks.

2) A private blockchain can be configured in such a way that the number of transactions per second is much higher than that of public networks.

3) Simplified update process, due to centralized control over the blockchain.

Private blockchains have the potential to replace many of the centralized businesses that now exist. They could become the basis for blockchain innovation in services that use registries or financial accounting systems.

Public Blockchains.
These blockchains are familiar to anyone who has ever used cryptocurrency. They are used in Bitcoin, Ethereum, Solana and other popular networks.

Public or public blockchains can be read by any user, each of whom has the right to form transactions. Transactions are protected by consensus mechanisms such as Proof-of-Work (discussed in more detail below).

In addition, public blockchains have network effects. This is when the value of a project increases when it interacts with other projects on the blockchain. The first users of apps built on a public blockchain are often users of other apps on the same blockchain.

For example, a mobile wallet running on a public blockchain can add a feature for that app to interact with other distributed apps on the same blockchain, greatly expanding its user base.

Types of consensus mechanisms

The consensus mechanism is the procedure by which all nodes in the network reach a common agreement on the current state of the blockchain. In this way, consensus algorithms ensure reliability in the network and establish trust relationships between unknown partners.

More than 90% of the cryptocurrency market is based on three basic consensus mechanisms.

- Proof of Work (PoW)
- Proof of Stake (PoS)
- Delegated Proof of Stake (DPoS)
However, we will look at some of the other mechanisms as well.

Proof of Work (PoW)
The basic idea of this algorithm is to solve a complex random mathematical problem generated by a blockchain and produce a solution. The peculiarity of this algorithm is the complexity of solving the problem, but it can be easily double-checked. This mathematical puzzle requires a lot of computing power and thus the node that solves the puzzle gets to the next block before the others.

PoW tends to make attacking the network excessively expensive and requires high energy input.

The disadvantages of this mechanism are generally considered to be limited scalability and low throughput.

Proof of Stake (PoS)
This is probably the most common alternative to PoW. Even Ethereum plans to move from PoW to PoS consensus in the near future. In this type of consensus algorithm, instead of investing in expensive hardware to solve a complex puzzle, validators invest in network coins by blocking some of their coins as stakes (staking).

All validators then start checking the blocks, betting on the block that they think can be added to the chain. Based on the blocks added to the blockchain, all validators receive a reward proportional to their bets. Eventually, a validator is selected to generate a new block based on its economic share of the network.

The pros of this mechanism are considered to be the increased scalability at a basic level and the potential energy savings compared to PoW. The disadvantages include the risk of centralization, which in turn leads to reduced security.

Delegated Proof Of Stake (DPoS)
The DPoS mechanism is an evolution of PoS, but is essentially a different type of consensus algorithm that relies on voting systems. Instead of individual nodes being randomly selected to perform verification, token holders use their means to vote for some of the trusted nodes. They are responsible for checking transactions, maintaining the network.

DPoS can be compared to a representative democracy - participants vote for a trusted representative to protect the network on their behalf. Voters can replace delegates if they act against the interests of the majority of stakeholders.

The advantages of DPoS are high scalability and a more even distribution of coins between validators, and the disadvantages are insufficient security and a persistent tendency to centralize the network.

Proof of Elapsed Time (PoET)
PoET is widely used in many private and corporate blockchains, in particular Hyperledger. In this algorithm, every validator in the network gets a real chance to create its own block. All nodes do so by waiting a random amount of time and adding confirmation of their wait to the block.

The created blocks are sent to the network for review by the rest of the participants. The winner is the validator with the lowest timer value. There are additional checks in the algorithm to prevent nodes from always winning the election by generating the lowest timer value.

The pluses are high efficiency and low resource consumption, the minuses are low security and dependence on a third party developing the algorithm.

Proof of Authority (PoA)
PoA is a reputation-based consensus algorithm that uses the identity and reputation value of block validators. PoA is similar to PoS, except that validators put their reputation instead of coins. Trusted nodes/validators are chosen by network leaders, making PoA useful only for private blockchains. Used in VeChain Thor, Microsoft Azure and others.

Pros: high transaction speed, scalability, low network maintenance costs.

Cons: denial of decentralization, possible malicious behavior of network participants, which is almost impossible to prevent.

Proof of Capacity (PoC)
In the Proof of Capacity consensus, validators should invest their hard drive space instead of investing in expensive hardware or burning coins. The more means of validating hard drive space, the better chance they have of getting to mine the next block and get rewarded for the block.

PoC is much more energy efficient than PoW. PoC is used by Filecoin, Storj, Burstcoin projects. The obvious pluses of this approach are energy efficiency, the disadvantages are lack of security due to susceptibility to attacks.

There are also other consensus algorithms such as:

  • Proof of Activity
  • Proof of Weight
  • Proof of Importance
  • Proof of Participation
  • Proof of History
  • Leased Proof of Stake
  • Proof of Burn
  • Practical Byzantine Fault Tolerance

But their use at the moment can rather be attributed to special cases and innovations.

Forks

Fork is a change in the rules of the network by which a block in the blockchain is recognized as genuine, a kind of separation, hence the name - from the English fork, which means "fork"

There are two types of forks in the world of digital coins: softfork and hardfork.

Soft fork is a soft form of separation, in which users of the old version can interact with users of the new version. Softfork is more of a deep upgrade than a revolutionary change. After it is done, a new currency is unlikely to appear.

The hardfork involves introducing major changes to the blockchain that divide the chain into two separate chains that cannot communicate with each other.

A prime example of a hardfork is the Ethereum fork, when the cryptocurrency was split into two coins - the primary Ethereum and an additional Ethereum Classic.

Sometimes a hardforward can take place against the backdrop of serious disagreements among community members. This, for example, happened with the cryptocurrency Bitcoin Cash, which in November 2018 "split" into two branches

Also a fork is a borrowing of the open source code of one project to create a new one. For example, Binance Smart Chain is a fork of Ethereum. And all Ethereum forks, just like it, work on EVMs and support the same smart contract format, so one Dapp can be run on multiple EVM networks almost without any changes.

The Ethereum Virtual Machine (EVM) is a software platform that developers can use to create decentralized applications (DApps) on Ethereum and similar networks.

Blockchain applications
In addition to crypto, blockchain is used in many areas:

Banking
Blockchain makes all processes in the banking industry safer, more reliable and transparent. Money transfers, securities transaction settlements, KYC, and the routine work of bank offices - all these operations now take place with the implementation of this technology.

Blockchain can reduce banks' costs by up to 50%. This was announced back in 2017 by analysts at Morgan Stanley. According to them, blockchain could optimize infrastructure, drastically reduce costs and provide the necessary increase in bank profitability. Many banks, despite their inherent conservatism, would be dangerous to underestimate the potential of this technology.

IDs.
Such IDs are a translation of a person's personal data onto blockchain, creating his/her digital profile. There is a large list of public services that can be accessed via blockchain, and there are statistics from advanced blockchain countries (Estonia, some emirates of the UAE). The use of blockchain by an active citizen may become commonplace in the lifetime of the modern generation.

Both in Russia and in the West, states in recent decades have been actively looking for ways to optimize their administrative activities. A good solution for this would be to move all routine and archaic processes to blockchain.