Author: Kyrian Alex / Source: https://medium.com/@alexanazodo/subnets-vs-l2s-differences-p
Translation: Huohuo/Blockchain in Vernacular
Blockchain technology has gained a lot of attention and adoption in recent years, but as its popularity continues to increase, the need for scalable solutions has become increasingly important. Subnetting and Layer 2 scaling solutions (L2) are two approaches aimed at solving scalability challenges in blockchain networks.
In this article, we will delve into the intricacies of subnets and L2, highlighting their differences, advantages, disadvantages, use cases, and their potential for the future of blockchain scaling.

1. Subnet
1. Understand subnets
Subnets are decentralized networks in the blockchain ecosystem that operate independently and have their own set of rules, validators, and consensus mechanisms. They are designed to enhance scalability and improve performance by enabling parallel processing of transactions and smart contracts.
In a cryptocurrency network such as Ethereum, the main chain can become congested due to high transaction and computational demands. This congestion can result in slower transaction processing times and increased fees. Subnetworks solve this problem by creating additional network layers or sub-chains that can handle a portion of transactions and smart contract computations.
These subnetworks operate as independent environments, each with its own set of validators and block producers, running in parallel to the main chain. They can process transactions and execute smart contracts independently, relieving congestion on the main chain and improving overall network performance.
Subnets often employ different consensus mechanisms or scaling solutions tailored to their specific needs. For example, they might use proof-of-stake (PoS) or delegated-proof-of-stake (DPoS) mechanisms, sharding, or other layer 2 solutions to enhance scalability and throughput. By distributing workloads across multiple subnets, overall network capacity and efficiency can be significantly increased.
2. Currently, the most famous subnets in the industry include:
1) Avalanche Subnets : Avalanche is a blockchain platform that allows developers to create custom subnets with their own rules and token economy. Some of the most popular Avalanche subnets include the DeFi Kingdoms subnet , the Aavegotchi subnet , and the Pangolin DEX subnet .
2) Cosmos SDK subnet: The Cosmos SDK is a blockchain framework that allows developers to create custom blockchains that can interoperate with other Cosmos-based blockchains. Some of the most popular Cosmos SDK subnets include the Binance Smart Chain subnet and the Secret Network subnet .
3) Polkadot Parachains : Polkadot is a blockchain platform that allows developers to create custom parachains, which are independent blockchains secured by the Polkadot relay chain.
4) Near Nightshade Shards: Near is a blockchain platform that uses a technique called sharding to scale its network. Shards are independent blockchains connected to the main near-blockchain. Some of the most popular near-end shards include Aurora shards and Octopus shards .
5) Fantom Opera Chains : Fantom is a blockchain platform that uses a consensus algorithm called Lachesis to achieve high throughput and low latency. Fantom supports the creation of Opera Chains, which are independent blockchains that can be used for specific purposes.
Each subnet can have its own set of rules and governance mechanisms, allowing more flexibility to experiment with new features, protocols, or upgrades without affecting the stability of the main chain. Additionally, these subnets can enable specialized functionality or cater to specific use cases, thereby fostering innovation and diversity within the blockchain ecosystem.
Second, second floor (L2)
1. Understand the second layer (L2)
L2 or layer 2 solutions refer to ancillary protocols or frameworks built on top of existing blockchain networks. Their goal is to solve scalability issues and increase the efficiency of blockchain systems.
L2 solutions process transactions off-chain or in a more efficient manner, offloading the main blockchain network while still maintaining the security and trust-free nature of the underlying blockchain.
2. Classification of the second floor
There are several types of Layer 2 solutions, each employing different mechanisms to enhance scalability. Here are some commonly used L2 solutions:
1) Sidechain: A sidechain is an independent chain that runs in parallel to the main blockchain but is still connected to it. They enable faster and cheaper transactions by processing transactions on sidechains instead of the main chain. Sidechains can have their own consensus mechanisms, rules, and governance structures, giving developers the flexibility to optimize for specific use cases.
2) State channels: State channels enable participants to conduct multiple off-chain transactions without publishing each transaction to the main blockchain. These transactions are conducted privately between participants, with only the final results recorded on the main chain. State channels are especially useful for applications that require frequent interactions and microtransactions, such as games and instant payments.
3) Plasma: Plasma is a scaling technology that creates a network of interconnected child chains, also known as Plasma chains, that run alongside the main blockchain. These sub-chains independently process transactions and regularly submit summary data to the main chain to reduce the load on the chain. Plasma provides scalability by aggregating multiple transactions into a single block on the main chain, increasing the overall throughput of the network.
4) Rollups: Rollups are layer 2 solutions that bundle multiple transactions together and submit compressed versions of those transactions to the main chain. There are two types of Rollups: optimistic rollups and zk-rollups. Optimistic rollups rely on fraud proofs, where transactions are initially processed off-chain and participants can challenge invalid transactions by submitting proofs on the main chain. On the other hand, zk-rollups utilize zero-knowledge proofs to ensure the validity of transactions without requiring on-chain verification of each transaction.
These layer 2 solutions offer different tradeoffs in terms of scalability, security, and decentralization. By moving the majority of transaction processing off-chain, L2 solutions can significantly increase transaction throughput, reduce fees, and improve user experience. However, it is important to note that Layer 2 solutions may introduce additional complexity, require integration with the main chain, and involve trust assumptions depending on the specific implementation.
Currently, the most famous L2s are zksync , starknet , optimism , and arbitrum .
3. Comparing subnets and L2
Layer 2 solutions (L2) and subnetting are both methods used to enhance the scalability and performance of blockchain networks. However, their underlying mechanisms and ways of addressing scalability challenges differ. Here is a comparison between L2 and subnets:
1. Scalability method:
- L2: Layer 2 solutions achieve scalability by processing transactions off-chain or in a more efficient manner, thereby offloading the main blockchain. Their goal is to increase transaction throughput and reduce fees by leveraging technologies such as sidechains, state channels, plasma or rollups.
- Subnetworks: Subnetworks, on the other hand, focus on dividing the main blockchain network into smaller subnetworks or shards. Each subnet operates independently and handles a subset of the total transaction load. By dividing the workload into multiple subnets, scalability is achieved by allowing transactions to be processed in parallel.
2. Relationship with the main chain:
- L2: Layer 2 solutions built on top of the existing main blockchain network. They rely on the main chain to guarantee the security and final settlement of transactions. L2 solutions regularly submit aggregated data or proofs to the main chain to ensure the integrity of off-chain transactions.
- Subnet: A subnet is an independent partition or chain that runs in parallel to the main chain. They can have their own consensus mechanism, rules and validators. However, there is still a connection between the subnet and the main chain for mutual communication, cross-chain transmission or synchronization of certain data.
3. Tradeoffs:
- L2: Layer 2 solutions typically offer higher scalability and faster transaction processing speeds compared to the main chain. However, they may introduce additional complexity, require integration with the main chain, and involve trust assumptions depending on the specific implementation.
- Subnets: Subnets provide scalability by allowing parallel processing across multiple chains, but they can introduce challenges related to cross-chain communication, consensus synchronization, and maintaining security across subnets.
4. Use cases:
- L2: L2 solutions mainly focus on enhancing the scalability and cost efficiency of blockchain applications. L2 solutions operate as an additional layer on top of the main chain, designed to increase transaction throughput and reduce fees. They do this by doing off-chain processing or utilizing alternative consensus mechanisms. L2 solutions are particularly beneficial for applications that require high transaction throughput and low fees, such as decentralized finance (DeFi) platforms, games, and micropayments. By leveraging L2 solutions, these applications can enable faster and cheaper transactions without compromising the security and decentralization provided by the underlying main chain.
- Subnets: Subnets are designed to solve scalability and performance challenges in different ways. Subnets are essentially separate and independent chains within a blockchain network. They allow the network to handle high volumes of transactions or support various applications with varying performance requirements. Subnets enable horizontal scalability by distributing workloads across multiple chains, increasing overall network capacity. With subnets, different parts of the network can operate with their own consensus mechanisms, governance structures, and performance characteristics. This makes subnets ideal for scenarios that need to handle a high volume of transactions or support a variety of applications simultaneously.
4. Subnets and L2: Pros and Cons
Let's explore the pros and cons of subnetting and L2.
1. The benefits of subnets:
1) Scalability: Subnetworks achieve horizontal scalability by dividing the blockchain network into smaller subnetworks or shards. This allows transactions to be processed in parallel, significantly increasing the overall transaction throughput of the network.
2) Flexibility: Subnets provide the flexibility to tailor a specific subnet for different use cases or applications. Each subnet can have its own consensus mechanism, rules, and validators, allowing customization and optimization based on the requirements of the applications running on that subnet.
3) Enhanced performance: Through parallel processing, the subnet can process a large number of transactions at the same time, thereby reducing transaction confirmation time and reducing latency. This makes the subnet suitable for demanding applications and scenarios where real-time transaction processing is critical.
4) Increased network capacity: By distributing transaction load among multiple subnets, the network's ability to handle a large number of transactions is expanded, reducing congestion and potential bottlenecks.
2. Disadvantages of subnets:
1) Cross-subnet communication: Inter-communication between subnets can be complex, requiring additional data exchange mechanisms (such as message passing, cross-subnet API, atomic swap), consensus synchronization, and cross-chain transmission. Ensuring seamless interaction and interoperability across subnets can present technical challenges.
An example scenario for subnetwork interworking could be a blockchain network with separate subnetworks for different industries or use cases such as finance, supply chain, and healthcare. These subnets may need to share data or assets across boundaries. Achieving seamless interaction requires developing secure data exchange protocols, implementing cross-chain transfer mechanisms for asset interoperability, and ensuring consensus synchronization to maintain network integrity. This just involves a lot of work and exposes the subnet to more potential security issues.
2) Security considerations: The security of subnets relies on individual consensus mechanisms and validators within each subnet. Maintaining the security of all subnets and preventing potential attacks or breaches can be complex.
3) Decentralization trade-off: By design, a subnet may have a trade-off between scalability and decentralization. As the number of subnets increases, the number of validators required per subnet may decrease, which may lead to a concentration of power in the hands of a small number of validators.
3. Advantages of L2:
1) Improved scalability: L2 solutions reduce the burden on the main blockchain by processing transactions off-chain or in a more efficient manner. This leads to higher scalability, allowing a large number of transactions to be processed quickly and at a lower cost.
2) Cost Efficiency: L2 solutions can significantly reduce transaction fees by processing transactions off-chain or aggregating multiple transactions into a single on-chain transaction. This makes blockchain-based applications more cost-effective, especially for use cases involving frequent and small transactions.
3) Faster transaction confirmation: By reducing the dependence on the main chain, L2 can achieve faster transaction confirmation, improve the overall user experience and achieve near-instant transaction finalization.
4) Compatibility and interoperability: L2 solutions can be designed to be compatible with existing blockchain infrastructure, allowing seamless integration with various decentralized applications (DApps) and protocols. This promotes interoperability and facilitates the adoption of L2 solutions in the wider blockchain ecosystem.
4. Disadvantages of L2:
1) Security tradeoffs: Depending on the specific implementation, L2 solutions may introduce security tradeoffs. Off-chain processing or relying on external entities for transaction validation may require trust assumptions and may introduce new attack vectors or vulnerabilities. Suppose we have a blockchain-based payment system that aims to improve scalability by employing a L2 solution called a payment channel network. In this network, users can open payment channels with each other, enabling faster and cheaper off-chain transactions. The final settlement of these transactions is recorded on the main chain.
A security trade-off that comes with this L2 solution is the need to trust the payment channel participants. Since transactions happen off-chain, participants need to trust that their counterparty will honor the agreed balance, rather than attempt to cheat.
For example, suppose Alice and Bob open a payment channel, and Alice and Bob initiate multiple transactions to update the balance of the channel. However, Bob decides to broadcast the older channel state to the main chain in an attempt to restore that state and claim more funds than he is entitled to. This is called a "channel state attack".
In this case, if Alice does not continuously monitor the network and fails to respond with a correct, updated channel state, she could lose funds. This attack vector is introduced due to the reliance on off-chain processing and the trust assumptions associated with payment channel participants.
2) Integration Complexity: Implementing an L2 solution and integrating it with the main chain can be complex and require modifications to existing smart contracts or infrastructure. Ensuring compatibility and smooth interaction between L2 and the main chain may present technical challenges. This is because smart contracts need to be designed to support interoperability and communication between L2 and the main chain. This may involve rewriting parts of the contract logic or introducing additional functions to handle L2-specific operations.
3) Limited applicability: L2 solutions may not be suitable for all types of blockchain applications. Certain use cases, such as those involving complex smart contract interactions or absolute on-chain transparency requirements, may not be well suited for L2 solutions. The reason is that L2 solutions typically involve off-chain processing or consensus mechanisms that allow for faster and cheaper transactions, but they may sacrifice some degree of on-chain transparency and security.
V. Conclusion
The choice between subnets and Layer 2 (L2) networks depends on the specific needs of the application. For applications that prioritize high security and decentralization, subnets may be more appropriate. On the other hand, applications that emphasize low latency and high throughput may prefer L2 networks. It is important to carefully consider these factors when deciding which option to choose, as they can significantly affect the performance and functionality of your application.



