L1 and L2 chains in Blockchain Ecosystem

Arpit Goliya
Tecnología
Published in
4 min readFeb 26, 2022
Layered Blockchains

Ethereum is by far the most popular blockchain for developing DApps. However, building directly on top of Ethereum can result in huge gas fees.

Here’s a note on the gas fee from the Ethereum website.

“Gas refers to the unit that measures the amount of computational effort required to execute specific operations on the Ethereum network. Since each Ethereum transaction requires computational resources to execute, each transaction requires a fee. Gas refers to the fee required to conduct a transaction on Ethereum successfully. Gas fees are paid in Ethereum’s native currency, ether (ETH). Gas prices are denoted in gwei, which itself is a denomination of ETH — each gwei is equal to 0.000000001 ETH (10–9 ETH).”

Gas prices fluctuate and are higher during high activity periods. This is true for all blockchains. If you are trying to mint something on any blockchain, the impact of the gas fee should be considered. It could be one of the primary attributes for selecting a particular blockchain for any project.

In general, building on any blockchain(layer 1) directly will result in a higher fee as compared to doing something off-chain(layer 2). Though most blockchains are trying to introduce mechanisms that can result in lower fees, working on a layer on top of the blockchain can save substantial fees. How? We will review that soon.

The main blockchains are Layer 1 like Ethereum, Tezos, Solana etc. Layer 2 is a scaling mechanism for the main blockchain. There could be multiple implementations for scaling the main blockchain such as rollups (that performs transactions off-chain and rollup those onto the main blockchain), sidechains (which links to the main chain via bridge), plasma chains, multichains, state channels (where a channel is opened among participants).

Layer 2 generally offers better speed for transactions and lower gas fees. We can consider it as a secondary framework or protocol that is built on top of the main blockchain. Generally speaking, we can move a lot of computation heavy work/complex use cases to Layer 2 and leverage Layer 1 for its security and other core blockchain-based features. Let us consider how some of the Layer 2 solutions work:

  1. Lightning Network: The Lightning Network can facilitate fast peer to peer transactions on top of a blockchain. It has its nodes and software which allows people to transact on the network without the need of pushing everything to the main blockchain. This allows for quick processing as there is no block wait time. Blocks on a blockchain are a scarce resource. So if we want our transaction to be written to the block quickly, we might have to pay a higher fee for the same. At peak load, this could mean a transaction of USD 50 also. So for small peer to peer transfers, Layer 1 blockchains can be very expensive. Why would anyone pay a fee of USD 50 or even USD 5 for that matter, to pay someone USD 5? When doing volume transactions between 2 peers, this fee is reduced drastically as the user will have to pay one for 2 transactions on the blockchain — open and close of the channel. When you start a peer to peer transaction, record it in the blockchain. Do any number of transactions and then record the final state. Intermediate states can also be recorded if needed.
  2. Ethereum Plasma: This allows the creation of a framework of secondary chains to reduce interaction with the main chain. Plasma chains allow the creation of hierarchically arranged numerous small chains on top of the main chain, operated as a blockchain tree. Plasma structure is built using smart contracts and Merkle trees.
  3. Roll-Ups: This mechanism enables transactions at layer 2 (reduced gas feed). Data and proof of transaction reside on layer 1. A smart contract at layer 1 is used to enforce proper transaction execution at layer 2 using the data stored on the main chain(layer 1). Roll-ups can be optimistic such as Arbitrum or zero-knowledge such as Polygon Hermez
  4. Sidechains: Sidechains are separate blockchains that run in parallel to the main blockchain and can have their operating mechanism (own consensus algorithm ) and can also use the main blockchain for validation. Liquid, RSK are some of the bitcoin pegged sidechains. Polygon is Ethereum based sidechain.
  5. Multichain: Multichain networks have their own consensus algorithm and network architecture. We can consider these to be made up of more than one blockchain. For instance, SKALE has some machines in Ethereum main chain and some on SKALE network.

In conclusion, Layer 2 chains allow us to solve several complex use cases and also help us scale Layer 1 chains. As NFTs have become popular, we now have ImmutableX which allows high-performance minting of NFTs. More and more Layer 2 chains will evolve in the next few years and Dapps development and execution is only set to become more robust and economically viable (near-zero transaction fees).

References & Further Reading

  1. Layer 2 Blockchain — PC Mag
  2. Layer-1 and Layer-2 Blockchain Scaling Solutions
  3. A Beginner’s Guide to Bitcoin’s Lightning Network — Binance Academy
  4. What Is Ethereum Plasma? — Binance Academy
  5. Layer 2 solutions — One37PM
  6. Sidechains — Ethereum Website
  7. Blockchain Sidechain — Komodo Platform
  8. Sidechains and Plasma — Polygon

About the Author

Arpit is a seasoned technologist with vast experience in leading large cross-functional and cross-geography teams. Arpit also consults clients on competitive market analysis, defining MVPs, product ideation, product monetisation and go live strategies.

Arpit believes we should all contribute back to society. He has set his goals for social work in five broad areas. You can read more about the same in his blog post “Do Good, Together” on Tumblr. Arpit is interested in working with people who want to contribute towards the same goals.

You can follow Arpit on Linkedin and Twitter

ABC. Always be clappin’.

--

--