Back to Blog

Layer 1 vs Layer 2: Blockchain Solutions

Layer 1 vs Layer 2 is starting to become more of an easy choice rather than the dilemma which it used to be. However, there are still many opinions, pros and cons to which blockchain solution is better. In fact, what are Layer 1 and Layer 2 blockchain solutions? Well, this article will help you better understand the “what” and the “why” while showcasing the historical impact of each layer, describing examples of both and providing a different perspective such as showcasing Layer 1 against Layer 2. Additionally, we focus will be aimed at solutions of the future in the face of Starkware.

What is Layer 1?

Financial and crypto analysts already predict that blockchain technology will be worth up to 3 trillion US dollars by 2030 and we are living in an age where businesses are joining in the “hype”. As such, Layer 1 blockchain technology is rising in popularity while addressing the limitations blockchain solutions.

The Layer 1 blockchain refers to an owner of implemented solutions at a base protocol level of the blockchain network. Such solutions improve functionality and scalability. Early cryptocurrencies and networks such as Bitcoin, Litecoin and Ethereum are just few of the most popular adopters of the Layer 1 blockchain.

This type of layer runs at a base protocol and can perform the following actions: increasing data capacity of each block on the blockchain, acceleration of the speed of block confirmation and enhance of overall network throughput.

Types of Layer 1 solutions

Layer 1 network applied to Bitcoin.

Type one –  Consensus protocol

Proof of Work(PoW)

PoW is the classic consensus protocol used for crypto networks such as Bitcoin and Ethereum. The protocol hopes to achieve both consensus and security while using miners to simplify complex cryptographic algorithms. However, the Proof of Work protocol has a major drawback. It is for the most part very slow and requires a lot resources to be sustained.

Proof of Stake(PoS)

PoS is the second type of consensus protocol. The PoS instrument offers a distributed consensus over the blockchain network. As a result, users can authenticate block transactions on the basis of their stake. Therefore, Proof of Stake appears to be the favorable option as opposed to Proof of Work since transaction speed is better, however this comes at cost – reduced security. Initially Ethereum had debated whether or not to transition to it, however this is more likely to happen in the near future. Transitioning from PoW to PoS can even be even be reviewed on Ethereum's website where all the pros and cons are listed.

Type two – Sharding

The second type of Layer 1 blockchain solutions is sharding. The mechanism is derived from distributed databases. Although it is in experimental stages, it is still utilized a lot in the form of a scaling solution for Layer 1 blockchains.

For example, the entire blockchain network is distributed into unique datasets – shards. This is a better solution instead of using all available nodes to main the blockchain. The smaller network shards are processed simultaneously which improves transaction speed by a margin. The main feature of a node is to keep records of its assigned shard and not the entire blockchain. Also, cross-shard communication protocols allow shards to interact with each other and to share data such as addresses or balances.

What is Layer 2?

Layer 2 is the shared term for blockchain solutions which are designed to help scale applications by handling transactions off the main Ethereum chain (layer 1) and providing new platforms which act as the new layer. Transaction speeds slow when the network is busy damaging the user experience for certain types of dApps, especially in DeFi and those related to gaming. And as the Ethereum network gets busier, gas prices increase as transaction senders aim to outbid each other. This can make using Ethereum very expensive.

As a result, Layer 2 solution’s main goal is to move a lot of transactions off the blockchain. Only the final status is to be submitted tot he Layer 1 chain (blockchain or On-Chain) for verification. This can significantly improve the current limitation on the number of transactions per second. At the same time, the first layer can guarantee the security and trust of the second layer.

Such solutions include rollup solutions, such as Arbitrum, which can maximize their inheritance of the security of their underlying Layer-1 platform. Other sidechains such as Ronin which have their own unique security mechanisms more closely resemble independent Layer-1 platforms.

Layer 2 platforms greatly increase blockchain scalability.

We have already touched upon Arbitrum in one of our previous articles. As such, the main reason for Arbitrum’s existence is to tailor to the shortcomings of current smart contracts based on Ethereum. These include –inefficiency and very high execution costs which result in bad Ethereum user experience as well as expensive transactions.

The other rollup solution which we have also looked into in our blog page is Optimism or Optimistic Ethereum. Similar to Arbitrum, it allows users to execute transactions on the Ethereum network. Transactions are processed quicker and for a much lower gas cost than the Ethereum network itself.

Layer 1 vs Layer 2

As we discussed earlier, there are significant reasons why networks and users are choosing to abandon Layer 1 and move to Layer 2. Users are getting more and more frustrated due to the high transaction fees. On the other hand, fees are continuously increasing as demand increases on DeFi services and networks such as Ethereum. The new “normal” are per transaction fees of up to 20 USD or more depending on the amount of a transaction. Therefore, slow and costly transactions are reducing scalability which in turn creates the blockchain scalability problem. This is a major issue which impacts the general idea of Web3 since it is becoming only accessible to wealthier users. As a result, this defeats the purpose and mission of banking the unbanked.

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. Let's 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 2 solutions that companies are currently working on and what are the benefits of Layer 2.

Layer 2 advantages

Layer 2 solutions have three very prominent advantages in comparison to L1 on-chain payments. They include: privacy, low transaction fees and instant payments.

Illustrative mobile transactions processing on the L2 blockchain.

(1)   Privacy.

All activities are executed inside the channel, therefore not on the entire network and the chain.  Open and close transactions are only available to the wider public.

 

(2)   Low transaction fees.

Transactions which are processed on a frequent basis can have their transaction cost effectively reduced. As it is possible to create a channel or deploy a contract there are initial costs involved in the process. However, once a contract is deployed, each and every further status update cost on the channel is very low.

 

(3)   Instant payment.

Typically, transactions on the blockchain require a certain period of time to be included in a block and for confirmation to be received from other blocks afterwards. This is no longer the case with Layer 2 solutions as users receive instant status updates about transactions.

Upcoming Layer 2 solutions – Starkware

Historical overview

StarkWare was originally founded in January 2018. Founders include: Eli Ben-Sasson (co-founder of STARK, previously prof. of CS at Technion and founding scientist of Zcash), Uri Kolodny (entrepreneur), Michael Riabzev (co-founder of STARK)and Alessandro Chiesa (founding scientist of Zcash and professor of CS at UC Berkeley).

Starkware logo.

What is Starkware?

As we are on the topic of Layer Two solutions we must notably mention Starkware network and how it fits into the blockchain ecosystem. Starkware is actually powered by StarkNet which is a permission less decentralized ZK-Rollup according to the L2solution’s website. It operates as a L2 network over Ethereum, enabling any dApp to achieve unlimited scale for its computation without compromising Ethereum's composability and security.

StarkWare’s main goal is to improve scalability and privacy on blockchains using STARK technology. It’s software portfolio supports fast and trustless generation of proofs of computational integrity since main computation occurs off-chain and the verification takes place on-chain. As such, STARKs use lightweight cryptographic hash functions. Therefore, they are equally fast and secure. This kind of security is not the case with other cryptographic proofs that rely on public-key cryptography, which are by far more expensive and vulnerable to attacks and compromisation.

The solution which StarkWare offers is efficient and transparent, thus it can be applied to many blockchains while positioning it as a fundamental solution to solve the privacy issues currently present on blockchains. Also, increasing transaction speed in the course of project is another positive trait of the network. The compression that Starkware allows reduces costs by 100 times (100x) and this data is very important for any future or present cryptocurrency looking to become widely adopted.

Currently, StarkWare does not have a token and is still in it the project’s Alpha stages of development. However, the Israeli blockchain startup has already achieved a USD2 billion valuation from funding led by Sequoia Capital. In addition to that, it has also received a $12 million grant from the Ethereum Foundation in order to help scale the Ethereum network. Notable investors include Vitalik Buterin, Paradigm, Pantera, DCVC, Wing, Floodgate, Intel Capital and others.

Benefits of Starkware

        · The StarkNet network supports scaling, while preserving the security of L1 Ethereum by producing STARK proofs off-chain, and verifying those proofs on-chain.

        · StarkNet allows developers to easily deploy any business logic using StarkNet Contracts.

        · StarkNet provides Ethereum-level composability – facilitating easy development and innovation.

Examples of Starkware

One of the most recent projects developed on the StarkNet network is L2Beat. L2Beat offers analytical data and research on their website regarding the Ethereum layer two (L2) scaling. Multiple comparisons of the various EthereumL2 systems are available as well as illustrative graphics. The overall purpose of the website is to provide transparent and verifiable insights into emerging layer two (L2) technologies. All of this is possible and available to the crypto community thanks to Starkware technologies.

L2 Summary

To summarize, Layer 2 is important since most blockchain games cannot scale or exist efficiently with the current transaction times. As such, most blockchain applications are extremely expensive to use. Expenses should not be at the heart of decentralization, especially when this is related to updates on scalability.

At present, the following Layer 2 platforms are receiving most of the crypto community’s attention:

Rollups, ZK rollups, Optimistic rollups, State channels, Plasma, Validium, Sidechains and Hybrid solutions

With such progress and many users involved in these solutions it is only expected that most DeFi apps will begin to transition from Layer 1 to Layer 2 solutions, enabling instant transactions and fast settlement times for a fraction of gas costs. For example, Synthetix is building with optimistic rollups on Optimism and has already begun testing with Synthetix users. Another example is Loopring, a popular DEX built with zkRollups which has been live for over a year with over $35M in total value locked trading for fractions of a penny in gas costs.

Conclusion

In conclusion, we introduced the Layer 1 blockchain which is a set of solutions that improve the base protocol itself in order to make the system more scalable. There are two most common Layer 1 solutions – the consensus protocol and sharding. In terms of changes on the consensus protocol changes, networks like Ethereum are transitioning from older, slower consensus protocols such as proof-of-work (PoW) and are moving to the much faster and less energy-wasteful protocols such as proof-of-stake (PoS). After that, we moved focus on to Layer 2 solutions and examined their origin and benefits which showcase how L1 is already behind its time and both networks and users choosing to move to L2 for scalability. Then, we dived into the future of Layer 2solutions introducing Starkware and the StarkNet network. Ultimately, users and entrepreneurs-alike can choose between one or the other, however it is always important to make the right choices and our team can assist you with that. So if you wish to get in touch, then please contact our team.

Also, if you enjoyed reading this article, please visit our Blog page or if you would like to learn more about the services our company offers, then definitely check out the Services page.

Opensea Marketplace White label

Subscribe to our newsletter

We write a lot of "How to" guides that can help you come up with new product ideas or feature extension.

Thanks for joining our newsletter.
Oops! Something went wrong.