Blockchain scalability trilemma
The blockchain scalability trilemma is one of the essential unresolved blockchain issues.
Vitalik Buterin first drew attention to this question. The main idea of this assumption is that the blockchain cannot excel at all three following properties simultaneously:
Green: a balanced state of three conditions.
Red: robust security, but limited decentralization and scalability.
Blue: robust scalability, but limited security and decentralization.
Black: robust decentralization, but a lack of scalability and security.
Gray: fully decentralized system with minimal security and scalability.
Violet: a balance between security and scalability with a complete disregard of decentralization.
Decentralization is the absence of a single controlling authority. This also means that there is no single point of failure in the system. Decentralization is determined numerically by the number of miners or validators.
Scalability is the number of transactions that a network can process. This also includes the speed of processing transactions and the costs associated with the verification of these transactions for the users.
Lack of scalability increases transaction costs and processing time.
Most often, security is defined as the cost of overriding the network. For example, conducting a 51% attack on an Ethereum or Bitcoin network would cost you tens of billions of dollars.
First-generation blockchains (Bitcoin, Ethereum) focused on security and decentralization to the detriment of scalability. When the speed of 7 transactions per second ceased to satisfy even the most devoted blockchain fans, the developers started working on scalability while building solutions on top of an existing system, which increased the potential of certain security drawbacks. This is how the ideas of sharding, Lightning Network, and Plasma appeared.
The next-generation blockchains (EOS, NEO) are slightly moving away from decentralization. Not all of the nodes in such networks coordinate with each other. One of the examples would be 21 powerful nodes with high bandwidth coordinating the blockchain activity. Since validators can be changed by voting, the network is still not centralized. Of course, 21 computers are not the same as 10,000, but the upside of this approach is reflected in the average speed of 3,000 transactions per second.
Some solutions, like IOTA (MIOTA), abandoned the use of the blockchain and use oriented acyclic graphs (DAG) to increase scalability.
Lightning Network is a second-layer payment protocol (add-on on top of the main blockchain). This solution allows for instant transactions between participating nodes.
The principle of the Lightning Network operation is based on the use of payment channels where, in order to conduct a transaction, participants must place funds in advance. A payment channel is a wallet with a multisig function, which stores a certain number of bitcoins. Coins can be provided either by both parties or by one of them.
The channel is opened by means of a regular bitcoin transaction, which means that the transaction data is recorded on the blockchain. However, all future transactions are carried out within the channel and occur directly between participants without keeping any data on the blockchain. The next input into the main blockchain does not take place until the channel is closed.
Everything happens on top of the main Bitcoin network, and, therefore, the Lightning Network does not utilize the Bitcoin security model provided by the miners.
Sharding is basically a method of dividing massive databases into digestible pieces called shards. By definition, a shard is a small part of something whole.
The integration of this concept into the Ethereum blockchain is a very complicated and technically difficult matter. The network is divided into many parts, called shards; each shard contains a certain part of transaction data. Using this technology, the Ethereum community is trying to move away from its dependency on full nodes. Sharding will take place exclusively at the protocol level. After the implementation of the technology, each node will store a subset of the data and bear the responsibility of checking a specific set of transactions. Not all operations will be sequentially performed on the blockchain due to the non-parallelizable nature of the Ethereum virtual machine. When a node requires information that is not stored in a certain block, it will search for a node in possession of the necessary data. This is the initial condition for the interaction between shards. Currently, the Ethereum blockchain is able to accommodate up to 8 transactions per second. After sharding is activated, network throughput will increase to thousands of transactions per second and will significantly reduce the overall size of each node. However, the process cannot be called trustless, and the nodes won’t be independent. Thus, in order to increase scalability, it is necessary to sacrifice security to a certain extent.
The core idea behind Plasma is to create a sidechain, which will interact with the main chain as little as possible. This type of framework is designed to work in the form of a blockchain tree, which is hierarchically organized in such a way that many minor chains can be created on top of the major one.
The Plasma structure is built using smart contracts and Merkle trees, which allows you to create an unlimited number of small chains, which, in fact, are miniature copies of the main blockchain. A large number of even smaller chains can also be created on top of each miniature chain, and this is how a tree structure is formed.
In fact, each miniature Sidechain is a customizable smart contract. This means that the chains can coexist and operate independently.
The solution to the scalability problem is a priority for many blockchains. The existing solutions look raw, and the concept of increasing scalability by reducing security is somewhat dubious.
Nevertheless, the hope is that some solution with the perfect balance between scalability, security, and decentralization will be found.