What is Scalability and How Are Blockchains Solving Scalability Issues?
Key Questions Answered
What Is Scalability?
Blockchain is known as a public ledger that records transactions without a third party. The transaction records stored on the blockchain are verified by nodes. However, blockchain technology has issues with scalability where some blockchains take a long time for transactions to be validated.
A blockchain’s TPS (transactions per second) is generally lower than a centralized institution like Visa. For example, Bitcoin (BTC) can only handle 4.6 TPS while Visa can verify transactions at a higher rate (17,000 TPS). Bitcoin’s low TPS results in the blockchain’s inability to handle large amounts of transactions, which leads to slow transactions.
This issue is further exacerbated by the Bitcoin blockchain’s capped block size of 1 MB. Typically, a small block size limits the number of transactions processed by each block. Moreover, for Bitcoin, every time the blockchain wants to validate transactions, it has to download all the transaction history of the chain. Hence, blockchain scaling becomes more and more time-consuming as the size of the blockchain grows and takes up more memory space.
Unfortunately, Bitcoin and other blockchains cannot scale up by simply adding nodes to the network. Each blockchain typically has its own performance limits. As a result, several scalability solutions are established according to the blockchain’s needs to improve network performance. According to the figure below, the available scalability solutions are divided into read performance, write performance, and storage. Different scalability solutions are also offered depending on the different layers of the blockchain (refer to figure below). Due to the complexity of the available scalability solutions, only scalability solutions for the data layer are discussed, which include on-chain and off-chain solutions.
Overview of blockchain scalability solutions (Source: Elsevier)
What Are the Factors Causing Scalability Issues?
Many developers have been looking to scale the blockchain but they are met with a trilemma. The trilemma is that every blockchain has difficulty maintaining security, decentralization, and scalability altogether. For example, for private blockchains, scalability and security can be achieved but with a trade off in decentralization. On the other hand, directed acyclic graphs-based (DAGs) blockchains can realize scalability and decentralization, but the networks are less secure. Then, there are public blockchains that can retain security and decentralization but with a trade off in scalability.
Scalability issues discussion rate (Source: MDPI)
Research has shown that throughput is highly discussed for blockchain scalability (figure above). Additionally, these factors that affect scalability are also interdependent. For example, the consensus performance or block size can impact throughput and latency. The factors above are detailed as below:
- Throughput: Throughput refers to the total transactions handled by the protocol per second (TPS). Throughput is also a metric that people generally refer to when comparing blockchain scalability. As mentioned previously, Visa as a centralized institution has extremely high TPS compared to a decentralized blockchain like Bitcoin, meaning it can handle large amounts of transactions efficiently.
- Latency: Latency is also known as transaction finality, meaning the amount of time needed to reach transaction validation. A lower latency would typically make the transaction validation process more efficient.
- Block size: Block size refers to block storage. For example, the Bitcoin block size is 1MB for transaction storage. Bigger block sizes store more transactions which enhances throughput. However, more transaction processing would require high computational energy. A blockchain can also refuse blocks that are overcapacity.
- Nodes: Nodes within a blockchain can be divided into full and partial nodes. Usually, more nodes are required when the number of transactions is high. Therefore, the number of nodes plays a part in affecting throughput and latency, which reflects a network’s scalability.
- Storage: Storage is the blockchain’s total capacity. The storage growth is highly associated with nodes and transactions. Full nodes would require more storage than partial nodes. Although partial nodes require less storage, it can increase blockchain workload, affecting throughput.
- Computation energy: Computation energy is the energy used for mining. The energy consumption is different and is dependent on the consensus model. For example, a blockchain running with the proof of work (PoW) consensus model consumes more energy than a blockchain with the proof of stake (PoS) consensus model.
- Cost: The cost refers to the total cost for transaction validation. Miners can choose to validate transactions that allow them to earn higher fees. Therefore, the time taken to validate transactions that provide lower fees may take a long time.
What Are the Available Data Layer-based Scalability Solutions?
The available scalability solutions were designed to resolve issues related to block generation time, transaction costs, and memory (storage) issues. Based on these issues, subgroups for on-chain scalability and off-chain scalability solutions are created. Additionally, blockchain scalability can also be developed for blockchain layers, including the network layer (Layer 0), on-chain (Layer 1), and off-chain (Layer 2). Solutions on Layer 1 and Layer 2 are most common.
On-chain scalability modifies existing blockchain elements. For example, Bitcoin Unlimited increases the block size as an on-chain scalability solution. However, a block size increase would lead to less security because miners could dismantle the blocks. Miners can also dismantle the blocks in a short period because the blocks are bigger and more centralized. Subgroups of on-chain solutions include block data reduction (soft fork), bigger block size (hard fork), sharding (horizontal scalability), and DAG. The latter two of the subgroups are discussed below:
- DAGs-Based Scalability: Directed acyclic graphs (DAGs) validate the transactions with previous transaction records. DAG does not utilize miners and user stakes for transaction validation, thereby decreasing network fees. Additionally, DAG nodes can achieve 10,000 TPS and eliminate double-spending An example of a DAG-based project is IOTA (MIOTA). Furthermore, a bigger DAG-based network will not hinder the transaction validation rate. Therefore, DAG can achieve decentralization and scalability at a low fee. However, DAG has weaker security against malicious attacks.
- Sharding: Sharding splits the transactions into multiple shards so that multiple nodes can process the transaction to reduce processing time. However, the blockchain has to provide security to the shards from malicious validators. Additionally, sharding can only efficiently work for transactions that are within the original shards. Examples of blockchains that use this solution include Ethereum (ETH) and RapidChain.
Off-chain scalability validates transactions outside of the mainnet. Additionally, only the final state is communicated to the mainnet, also known as state channels. For instance, the Lightning Network for Bitcoin only charges a fee after the user is done using the off-chain channel for the transaction. As a result, blockchain transaction fees are reduced. There are also other subgroups under off-chain solutions. Some of them are detailed as follows:
- Side-chain scalability: Side-chain scalability enables a two-way asset transfer between a parent chain and a side chain. A side chain uses a simplified payment verification (SPV) to validate transactions. Moreover, an asset transfer from a parent chain to a side chain would rely on an output. The output with transaction information can only be unlocked by the SPV proof from the parent chain or side chain. Additionally, the SPV proof communicates side chain validators to the parent chain. For example, the Loom Network (LOOM) uses side chains for their blockchain.
- Child-chain scalability: A child-chain is linked to its parent-chain’s nodes. Each child chain processes transactions with their consensus protocol. The parent chain records the transaction finality communicated by the child-chain. Additionally, the parent chain also protects the child-chains. An example of a project that uses child-chains is Ethereum Plasma.
- Interchain scalability: Interchain replicates the local area network (LAN). It links multiple blockchains together via a common protocol that will be compatible with all networks. Interchain will involve subchains and nodes. Consensus methods may vary. For example, Cosmos (ATOM) uses interchain along with Practical Byzantine Fault Tolerance (PBFT) and PoS for consensus.
Structure of interchain (Source: Elsevier)
What Is the Outlook for Scalability?
The development of scalability solutions will mainly drive towards a balance between decentralization, scalability, and security. In terms of on-chain scalability, changes are intended for the chain’s codebase, which can result in a hard fork or node upgrade. However, the execution is difficult. Therefore, Segwit or soft fork is the more viable solution. The reason is that signature data for transaction validation takes up a majority of blockchain space. Nevertheless, this method trades off security. Another solution is sharding, which splits a blockchain into multiple shards to enhance scalability. Since sharding splits a network into multiple parts (shards), the network has potential to process a high number of transactions. Latency is less likely to be an issue from shards processing the transaction at the same time. For off-chain solutions, projects can achieve TPS of above a million with the Lighting Network and potentially even infinite TPS with Plasma. The incorporation of scalability solutions may help solve the scalability issues faced by many projects, which may boost adoption as users are no longer plagued by slow transactions and high network fees.
Blockchains face scalability issues because of the characteristics of its underlying technology, such as the number nodes and capped block size. As a result, some blockchains have low TPS and cannot handle large amounts of transactions, leading to slow transaction speed and higher network fees. As a result, other blockchains are adopting different scalability solutions. However, the factors that affect scalability have an interdependent relationship, making scalability difficult to achieve because there will be some sort of tradeoff. Examples of the available scalability solutions built on the data layer include on-chain and off-chain scalability solutions such as DAG, sharding, side-chain, and so on. Each of these scalability solutions will have their own advantages and disadvantages, which essentially revolve around the blockchain trilemma. Overall, the development of blockchain scalability solutions seems to be heading towards the direction of sharding and off-chain payment channels.