Layer 2 is a set of off-chain solutions (separate chains) that run on top of Layers to solve the bottlenecks in transaction size and costs. The following example will make it easier for you to visualize.
Payment companies like Visa, instead of independently controlling thousands of microtransactions every day from a single supplier like Starbucks (which would become overwhelming very quickly), Visa organizes them into groups due to the banking system. resolved periodically. Banks then stack and categorize the transactions through internal equivalence payment layers. In that respect, Visa acts as an L2 protocol, and the vast network of banks and central banks stores transaction records and creates the rules of the game as L1.
Essentially, L1s are responsible for security, data availability, and decentralization because L2s handle transaction scaling.
The importance of Layer 2 . protocol
While Ethereum is known for its strong security and decentralization capabilities, the market popularity over the years has reached its current capacity of 1.1 million daily transactions. Besides, since it can only handle about 15 TPS, high network periods often lead to data congestion. As a result, this causes gas fees to increase, slowing down the performance of Dapps.
To solve these problems, the L2 protocols spread Ethereum as a separate chain on top of the L1 blockchain. They connect with each other and remove the transaction burden from the Mainnet through smart contracts, combine and benefit from Ethereum's stable decentralized security mechanism.
Layer 1 vs Layer 2 in Cryptocurrency
Layer 1 refers to the foundation level of a blockchain architecture – the main structure of a blockchain. Examples of L1 chains include Bitcoin, Ethereum, and BNB Smart Chain. On the other hand, L2 are chains built on top of other networks. For example, Polygon (MATIC) is an L2 protocol built on the Ethereum blockchain, as seen in the diagram below.
The significant difference between L1 and L2 lies in their role and focus on blockchain:
List of Layer 2 . Strings
The application and use of blockchain technology is growing, and L2 protocols must have the opportunity to improve their L1 counterparts. Understanding popular L2 chains can provide further insight into how they could be a major milestone in the evolution of blockchain. Here are some popular L2 protocols:
Nested Blockchain
The design of a nested blockchain consists of a main chain and several sub chains. The design ensures that one network can work seamlessly with other networks. The main chain is responsible for assigning tasks, adjusting working parameters, and resolving disputes as needed. The secondary chains execute the main chain's transactions and send feedback and approval to the main chain.
Sidechains
As the term implies, a sidechain is a side network that is linked to a main blockchain via a two-way peg. You can think of it as a forest, where the trees act as the secondary chain, while the forest is the main chain. The main goal of sidechains is to process a large number of transactions. Thus, they support L1 blockchains by verifying transactions, freeing the main chain from the problem of network congestion. However, you must trust the sidechains to function properly as they can control the assets on the main chain.
State channels
State channels allow parties to interact directly on the blockchain by providing the option to execute transactions without considering the main chains. Furthermore, the validator can take less time to verify transactions, improving the processing speed of the L1 chain. State channels do not rely on transaction validation on the L1 network, but instead use smart contracts to perform similar roles. Once a transaction is successfully completed, the channels ensure secure storage on the main chain.
Rollups
Rollups are L2 chains that facilitate computation outside of the main blockchain. The transfer of transaction details takes place after a certain period of time, thus providing the necessary backup for maintenance. Besides, rollups can manage transactions with little interference to the main chain. As a result, they can ensure transactions are processed faster and with minimal costs. Optimistic and zero-knowledge are common types of rollups.