Blockchain technology has emerged as a game-changing innovation, transforming multiple industries and the way people transact and exchange data. With blockchain, users can send money anywhere in the world with no intermediaries, and so much more. However, blockchains aren’t known for their scalability.
For example, Bitcoin blocks can only store ~2MB of data per block, which are mined roughly every 10 minutes, giving the Bitcoin blockchain an average throughput of 7 transactions per second. What does this mean in practice? Waiting ten minutes at a coffee shop for your payment to go through before you can leave to work with a bagel and latte. As you can imagine, that’s a problem if you want to onboard the mainstream. And we are getting closer to that every day.
In 2022, the Ethereum blockchain recorded more than 7.75 million smart contract deployments, of which about 4.6 million contracts were in the last quarter of the year. Bitcoin has nearly 1M daily active addresses. The space is growing quickly, and to meet growing demand, we have to turn to blockchain scalability solutions in order to provide cost-efficient and timely transactions. Without both, the user experience is simply too poor for adoption to succeed.
So how do you scale a blockchain? We thought you’d never ask.
What is Blockchain Scalability?
In the world of Web3, scalability refers to how well a blockchain network can manage a large number of transactions with speed and efficiency. Scalability is closely related to throughput in this context, which measures the volume of transactions that can be processed at a given time, as well as latency, which is how fast an individual transaction is confirmed.
In general, blockchains aren’t very scalable compared to centralized alternatives—that is the nature of a decentralized system. This tradeoff between decentralization and scalability is part of what is known as the blockchain trilemma.
As additional users transact on a network, scalability becomes critical. How do you create a blockchain ecosystem that can support millions, and eventually billions, of users? You can’t just increase block size because then you increase latency: larger blocks means larger files, which means it takes longer for new blocks to propagate throughout the network. You aren’t necessarily increasing scalability. Let’s take a look at the various blockchain scalability solutions that are being explored today.
Layer 1 Solutions for Blockchain Scalability
“Layer 1” is a term to describe base blockchains, such as Bitcoin, Ethereum, Solana, and more, and there is a lot of work being done to optimize scalability on these L1 networks. These solutions focus on enhancing the underlying protocol, making it more efficient and capable of handling a larger number of transactions and processing those transactions quickly. That work includes areas like:
Improvements to Blockchain Protocols
Blockchains (and foundational tech in general) ossifies, meaning it becomes more resistant to change over time, but we are still in the early days of crypto, and blockchains are still being upgraded in meaningful ways, including Bitcoin.
For example, the SegWit upgrade in 2017 roughly doubled Bitcoin’s block size, enabling the Bitcoin network to process more transactions, and the upcoming nakamoto release for the Stacks network will offer faster blocks, increasing the scalability of the network.
In fact, Stacks itself is a Bitcoin L2, helping increase Bitcoin scalability and creating a smart contract layer for Bitcoin, but we’ll get back to layers in the next section. For now, note that one area of scalability research is improvements to existing blockchains.
New Blockchain Protocol Designs
Since the launch of Bitcoin and Ethereum, many projects have iterated on blockchain design to offer better scalability. In particular, some blockchains have experimented with various consensus mechanisms (the means by which the decentralized network comes to an agreement on the validity, and the order, of transactions).
Some of those consensus mechanisms are faster than others and have been explicitly designed with scalability in mind. For example, Solana leverages a variation of Proof of Stake called Proof of History that offers higher throughput and lower transaction costs for users than most L1 blockchains. Ethereum recently switched from Proof of Work to Proof of Stake in “The Merge”, enabling scalability upgrades in the future.
All blockchains have a scalability ceiling: eventually blocks will be full. But there is a design space to create more efficient blockchain networks by researching and building new network architecture.
Sharding
One architectural design being explored by blockchains like NEAR, Polkadot, and Ethereum, is sharding. Sharding divides the blockchain into smaller parts called shards, each capable of processing transactions independently. Distributing the workload across multiple shards significantly increases transaction throughput because the entire network no longer needs to process and validate every single transaction.
In other words, individual sharding is sort of like parallel processing, and the data/chain state from those shards is circulated around the network to ensure data availability and that all shards are building off the right chain tip. Sound complex? It is, and there are various design approaches within the concept of sharding to address those complexities. It’s also worth noting that sharding is an area of research for Proof of Stake blockchains specifically; that architecture doesn’t work for a Proof of Work blockchain like Bitcoin. Nevertheless, sharding offers several scaling benefits because it is able to divide a blockchain network into subsets that can process transactions in parallel, increasing the efficiency of the overall network.
More Blockchains
It sounds simple but is worth articulating here. One way to scale blockchain networks is to simply have more blockchain networks specialized around specific use cases or industries. As one network reaches capacity, you spin another up, whether alongside other blockchains or on top of them…
Layer 2 Solutions for Blockchain Scalability
Layer 2 solutions tackle blockchain scalability challenges by taking scaling off the L1 blockchain altogether. These techniques allow for faster and more efficient transactions and reduce the burden on Layer 1 networks.
At a very high level, L2s are not sovereign, meaning they rely on an underlying L1 to function, and they enable transactions to occur “off-chain” (off the L1 blockchain) and periodically settle back on the L1 for finality. There are numerous approaches to designing L2 scaling solutions, including:
Rollups
Rollups work by combining numerous transactions on an L2 blockchain into a single batch (rolling them up), which is then sent to the main L1 chain as a single transaction. This bundling process minimizes the number of individual transactions that have to be handled on-chain, resulting in improved scalability.
Users interact with a rollup by depositing assets into a smart contract on the L1, transacting on the L2 rollup, and then withdrawing assets back to the L1 when they are done.
There are two main types of rollups.
- Optimistic Rollups: For this approach, most transaction processing occurs off the L1, with only a summary or proof submitted to the main chain. The main chain acts as a security checkpoint, ensuring the validity of transactions. This technique optimistically assumes that the submitted transactions are correct, and in case of any disputes, they can be challenged and resolved on-chain. Examples include Arbitrum and Optimism.
- ZK-Rollups: ZK-Rollups leverage zero-knowledge proofs to verify the correctness of transactions without revealing any sensitive information. These proofs serve as compact representations of the batched transactions, ensuring their validity and integrity. ZK-Rollups provide strong security guarantees while maintaining scalability. Examples include STARKWARE and Loopring.
State Channels
State channels enable participants to conduct multiple transactions off-chain, reducing on-chain operations and mitigating scalability challenges. These off-chain interactions occur within a temporary channel established between participants. Here's how state channels typically work:
- Channel Creation. Participants open a state channel by creating a multi-signature wallet on the blockchain, containing the funds for the channel's transactions.
- Off-Chain Transactions. Once established, participants freely interact and conduct transactions off-chain. These transactions are recorded in the channel's state, and executed swiftly at minimal cost, with user balances being updated in the state channel along the way.
- Final Settlement. To finally settle transactions on the state channel, the users agree to close the channel and submit the latest channel state to the blockchain, which verifies and updates user balances on the main chain accordingly.
State channels have diverse applications, including microtransactions, gaming, and decentralized finance (DeFi). An example of a state channel scaling solution is Lightning Network, which facilitates Bitcoin payments. By facilitating multiple off-chain transactions, state channels significantly enhance transaction throughput and reduce fees, making them an appealing scaling solution for blockchain networks.
Appchains
Appchains operate with multiple interconnected layers. There is a primary blockchain, referred to as the main chain or root chain, which serves as the foundation. Then there are various appchains, which operate independently and interact with the main chain and other appchains as needed. This scalability solution is similar to the concept of introducing more L1 blockchains described above, but in this case the blockchains can be stacked vertically and interact with each other.
Here's how appchains typically function:
- Main chain: The main chain is the backbone, maintaining critical functionalities like consensus and security.
- Appchains: Appchains are built on top of the main chain and operate with their own consensus mechanisms and handle specific sets of transactions, often around a single application.
- Interoperability: These networks rely on interoperability between the main chain and the app chain, as well as between appchain and appchain and often have design requirements that enable that interoperability.
Appchains often go by various names in different ecosystems, but you will see they largely fulfill a similar function, where you have a foundational blockchain providing security, consensus and interoperability, and various appchains built on top. For example:
- Polkadot has a main chain (“the relay chain”) and appchains (“parachains”).
- Cosmos has the “Cosmos Hub” and application-specific blockchains
- Avalanche has its “primary network” and “subnets”
- Stacks has the Stacks blockchain and “subnets”
Each of these projects are pursuing variations of a similar architecture, one that enables blockchains to scale via a modular structure where various blockchains inherit the security of a main chain.
Sidechains
Sidechains operate as separate blockchains that are interoperable with an L1 chain and enable users to leverage an L1 asset off the L1 chain. Typically, sidechains operate independently of an L1, meaning they have their own security, and are connected to that L1 via a 2-way peg. That peg enables users to bridge a particular asset from the L1 to the sidechain.
For example, a Bitcoin sidechain such as Liquid or Rootstock enables users to peg in BTC to that sidechain (by sending BTC to a particular address) and mint a synthetic asset (L-BTC and R-BTC respectively), and they can peg out back to the L1, burn that synthetic asset, and receive the underlying BTC once they are done transacting on the sidechain. Polygon is one of the most popular sidechains in Ethereum.
Layer 2 scaling solutions like sidechains and the others described above offer innovation for blockchains by creating a modular structure: individual blockchains no longer need to offer every functionality and every strength. Developers can combine blockchains for different use cases, creating a more complex ecosystem and one that allows blockchains to specialize (e.g. one blockchain is very secure, one optimizes for data availability, another is very scalable, etc).
Start Building With Blockchain Scalability Solutions
As a Web3 developer, picking where to build is an essential decision. Which L1 do you build on? Do you choose an L2 instead? Scalable blockchain solutions not only unlock your ability to reach millions of users, but sometimes they create new functionality and use cases in Web3 ecosystems altogether. For example, Stacks is a smart contract layer for Bitcoin, enabling you to build Bitcoin apps, including Bitcoin DeFi, Bitcoin games, and more.
Feeling inspired to build after learning about scaling solutions? Check out our free guide to Web3 app development that covers everything you need to know about building a decentralized application: