What is layer 2 on Ethereum?

Содержание

  1. What is layer 2 on Ethereum?
  2. Channels
  3. Plasma
  4. Independent sidechains
  5. Rollups
  6. Layer-2 ecosystem

What is layer 2 on Ethereum?

Ethereum is the second most recognized cryptocurrency after Bitcoin. It has helped create a decentralized financial system, and much of the innovation in the crypto space still revolves around it. Unfortunately, Ethereum is a victim of its own success. The Ethereum mainnet, also called ‘layer 1,’ regularly processes well over 1 million transactions a day, but demand is much greater than capacity. This causes the network to become congested, which in turn pushes gas prices to exorbitant levels. As the average cost of transacting on layer 1 increases, more and more people are priced out of using decentralized apps like decentralized exchanges or NFT marketplaces.

Read more: What is ETH gas and how do fees work in Ethereum?

Layer 2 is an umbrella term to describe solutions that build on top of layer 1 to improve the scalability of the Ethereum network. In other words, layer 2 is an attempt to make Ethereum more usable for a greater number of people.

There are a number of layer 2 solutions on Ethereum. We are going to take a brief look at how each of these solutions approach bringing scalability to Ethereum.

Channels

Channels are analogous to how the Lightning Network works for Bitcoin. Essentially, channels allow a person to make an unlimited amount of transactions with another person, but only the first and last transaction are submitted to the blockchain. Since all other transactions are handled off chain, they are incredibly fast with very low transaction fees.

The downsides are similar to Bitcoin’s Lightning Network: You must have a connection to the person you wish to transact with, funds must be allocated for a channel and cannot be withdrawn for the duration of the channel, and there are many potential security vulnerabilities associated with transacting off-chain.

Raiden is often called Ethereum’s Lightning Network.

Plasma

Plasma is a framework that allows for the creation of child chains that use the Ethereum main chain as a layer of trust and arbitration. Child chains provide fast and low cost transactions, but they only support a limited number of transaction types, such as basic token transfers and swaps. General computation is not supported. Another drawback is that withdrawals from the child chain back to the Ethereum mainnet are subject to long wait times, and someone must watch the network to ensure funds are secured. Plasma is a relatively mature technology, so there are several prominent deployed projects.

The most widely used project implementing the Plasma framework is Polygon (MATIC).

Independent sidechains

What constitutes a sidechain can be a hotly debated topic in the crypto community. It could be argued that all layer-2 solutions are sidechains, but for this section, we are talking specifically about two independent blockchains. They connect through a 2-way peg and both chains are compatible with the Ethereum Virtual Machine (EVM).

The technology behind independent sidechains is well understood. Due to this, many projects have moved to independent sidechains as a quick and pragmatic way to improve transaction speed and reduce transaction costs. Independent sidechains are responsible for their own security, which means sidechains are inevitably less secure than Ethereum, because they’re smaller. Also, a smaller number of miners/validators on a sidechain means it’s more feasible for them to coordinate and steal assets.

xDAI is a prominent example of an Ethereum independent sidechain. Also, the popular game Axie Infinity is a good example of a layer-1 project that pivoted to an independent sidechain for fast and cost effective transactions.

Rollups

Rollups work by processing transactions on layer 2, but sending data to layer 1. This allows transactions to be much faster and cheaper, but still benefit from the security of the Ethereum mainnet.

There are two types of rollups: optimistic rollups and zero knowledge (ZK) rollups.

  • Optimistic rollups: Layer 1 assumes transactions are valid by default, and the validity of the transaction is computed only when challenged.
  • ZK rollups: Proof of the validity of transactions is computed on layer 2 and submitted to layer 1.

The biggest differentiator between Optimistic and ZK rollups is that Optimistic rollups use standard cryptographic technology. There already is a live public network that implements Optimistic rollups. Optimistic rollups are EVM-compatible, so anything possible on layer 1 is possible on layer 2. The biggest drawback is that due to a long challenge period, there are long wait times to move assets between layer 1 and 2 (seven days or more). The previously mentioned Polygon (MATIC) currently utilizes Optimistic rollups.

ZK rollups use a new kind of cryptographic technology. There are no live public layer-2 solutions using ZK rollups (as of Q3 2021), nor is there likely to be for some time. Also, the computation required to do zero knowledge proofs is very high, though it's dropping as the technology matures. Finally, some implementations of ZK rollups are not EVM compatible. Still, ZK rollups have all of the benefits of Optimistic rollups plus there is no delay moving assets between layer 1 and 2.

In time it seems that ZK rollups will replace Optimistic rollups as the preferred rollup technology. Indeed, Polygon (MATIC), as an example, has ZK technology on their roadmap.

Layer-2 ecosystem

All of these solutions are not mutually exclusive. Their strengths and weaknesses lend themselves to particular applications or user needs. As you may have noticed with Polygon, it uses Plasma and Optimistic rollups. Polygon also uses Proof of Stake, which enables faster and cheaper transactions than Proof of Work.

Layer-2 solutions are not the only avenues being pursued to increase the scalability of Ethereum. There is also ETH 2.0 and sharding, which potentially will bring huge gains in speed and reduced cost, both of which can be added to layer 1, layer 2, or both.

Было полезно?

Похожие статьи

Начните здесь →
What is Ethereum?

Understand Ethereum's key characteristics.

Читать статью →
What is ETH used for?

Understand the function and utility of ETH.

Читать статью →
Who created Ethereum?

Understand the origin and early history of the Ethereum protocol.

Читать статью →
How was ETH initially distributed?

Learn about the 2014 crowdsale, the initial distribution of ether (ETH), and why it's important.

Читать статью →
What's a smart contract?

Get the basics on the "software" that runs on the Ethereum shared computer.

Читать статью →
What are ERC-20 tokens?

Learn the basics of the Ethereum token standard, what ERC-20 tokens are used for, and how they work.

Читать статью →
What's a DApp?

Understand the basics of Decentralized Applications (DApps) on decentralized networks; their features and their current limitations.

Читать статью →
What's decentralized finance?

Learn what makes decentralized finance (DeFi) apps work and how they compare to traditional financial products.

Читать статью →
What is Ethereum's monetary policy?

Learn about the issuance rate of ETH and how it's governed.

Читать статью →
What is ETH gas and how do fees work in Ethereum?

Learn about the unit for measuring transaction fees in Ethereum, get details on the Ethereum fee market, and discover how to customize the fees you pay.

Читать статью →
What is EIP 1559?

Understand how EIP 1559 overhauls the fee market in Ethereum and what it means for ETH's circulating supply.

Читать статью →
How does governance work in Ethereum?

Why governance is needed, Ethereum governance in practice, the concept of credible neutrality, and more.

Читать статью →
Начните здесь →
Начните безопасно инвестировать с Bitcoin.com Wallet
Создано более кошельков

Все, что нужно для безопасной покупки, продажи, обмена и инвестирования биткоинов и криптовалюты

Bitcoin.com в вашем почтовом ящике

Еженедельное краткое изложение важных новостей, а также образовательные ресурсы и новости продуктов и услуг, поддерживающих экономическую свободу.