The high cost and slow speeds when exchanging data on blockchains such as Ethereum and Bitcoin have led to several ‘Layer 2 Scaling solutions,’ which try to create a better environment for users to send and receive data.
According to Ethereum, Layer 2 is a collective term for solutions designed to help scale your application by handling transactions off the Ethereum Mainnet (Layer 1) while taking advantage of the robust decentralized security model of Mainnet. These solutions introduce lower fees and expand use cases for the blockchain while maintaining security.
Examples of layer 2 scaling solutions include:
3 of the above examples address the scalability of the Ethereum blockchain while the Lightning Network is a project to make bitcoin transactions fast and affordable for global use.
When you use a scaling solution, your transactions are processed on the much lighter layer 2s even though much of the functionality remains Ethereum or Bitcoin.
To get a clearer picture of how this works, we first need to look at the different layers of operations on the blockchain.
The blockchain can be divided into 5 layers as below:
- Application layer
- Execution layer
- Consensus layer
- Network layer
- Data layer
Each layer has different functionality that supports the blockchain, for example, the consensus layer employs consensus algorithms such as Proof of Stake or Proof of Work to ensure data is consistent across all nodes.
The execution layer is where the smart contracts and other instructions execute. This layer is also referred to as the base layer. Instructions to be executed come from the application layer where various dApps that interact with the network’s smart contracts live.
Layer 2 is an additional execution layer that builds on top of the base layer, and we have several implementations for this. Key examples of layer 2 technologies include roll-ups, sidechains, and generalized layer 2s.
All user transaction activity on these layer 2 projects can ultimately settle back to the layer 1 blockchain.
______________________________________
______________________________________