What Is Blockchain Trilemma and How Could It Be Solved?
The blockchain trilemma is the most complicated problem to fix. This piece perfectly explains the blockchain trilemma and how to solve it.
Join the DZone community and get the full member experience.Join For Free
Social life, Career, and Sleep all strive to coexist in your life but struggle to live in harmony. The same concept is reflected in the blockchain trilemma.
The blockchain trilemma is a term that refers to the limitations of existing blockchains: scalability, security, and decentralization.
The blockchain trilemma is a design problem that has been around for decades. The essence of the problem is to find a way to store data securely in a small, light container without making the storage device too big or too expensive.
Blockchain trilemma is a set of three scenarios, as mentioned above. However, before getting into the thick of it, let us briefly overview decentralization, security, and scalability.
- Decentralization is the idea that power is shifted from a single company, government, or other large group and given to several smaller groups. For example, in the blockchain trilemma, decentralization gives people worldwide the power to govern using their computers (called "nodes") instead of having one centralized party control the whole network.
- Security entails that blockchain is safe but is not completely immune from hacking. For example, if hackers control 51% of the network, they can change how transactions happen to steal from the network.
- Scalability in the blockchain is the same as in business; it means how much a network can grow in the future while keeping the same transaction speed and output.
When scalability and decentralization work together, security is often put at risk. It is because security limits the changes that would help the decentralized network grow. Also, the amount of work it takes to run a decentralized network limits the scalability.
In this blog, you will be taken through the details of the blockchain trilemma and understand the different solutions available.
What Is the Importance of the Three Core Components in the Blockchain Trilemma?
Decentralized networks stress the importance of a blockchain to rely on a large enough group of stakeholders. Decentralization can be seen on different levels, such as the number of miners, full nodes, active developers, etc. It's important to remember that not all blockchains are decentralized similarly.
Pros of the Decentralized Network
Decentralization makes consensus possible without forcing users to trust a single entity. Decentralization is a good thing because it makes the system more stable. It keeps the network from being shut down, so anyone can use it.
Cons of the Decentralized Network
Decentralization slows down the network and adds time to process transactions. It's expensive because it adds redundancy, so it's only good for some applications.
Scalability is the ability of a blockchain system to support growth in size (more users, more use cases, and, in the end, more transactions) without affecting performance.
How can the number of people who can use a blockchain grow?
There are two ways (or a mix of these two ways):
- Cut down on the number of groups that check the transactions (compromise on decentralization).
- Cut down on the block time, making the network easier (compromise on the security).
Pros of a Network That Focuses on Scalability
It lets the network handle a larger number of transactions and can be useful in applications where security is a low priority, like social messaging apps.
Cons of a Network Focused on Scalability
As we said above, the ability to grow could mean less security. In addition, as a network grows, so must the consensus mechanism, which could lead to more centralization.
The capacity of a blockchain to preserve the irreversibility of transactions is its security. It achieves this by compelling network participants to waste resources to obtain incentives—the greater the expenditure of resources by network participants, the more secure the Blockchain.
In a recent Ethereum Classic (ETC) hack, the attacker reorganized over 4,000 blocks and double-spent about $1 million worth of ETC.
Why did the attacker achieve success? Because the expense of acquiring more than 51% of the whole network's hash power was negligible compared to the value taken. In a nutshell, the wealth contained within those 4,000 blocks vastly exceeded the resources deployed by network participants.
Pros of a Blockchain With an Emphasis on Security
- Enables big value transfers that are faster and less expensive than traditional value transfers.
Cons of Security-Focused Networks
- Requires more resources, i.e., a greater financial investment.
- The security of public blockchains is provided by network participants; greater security results in greater network effects that are difficult to recreate.
How the Interaction Among These Factors Causes the Problem
Ethereum was the most recent example of trilemma observed in action. Today, most decentralized apps (dApps) in the industry are based on Ethereum. Ethereum is the go-to resource for everything from decentralized finance (DeFi) protocols to non-fungible token (NFT) exchanges. As Decentralized applications gained popularity, Ethereum platform utilization increased.
But the scaling problem continues to grow!
The scaling problem has sadly gotten worse! Ethereum cannot scale over a certain limit. As a result, the transaction fees became prohibitively expensive for certain individuals to engage with the Blockchain. Increased Ethereum transaction costs are an example of the trilemma, in which scaling Ethereum would require sacrificing security or decentralization. In the case of Ethereum, decentralization and security were prioritized by limiting the number of transactions per second (Scalability). Users pay a premium transaction fee to miners to prioritize their transactions.
Given comparable security characteristics, we can conclude that Scalability is inversely proportional to decentralization. Let's say that two proof-of-work blockchains are the same in terms of how decentralized they are. We can think of the Blockchain's security as its hashrate. The confirmation time is shorter when the hashrate is higher, and security increases as scalability increases. So, at constant decentralization, Scalability and security are proportionate.
So, a blockchain can't be optimized for all three qualities simultaneously. Instead, it must use multiple profiles to make trade-offs. As a result, according to the blockchain trilemma, a public blockchain cannot achieve the necessary levels of decentralization, security, and Scalability.
What Different Strategies Have Been Developed?
Recently, numerous scaling strategies have been developed. For example, the Lightning Network is a component of the Bitcoin blockchain, whereas Ethereum is renowned for its Arbitrum Network.
Network lightning exploits the capabilities of smart contracts via private, off-chain channels on the main blockchain network. Off-chain routes allow faster and cheaper transactions. Most notably, by relocating transactions away from the mainchain, Lightning Network relieves the mainchain of its strain. Users no longer need to pay mining fees or wait for block confirmation over extended periods.
Arbitrum enables Ethereum users to settle off-chain, enhancing transaction speed and efficiency.
Arbitrum employs a distinct consensus process and data compression to expedite transactions while maintaining cheap transaction costs. In addition, it combines multiple smart contracts into a single object on its chain, making them significantly simpler to utilize.
Algorand is another cryptocurrency established in 2017 that claims to have solved the blockchain trilemma. Algorand employs Proof-of-Stake (PoS), in which only cryptographically selected validators may stake their tokens to verify the following block, which helps reduce the amount of validating nodes by several exponents, increasing transaction speed and block security.
What Are the Different Ways to Make a Blockchain Scalable?
Scalability is the biggest reason why Blockchain has yet to be widely used; thus, effective scaling solutions are needed for Blockchain. Many different kinds of solutions are being made. Surprisingly, there are different ways to solve this problem. Each solution category offers different ways to deal with the Blockchain's problems with scaling.
Layer 1 Solutions
The first or layer one solution modifies the blockchain network's basic software. Consequently, layer one solutions are typically called "on-chain scaling solutions" to characterize their operation.
Layer 1 solutions enhance the most crucial aspects of the blockchain network, such as increasing the block size limit or decreasing the time required to verify a block. Sharding, segregated witness (SEGWIT), and hard fork are the three most prevalent techniques for scaling a layer one blockchain.
Blockchain networks are enormous databases with many nodes that validate data. Each node must validate the entire network's transactions.
Sharding divides a blockchain network into manageable shards. Instead of confirming network data, nodes would validate shard data. This reduces node workload, improving system efficiency.
Blockchain sharding has three types:
- Network blockchain Sharding creates diverse shards. Furthermore, all shards execute transactions simultaneously, thus, improving blockchain network performance.
- Transaction Sharding groups transactions to be authenticated by shards.
- State Sharding divides the ledger into shards that store separate parts.
SEGWIT, which stands for "Segregated Witness," is another important addition to blockchains' first layer of scaling options. SEGWIT is an improvement to the Bitcoin blockchain network's protocol that changes how and where data is stored. It helps eliminate the signature data tied to each transaction and frees up more space and capacity for transactions.
It's important to know that around 70% of the space in a transaction is taken up by the digital signature that proves the sender owns and has access to the cash. So, if the digital signature is taken away, there may be more room for new transactions.
Rollups execute transactions outside the Layer 1 blockchain and post them once consensus has been obtained. This separates a significant portion of the Layer 1 performance processes. A significant aspect of the solution is the Zero-Knowledge Rollup (ZK-Rollup), which processes hundreds of off-chain transfers and uploads them subsequently. It accelerates the transaction speed and is one of the most effective methods for enhancing performance.
Solutions for the Second Layer of Scalability
Changes to the main blockchain network have a big impact on whether or not first-layer or on-chain scaling methods will work.
Off-chain scaling options comprise the second layer, or layer 2, of scaling options. Layer 2 solutions are different protocols built on top of the main Blockchain. In these types of solutions, transactions from the main Blockchain are "offloaded" to the secondary protocols. Layer 2 solutions can help with issues like space and network congestion. Popular second-layer solutions include state channels and off-side chains.
A blockchain nested within another blockchain exists in which Layer 1 blockchains delegate processing to a layered blockchain. Hence it is quite simple to develop bespoke processing solutions. It is considered one of the best and simplest methods for resolving the blockchain trilemma with minimal effort. The most notable instance of this is Ethereum Plasma, which utilizes a secondary blockchain anchored to the main chain and can provide proof of fraud to arbitrate disputes.
A state channel's transaction processing and the capacity of a blockchain network are delegated. Its nodes do not require validation, making it easier for a nearby resource that fulfills its requirements. The Layer 1 network merely necessitates that the channel's final state be stored on the Blockchain.
A sidechain is a separate blockchain connected to the primary Blockchain by a two-way peg. It boosts the interoperability and processing capability of the existing Blockchain. Bitcoin's network, for instance, can use sidechains to execute transactions even more quickly. This is one of the many ways people increase Bitcoin's performance, even though it theoretically shouldn't be feasible.
With the ever-increasing demand for blockchain applications, more businesses are showing interest to move onto decentralized networks. But the blockchain trilemma poses huge challenges to the scalability of these blockchain networks. Even though several potential solutions have been introduced to improve blockchains' scalability, not many of these solutions are successful in providing much-needed relief. Various Blockchain scaling solutions, including layer one solutions and layer two solutions, are in-practice as viable answers to blockchain scalability issues.
Want to create a future-proof blockchain solution for your business but are stopped by a lack of rightly skilled expertise? No worries. An agile software development agency provides solid scaling solutions for reducing blockchain latency with the help of knowledgeable and talented developers.
Opinions expressed by DZone contributors are their own.