Layer 2 blockchains, the ultimate scalability solution.

Beyond_cryptocurrencies_ES (1)

The evolution of blockchain technologies has given way to innovative concepts that seek to optimize transaction efficiency. One of these concepts is layer 2 blockchains. In simple terms, in a layer 2 blockchain, transactions are executed externally to the layer 1 blockchain, and then a cryptographic proof is sent to layer 1 for security. This approach offers a key solution to address the scalability challenge at layer 1, without compromising the security and decentralization of the blockchain.

What is a layer 2 blockchain?

A Layer 2 blockchain is a separate blockchain from the Layer 1 blockchain. After transactions are completed, a proof is sent to a smart contract in Ethereum to verify validity and prevent cheating. Once the smart contract passes the cryptographic proof, the transaction information is uploaded to the Ethereum blockchain for anyone to verify.

To understand it better, let’s consider a hypothetical example of how a layer 2 blockchain can increase Ethereum’s scalability: If a layer 2 can perform 100 transactions per second and Ethereum only 10, layer 2 performs 100 transactions and sends a single proof to Ethereum to verify them. So, if Ethereum can process 10 transactions per second and verify 100 layer 2 transactions on each transaction of its own, it means that hypothetically Ethereum could perform 1000 transactions per second thanks to this solution.

Benefits

  1. Increased scalability and lower fees: The ability to combine hundreds of layer 2 transactions into a single Ethereum transaction allows to raise Ethereum’s scalability to unprecedented levels, while reducing the cost of gas fees.   
  2. Maintaining security: As mentioned above, Layer 2s verify and store transactions in Ethereum, which ensures security when using Ethereum as the primary blockchain protected by its high level of decentralization.
  3. Extending the potential of applications: Lower transaction costs coupled with increased speed will facilitate the development of more and improved blockchain applications, which will benefit globally.

Main layer 2 solutions

Broadly speaking, there are two different predominant layer 2 approaches: state channels and rollups.

State channels:

State channels provide the ability to establish an account between two people, allowing for multiple transactions that are recorded by a computer external to the layer 1 blockchain. At the end, only the final balance of each account is uploaded to layer 1. 

However, state channels are limited in scope, as they are only used for payment transactions. In addition, their functionality is restricted, as they cannot execute smart contracts, and require the parties involved to manually open a state channel to carry out transactions.

Rollups:

Rollups emerge as a broader solution to address layer 2 scalability. They leverage smart contracts to aggregate hundreds of transactions into a single transaction at layer 1. 

Transaction rollups are published on Ethereum, thus preserving the security and decentralization of the blockchain. This approach represents a step forward by enabling a wider range of transactions and simplifying the process of scalability on the blockchain.