test test

Layer 1 vs Layer 2: What’s the Difference?

Layer 1 vs layer 2 describes the trade-off between scaling on the blockchain vs a second computation layer. Both have different characteristics and advantages.

Layer 1 vs Layer 2 Scaling

Layer 1 describes the native settlement layer of a blockchain. For example, Layer 1 would describe Bitcoin’s blockchain while the Lightning network would refer to the second layer (Layer 2). Today, transactions on Layer 1 are expensive and not scalable. 

That’s why we have started to outsource computation to a second layer (Layer 2). However, computation on Layer 2 also comes with trade-offs. While transactions are cheap, security and decentralization are compromised.

The term “trade-off” is important to highlight here because both Layer 1 vs Layer 2 come with different characteristics. 

Now that we know the overall difference between Layer 1 vs Layer 2, let’s explore some concrete examples that people are working on.

Layer 1 Scaling

Scaling on Layer 1 is all about increasing the transaction throughput on the blockchain. This debate is as old as the blockchain space. The simplest solution to scale a blockchain is to increase its block size; however, this comes with the dangerous trade-off of sacrificing decentralization. For example, Bitcoin Cash and Bitcoin SV have been trying to scale directly on the blockchain and failed miserably.

Other teams like the Ethereum Foundation are building another way to scale the blockchain without compromising decentralization: ETH 2.0.

ETH 2.0 introduces sharding, which essentially spits Ethereum into 64 chains. These chains will be able to communicate with each other. This concept allows for more transactions per second while keeping the network decentralized. ETH 2.0 also keeps the network secure and resistant to attacks.

However, ETH 2.0 is far from here. Developers are still working hard to ship the code. We can expect sharding to launch in approximately 1-2 years (as of August 2021).

That’s why transacting on the native blockchain is still costly. Already today, other scaling solutions exist – so-called Layer 2 solutions. They outsource computation outside of the blockchain. So let’s take a look at them!

Layer 2 Explanation

As of today, we have two very common Layer 2 Solutions:

  • Rollups
  • State Channels

Let’s get a better understanding of the different characteristics!

Layer 2 Scaling Solutions

Rollups (Zk- vs Optimistic Rollups)

Rollups are the most prominent form of scaling solutions on Ethereum. They essentially outsource computation to a second layer (the rollup). Every single transaction on the rollup is fast and secure. Only the minimum necessary information is published on the chain. That makes rollups extremely scalable without sacrificing security or decentralization.

Because every single transaction is also published on Ethereum, rollups are almost as secure as Ethereum itself. Security and scalability are probably the most important advantages of rollups, which lead to many DeFi applications deploying their apps on rollups.

There are two types of rollups: Zk-Rollups and Optimistic Rollups

Optimistic Rollups are EVM-compatible! That means DeFi applications can deploy their protocol on rollups without changing the underlying code. They can copy the source code to bring the rollups version to life. There is only a minimal amount of effort involved!

Of course, there are also disadvantages: For example, Optimistic Rollups require a long time for users to withdraw their assets back to the Ethereum main chain. This withdrawal period can be up to one week. However, secondary markets can solve this problem.

Another way of scaling off-chain is State Channels. Let’s take a look at them!

State Channels

State Channels are a way for users to directly transact with other persons off the chain. This will minimize transaction costs and increase the possible transactions per second. State channels work in a similar way to Bitcoin’s lightning network. 

You can imagine state channels in the following way: Two people play a card game; they could have played it on the Ethereum blockchain; however, that would have been very costly and the two people would have paid a lot of transactions fees for every single move. Both players decide to move off the chain to play the game. After the game, they both agree on a winner and a loser. Only the end result is stored on the blockchain itself while the detailed moves remain hidden. This allows Ethereum apps to put some computation off-chain – increasing the usefulness of the network as a whole.

State channels also have strong privacy features and instant finality. On the other hand, state Channels are only very useful when users exchange many different state updates over a long period of time.

Now, let’s explore the future of scaling. Which transactions will be processed on layer one? And when does it make more sense to stay on a second layer solution? Let’s find out!

The Future of Scaling

Both scaling on layer 1 vs layer 2 works perfectly fine. Both types of scaling have different trade-offs and advantages. That’s why the future of scaling will be a hybrid version of both layer 1 and layer 2 solutions.

We will see multiple blockchains and second layer solutions – all interoperable with one another.

In the end, it will all come together: Ethereum, sidechains, layer-two-solutions, other base-chains like Polkadot or Cosmos. Transferring information from one chain to another will be seamless and easy!

The future of money will feel like magic – there will be several different settlement layers, but end-users won’t even know where they transact on, and they won’t have to!

Subscribe to our completely free newsletter!

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here