The document provides an overview of blockchain scalability solutions for layer 1 (on-chain) and layer 2 (off-chain) blockchains. It discusses approaches like hard forking, segregated witness, and sharding for layer 1 as well as state channels, plasma, sidechains, rollups, and app-chains for layer 2. The scalability trilemma and trade-offs between scalability, security, and decentralization are also summarized. Examples of implementations are provided for many of the solutions.
2. The Idea of Scalability
For most computer systems (e.g., a database or search engine), "scalability" refers to the system's
capability to handle a growing amount of work or to scale.
Scalability is typically achieved by allocating more resources (e.g., computing power, servers, or
bandwidth) to the system without requiring significant modifications to cope with increased workload.
However, in the context of blockchain, scalability has a broader range of meanings and implications.
A blockchain network is considered scalable when it can achieve higher throughput, low latency,
short bootstrap time, or less cost per transaction.
Scalability is crucial for the future growth of blockchain, ensuring that the increasing number of
use cases and adoption of blockchain do not compromise its performance.
However, achieving scalability in blockchain involves addressing the challenges posed by the
Scalability Trilemma.
3. The Scalability Trilemma
The Scalability Trilemma states that it is difficult to achieve high
scalability, strong decentralization, and security simultaneously in a
blockchain system.
According to the trilemma, when designing a blockchain, developers
have to make trade-offs among these three essential aspects.
Higher scalability often requires sacrificing either decentralization or
security, while maintaining all three at high levels becomes challenging.
All emerging blockchain solutions attempt to address this trilemma in
their own way.
Some solutions focus on on-chain scalability by modifying the Layer 1 (L1)
blockchains.
Others explore off-chain solutions such as Rollups, Lightning Networks,
and other L2 scaling techniques.
These approaches aim to improve scalability while maintaining an
acceptable level of security and decentralization.
Scalability
Security Decentralization
Pick one side
of the triangle
A B
C
5. First Layer Scalability Solutions
The first layer, or layer 1 solution, requires changes in the codebase of the
main blockchain network.
Therefore, layer 1 solutions are also referred to as on-chain scaling
solutions.
Layer 1 solutions focus on improving the core features and traits of the
blockchain network, such as increasing the block size limit or reducing the
block verification time.
The popular layer 1 blockchain scalability solutions include hard forking,
segregated witness (SEGWIT), and sharding.
6. Hard Forking
• Hard forking is a process that focuses on making structural or fundamental changes in the property of a blockchain network.
• Two Types: Planned Hard Fork, Contentious Hard Fork
• A Planned Hard Fork provides an update to the network, and every node agrees to it. Hence, the old chain ceases to exist.
• A contentious hard fork occurs when there is a disagreement within a community.
• The two disagreeing factions will fork the chain and implement the changes they desire on their respective chains.
• Both Chains exist. Example: Bitcoin → Bitcoin Cash, Ethereum → Ethereum Classic
• Contentious hard forks are not used much these days.
7. Segregated Witness
SEGWIT is a protocol enhancement in the Bitcoin
blockchain network that focuses on changing the way
and structure of data storage.
It aids in eliminating signature data linked with each
transaction, resulting in increased capacity and storage
space for transactions.
It is vital to note that the digital signature for validating
the sender’s ownership and availability of cash takes up
around 70% of the total space in a transaction.
The removal of the digital signature may free up
additional space for the addition of new transactions.
8. Sharding
• Sharding focuses on breaking down the blockchain network into smaller, more manageable
chunks known as shards.
• The network would then execute the shards in parallel with one another.
• The network’s processing output would increase with each shard handling a portion of the
group’s transaction processing. Ethereum 2.0 is following this approach.
• In Dynamic Sharding, more nodes are added to the network to process transactions without
increasing the Gas as the demand grows. Shardeum uses this technique.
9. Second Layer Scalability Solutions
With Layer-2, the underlying network (mainnet) does not need to process
large amounts of data
It offloads transactions from the primary chain to different processing
channels, recording only the final result on the Layer-1 blockchain.
State Channels, Plasma, and Roll-ups are all second-layer
scaling solutions.
Transactions are consolidated into one package before recording onto the
mainnet, reducing gas fees, maintaining the security of the mainchain,
and increasing TPS
10. State Channels
• This process involves setting up a channel between
two parties who want to transact with each other.
• Transactions that take place within this channel are
off-chain, meaning that they do not require global
consensus and can be executed quickly using
smart contracts, with lower fees and at a faster
speed.
• When the payment channel is closed, the final
transaction is recorded on the main blockchain to
verify the final state.
• Lightning Network (Bitcoin) and the Raiden Network
(Ethereum) are popular examples of State Channels.
11. Plasma
• Permits chains within chains (Child Chains), allowing for an exponential increase in scalability.
• Proof of the child chain’s validity is submitted and stored on the chain below, not the entire computation.
• Significant interaction with the root chain is only necessary in the event of a dispute.
• These child chains can produce their own independent blockchains, giving them a tree-like structure, and can have
different consensus mechanisms.
• Uses a fraud-proof mechanism to validate the plasma chain.
• As it can’t run smart contracts, only basic operations like token transfer and swapping are possible.
• The data availability is off-chain. Hence, they are less secure because the mainnet can not effectively verify
transactions conducted on child chains.
12. SideChains
• Sidechains are separate blockchains connected to the
main blockchain via a two-way peg for assets transfer
between the main chain and the sidechain using a bridge.
• This increased processing speed has the potential to
allow for thousands of transactions per second.
• While on the sidechain, assets no longer rely on the
consensus of the main chain, providing transactional
independence. Hence sidechains require dedicated
nodes for their own security.
• Multiple sidechains can be connected to the mainchain,
and inter-sidechain communication is possible using the
mainnet as a relay network.
• However, sidechains introduce considerations such as the
risk of centralization, validator selection, consensus
mechanisms, bridge security, and inter-sidechain
communication.
• Polygon PoS is a successful example of Ethereum side
chains.
13. Rollups work by
batching many
small
transactions into
a single
compressed
transaction,
which is then
submitted to the
roll-up smart
contract on the
Layer1 chain.
This can be
considered
similar to how zip
files work, where
multiple files are
combined into a
single file to save
space.
Rollups currently
hold over 95% of
the Ethereum
Layer2 market
share.
Rollups use
Merkle Roots to
record
transactions and
ignore
unnecessary
data that
occupies
Blockspace.
Rollups are of two
types:
1. Optimistic
Rollups
(Fraud Proofs)
2. ZK Rollups
(Validity Proofs).
Rollups are of two
types:
1. Optimistic
Rollups
(Fraud Proofs)
2. ZK Rollups
(Validity Proofs).
Roll-Ups
1 2 3 4 5 6
14. Optimistic Rollups
This is the most used rollup at the moment comprising over 80% of total Rollup
transactions. The reason being they are easy to deploy.
As the name suggests, they assume all transactions are correct when submitted, and a
window of 7 days is given for raising disputes.
If no fraud proofs are published within that time, assets are released. In case of a
successful dispute, the last correct state is restored.
Fraudulent activities are rare because of economic incentives and disincentives for the
bad actors.
Transactions are processed very fast. However, to withdraw it back to L1, one must wait
until the fraud-proof publishing window ends.
Examples: Optimism, Arbitrum, Polygon Nightfall, Metis, Boba
15. Zero Knowledge Rollups
ZK Rollups are a scalability solution that separates transaction execution from consensus and
data availability.
A ZK protocol provides cryptographic proofs for every batch of executions on the rollup, which are
sent to the L1 Mainnet.
On the L1 Mainnet, the input data (Call data- a ZK SNARK) of each transaction on the rollup is
stored, allowing other nodes to verify transaction integrity.
These cryptographic proofs, often referred to as 'Moon Math,' utilize complex mathematics to
ensure security and trust.
With transactions already verified on the rollup, asset withdrawals can be processed almost
instantly, unlike optimistic rollups.
ZK Rollups leverage on-chain data availability to maintain transparency and security.
Examples: zkSync, Loopring, Polygon Hermez, Polygon Zero
16. App-Chains
• App-chains are specialized blockchains designed to address
scalability needs for specific use cases or applications.
• They provide focused solutions by tailoring the blockchain
architecture to meet the requirements of a particular application or
industry.
• App-chains can have their consensus mechanisms, governance
models, and network parameters customized for optimal
performance.
• By isolating specific use cases onto dedicated app-chains,
scalability can be improved as resources are allocated efficiently.
• Examples: Polygon Supernet, Avalanche Subnet, Substrate
Parachains
• Here’s a high level overview of Avalanche Subnets, showing how they
work independently, while remaining interconnected with other
Subnets and leverage the benefits of the primary Avalanche
network.
Illustration missing