Scalability is the need of the hour. If you have been involved in the crypto/blockchain space in any way, then you must have heard of “layer-1” and “layer-2” solutions. In this article, we will demystify these terms and explain the pros and cons of both these solutions.
Layer-1 is the term that’s used to describe the underlying main blockchain architecture. Layer-2, on the other hand, is an overlaying network that lies on top of the underlying blockchain. Consider Bitcoin and Lightning Network. Bitcoin is the layer-1 network, while the lightning network is layer-2. Now that we know the core difference let’s look at the layer-1 and layer-2 solutions that companies are currently working on. We will start with layer-2 solutions.
Let’s look into the following layer-2 solutions:
- State channels.
- Nested blockchains.
A state channel is a two-way communication channel between participants, which enables them to conduct interactions, which would typically occur on the blockchain, off the blockchain. Doing this helps in cutting down the waiting time since you are no longer dependent on a third party like a miner. This is how a state channel works:
- A portion of the blockchain is sealed off via multi-signature or some sort of smart contract, which is pre-agreed by the participants.
- The participants can directly interact with each other without submitting anything to the miners.
- When the entire transaction set is over, the final state of the channel is added to the blockchain.
Bitcoin’s Lightning Network and Ethereum’s Raiden Network are the two most popular state channel solutions. Both of these utilize Hashed Timelock Contracts (HTLCs) to execute state channels. While Lightning Network allows participants to conduct a large number of microtransactions in a limited time period, the Raiden will enable participants to run smart contracts through their channels as well.
Currently, OmiseGO, an Ethereum-based dApp, is working on a nested blockchains solution called…