Buterin, one of Ethereum’s co-founders, is credited with the term “Blockchain trilemma” about the widely held belief that there are three desirable blockchain qualities, namely security, decentralization, and scalability, which cannot coexist.
Public blockchains are currently restricted to prioritizing two at the cost of sacrificing one, hence the trilemma. This article focuses on public blockchain security, one of these three pillars, and will take a closer look into what it is and how it is achieved.Â
What is a blockchain?
To understand security, one needs to understand what a blockchain is and how it functions. In essence, a blockchain is a ledger. Traditionally, a ledger is a collection of accounts in which transactions are recorded. In the case of a blockchain, this ledger is distributed between participating computers, called nodes, hence the term ‘distributed ledger.’
Consensus
Transactions are validated and agreed upon by a consensus mechanism via several nodes unique to each blockchain design. Several consensus mechanisms have been designed for blockchains, of which Proof-of-Work (PoW), Proof-of-Stake (PoS), and Delegated-Proof-of-Stake (DPoS) are perhaps the best known. This is necessary to ensure honest transactions due to the users being anonymous. Every validated transaction is put into blocks. Validators are then rewarded to incentivize block production.
What is a block?
Information is grouped in what is referred to as a block. When a block is filled with this information, it is linked to previous blocks forming a data chain using cryptography. Once a block is recorded, it becomes immutable and part of its timeline. This is an essential component of security.
Hacking a network
If a hacker alters the blockchain to steal money, the network rejects it because it needs to match the data chain shared with every node. This fails if the hacker controls at least 51% of the network’s computing power, as this puts the majority of the blocks in agreement with the tampered block.
Blockchains are intentionally designed to make this very expensive and difficult to achieve, and the higher the user base, the less likely this is to happen. Additionally, the game theory applied to blockchains is intended to make simple transactions more profitable than dishonest ones.
Different blockchains: Different Trade-offs Â
In the case of Bitcoin, its PoW consensus mechanism requires nodes to solve a mathematical problem within ten minutes, which needs substantial computing power. This is both time and energy-consuming, intended to make a 51% attack extremely expensive. However, incidents in the past have happened on Ethereum Classic, ZenCash, and the Verge networks. Hackers can stop block verification, and they can also double-spend the coins.
On PoS chains, coins need to be staked to be eligible to validate blocks. If a dishonest block is verified, the staked coins are lost. This is the consensus mechanism Ethereum has now switched to, making it more environmentally friendly since it requires far less electricity consumption than PoW. In this case, there is no incentive to disrupt the chain since there can be no double spending, and the initial investment is lost.Â
The DPoS consensus mechanism requires holders to vote for the delegates or delegate to other users with their voting power. The more tokens one has, the more voting power. Therefore, token holders decide who will mine new blocks, and the best miners are rewarded. The BNB chain uses this consensus mechanism. In this case, reputation and income serve as incentives to maintain honesty in block production. However, if delegates combine their power, organizing a 51% attack is easier.
Why layer 2s?
Remaining decentralized requires applying the consensus above mechanisms to validate and store the blocks. While this enhances safety, with an increase in everyday users, it can create bottlenecks limiting scalability. PoW is hailed by Bitcoin maximalists as one of the safest consensus mechanisms, although it is also the slowest of them all. PoS requires less time but does it compete with traditional centralized systems? Ultimately, mass adoption requires efficiency and an improvement over current mainstream centralized ones.
Layer 3’s?
To tackle these issues, many are looking at layer 2s, and Buterin has lately also spoken in favor of layer 3s to enhance Web3 performance by applying another layer over layer 2. This nascent technology is still new and young. Still, the future looks equally bright as it is exciting, as innovations bring about more unique solutions and technology, with the hope that these blockchain challenges can eventually be overcome.