Layer 2 ethereum что это
Перейти к содержимому

Layer 2 ethereum что это

  • автор:

Layer 2 is the future, and here is why

imToken

Ethereum fees are high because people are using it? “Layer 2” seems to be the magic word for solving all these problems. But are Layer 2s actually already here yet? Are they able to keep their promise of lowering fees for everybody?

Let’s take a look at Layer 2 today!

Why are Ethereum fees high, and what does scalability really mean?

Blockchains are limited. Ethereum for example chooses to be very decentralized while still being secure and scalable.

  • Decentralized means that everybody can join.
  • Secure means it’s very expensive for an attacker to double spend.
  • And scalable means throughput and speed are big enough for many applications and users to use Ethereum

The problem is that blockchain developers have to choose two out of three options. For example, you can’t build a blockchain that’s super fast while still running on the laptops of everyday users. And, you can’t build a super fast and secure blockchain that is expected not to go offline once a power outage hits the 10 servers that run it.

Ok, Ethereum tries to be decentralized and secure first, and scalable second. But why are fees high?

Low scalability just means that users are competing for less space in a given block. Today, 200–300 transactions are included in an average Ethereum block. If you want your transaction to be part of it, you have to pay a fee. Otherwise miners don’t mine. And with more people wanting to be included, the fee you have to pay increases. A “fee market”.

Now, the Ethereum community does have a plan on how to increase scalability. The switch to POS with Eth2 is a major part of that, but today we will look at the second part: Layer 2.

What is Layer 2?

Layer 1 is the Ethereum mainnet. If you used Ethereum before, that’s the blockchain that you used.

Layer 2s are a scaling solution. Most current scaling solutions fall into this category. But others you might come across are: Sidechains, state-channels, and actually scaling solutions for layer 1 such as sharding.

Layer 2s, however, are a special kind of scaling solution. They are blockchains that derive security from Layer 1.

Because today most Layer 2 solutions refer to zk-rollups and optimistic rollups, let’s continue with taking a look at those while ignoring Plasma (which has more information here).

Click here to check out Layer2 solutions.

How do rollups work anyways?

Compared to Layer 1, rollups (i.e. zk-rollups and optimistic rollups) keep a big chunk of information off-chain. Since only a small portion of the information needs to be confirmed on the expensive Layer 1, each Layer 2 transaction is comparatively cheap.

The bare minimum of information a rollup publishes is a so-called “state root”. A hash over all recent transactions that proves consistency and their outcome, e.g. “Max received 10 ETH from Alice, and Bob received 5 ETH from Charlie”.

Now rollups only need to prove that those transactions are correct, they actually happened. And the two major rollup types have two different approaches.

Optimistic rollups give users the option to use “fraud proofs”, to show a smart contract on Layer 1 that the recent transactions batch should be reverted.

Zk-rollups do the opposite. They use a cryptographic proof (e.g. called a ZK-SNARK), which mathematically proves a state root to be correct.

At the same time, rollups still support all the kinds of computation that Layer 1 does, too. Which means all of DeFi and so on works on Layer 2.

Is it worth using a Layer 2 already?

We are somewhere at the beginning of the Layer 2 era.

On one hand, you need to use bridges — compare gas — or try exchanges or layerswap.io, to get your tokens from Layer 1 to Layer 2. DApps are still somewhat limited on Layer 2, and there are risks involved: https://l2beat.com/?view=risk

On the other hand, using Layer 2 is already a lot cheaper than using Ethereum mainnet.

$5.83 B TVL shows that people are using it.

We suggest checking out imToken’s DApp listings, or jumping to Arbitrum or Optimism’s DApp lists, with over 70 DApps.

Get started using Layer 2 on imToken

imToken holds the same vision of enabling everyone to have free and equal access to their digital life through blockchain as Layer 2. That’s why it has been deeply committed to the Layer 2 ecosystem. Since the beginning of 2021, new Layer 2 functions have been available in the wallet with multiple leading DApps using different Layer 2 solutions.

You need to first download and install imToken to experience the ecosystem. Here is the download link: https://token.im

How to experience zkSync in the wallet?

zkSync is a Layer 2 scaling solution for Ethereum based on zkRollup. It is designed to support efficient payment with low costs in the network where users’ asset security can be protected by zero-knowledge proof and on-chain data availability.

  • To enable your zkSync wallet, open imToken and click “My Profile” at the right bottom corner, and click “Explore”.
  • Click “Deposit” to enter the deposit page, then deposit the assets in your Ethereum mainnet address into the zkSync network. After receiving the deposited assets, you can enjoy efficient and low-cost payment in it.

How to Use imToken’s Custom Network Function?

The custom network function of imToken allows you to rapidly switch between different Layer 2 networks, including Arbitrum, Optimism, and Polygon.

At the same time, features such as the automated token discovery and the display of prices and assets in DeFi protocols in the Layer 2 network are accessible in the wallet. With these features, Layer 2 users can better manage their assets.

Let’s Take Arbitrum as an Example.

  • It is recommended that you should first deposit before using the Arbitrum wallet so that transferring and using the DApp will be easier for you.
  • You can deposit in the following two ways:
  • Withdraw your assets from exchanges that support the Arbitrum network, such as Binance and FTX, to your Arbitrum address, which is the same as your Ethereum one.
  • Use the Arbitrum Bridge DApp to deposit the tokens in your Ethereum wallet into your Arbitrum address.

Switch the network

  • Click “Wallet” at the left bottom corner then click “Ethereum Mainnet” at the top. Choose “Arbitrum” in the pop-up to switch to the Arbitrum network.

Experience Layer 2 DApps

  • Click “Ecosystem DApps” then you can see the most popular DApps in the Arbitrum ecosystem.

Use Layer 2 bridges on imToken

Users can get access to leading Layer 2 Bridge DApps in imToken. If you are a frequent user of different Layer 2 networks, you can use those DApps, including cBridge, Multichain, and Hop Protocol by searching them on the “Browser” page. In this way, you can effortlessly move your assets among those networks.

Layer 2

Scaling Ethereum without compromising on security or decentralization.

  • What is layer 2
  • Use layer 2
  • Move to layer 2

Illustration of transactions being rolled up on Layer 2 and posted to Ethereum Mainnet

TVL locked in layer 2 (USD)

Average layer 2 ETH transfer fee (USD)

Layer 2 TVL change (30 days)

What is layer 2?

Layer 2 (L2) is a collective term to describe a specific set of Ethereum scaling solutions. A layer 2 is a separate blockchain that extends Ethereum and inherits the security guarantees of Ethereum.

Now let’s dig into it a bit more, and to do this we need to explain layer 1 (L1).

What is layer 1?

Layer 1 is the base blockchain. Ethereum and Bitcoin are both layer 1 blockchains because they are the underlying foundation that various layer 2 networks build on top of. Examples of layer 2 projects include "rollups" on Ethereum and the Lightning Network on top of Bitcoin. All user transaction activity on these layer 2 projects can ultimately settle back to the layer 1 blockchain.

Ethereum also functions as a data availability layer for layer 2s. Layer 2 projects will post their transaction data onto Ethereum, relying on Ethereum for data availability. This data can be used to get the state of the layer 2, or to dispute transactions on layer 2.

Ethereum as the layer 1 includes:

A network of node operators to secure and validate the network

A network of block producers

The blockchain itself and the history of transaction data

The consensus mechanism for the network

Still confused on Ethereum? Learn what Ethereum is.

Why do we need layer 2?

Three desirable properties of a blockchain are that it is decentralized, secure, and scalable. The blockchain trilemma (opens in a new tab) ↗ states that a simple blockchain architecture can only achieve two out of three. Want a secure and decentralized blockchain? You need to sacrifice scalability.

Ethereum has reached the network's current capacity with 1+ million transactions per day (opens in a new tab) ↗ and high demand for each of these transactions. The success of Ethereum and the demand to use it has caused gas prices to rise substantially. Therefore the need for scaling solutions has increased in demand as well. This is where layer 2 networks come in.

Scalability

The main goal of scalability is to increase transaction speed (faster finality) and transaction throughput (higher transactions per second) without sacrificing decentralization or security.

The Ethereum community has taken a strong stance that it would not throw out decentralization or security in order to scale. Until sharding, Ethereum Mainnet (layer 1) is only able to process roughly 15 transactions per second (opens in a new tab) ↗ . When demand to use Ethereum is high, the network becomes congested, which increases transaction fees and prices out users who cannot afford those fees. That is where layer 2 comes in to scale Ethereum today.

Benefits of layer 2

Lower fees

By combining multiple off-chain transactions into a single layer 1 transaction, transaction fees are massively reduced, making Ethereum more accessible for all.

Maintain security

Layer 2 blockchains settle their transactions on Ethereum Mainnet, allowing users to benefit from the security of the Ethereum network.

Expand use cases

With higher transactions per second, lower fees, and new technology, projects will expand into new applications with improved user experience.

How does layer 2 work?

As we mentioned above, Layer 2 is a collective term for Ethereum scaling solutions that handle transactions off Ethereum layer 1 while still taking advantage of the robust decentralized security of Ethereum layer 1. A layer 2 is a separate blockchain that extends Ethereum. How does that work?

A layer 2 blockchain regularly communicates with Ethereum (by submitting bundles of transactions) in order to ensure it has similar security and decentralization guarantees. All this requires no changes to the layer 1 protocol (Ethereum). This lets layer 1 handle security, data availability, and decentralization, while layer 2s handles scaling. Layer 2s take the transactional burden away from the layer 1 and post finalized proofs back to the layer 1. By removing this transaction load from layer 1, the base layer becomes less congested, and everything becomes more scalable.

Rollups

Rollups are currently the preferred layer 2 solution for scaling Ethereum. By using rollups, users can reduce gas fees by up to 100x (opens in a new tab) ↗ compared to layer 1.

Rollups bundle (or ’roll up’) hundreds of transactions into a single transaction on layer 1. This distributes the L1 transaction fees across everyone in the rollup, making it cheaper for each user. Rollup transactions get executed outside of layer 1 but the transaction data gets posted to layer 1. By posting transaction data onto layer 1, rollups inherit the security of Ethereum. There are two different approaches to rollups: optimistic and zero-knowledge — they differ primarily on how this transaction data is posted to L1.

Уровень 2

Масштабирование Ethereum без ущерба безопасности и децентрализации.

  • Что такое «уровень 2»
  • Использовать уровень 2
  • Перейти к уровню 2

Иллюстрация транзакций, свернутых на уровне 2 и размещенных в основной сети Ethereum Mainnet

TVL, заблокированные на уровне 2 (USD)

Средняя комиссия за перевод ETH на уровне 2 (USD)

Изменение TVL на уровне 2 (последние 30 дней)

Что такое «уровень 2»?

Уровень 2 (L2) — это собирательный термин для описания определенного набора решений для масштабирования Ethereum. Уровень 2 — это отдельная цепочка блоков, которая расширяет Ethereum и наследует гарантии безопасности Ethereum.

Теперь давайте рассмотрим этот вопрос немного глубже. Чтобы это сделать, нужно объяснить, что такое «уровень 1» (L1).

Что такое «уровень1»?

Уровень 1 — это основа блокчейна. Как Ethereum, так и Bitcoin являются блокчейнами уровня 1, поэтому они являются основой, поверх которой построены различные сети уровня 2. Примеры проектов уровня 2 включают «свертки» Ethereum и сети Lightning поверх Биткоина. Все действия пользователя с транзакциями в таких проектах уровня 2 могут в конечном итоге вернуться к блокчейну уровня 1.

Ethereum служит также уровнем доступности данных для уровня 2. Проекты уровня 2 будут размещать данные транзакций в Ethereum, полагаясь на Ethereum для обеспечения доступности данных. Эти данные можно использовать для получения состояния уровня 2 или для оспаривания транзакций на уровне 2.

Ethereum, как уровень 1, включает такие элементы:

Сеть операторов узлов для обеспечения безопасности и проверки сети

Сеть производителей блоков

Сам блокчейн и история данных транзакций

Механизм консенсуса сети

Зачем нам нужен уровень 2?

Три желательных свойства блокчейна: он децентрализованный, безопасный и масштабируемый. Трилемма блокчейна (opens in a new tab) ↗ указывает, что простая архитектура блокчейна может достичь только

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *