The technical advantages of Layer 2 do not need to be repeated, but how to bridge Layer 2 to a Layer 1 network like Ethereum, it seems that not many people understand it? This article will provide a thorough guide on how to bridge from Ethereum to Layer 2 step by step.
For now, the encrypted network mainly consists of Layer 1 and Layer 2. We know that Layer 1 is the base layer of the blockchain network, the most typical being Ethereum, Bitcoin, Solana , etc. Layer 2 is above Layer 1, but transaction processing is faster than the base layer of Layer 1 blockchain , the cost is lower. If you are a miner, you can earn native tokens on the Layer 1 platform, such as SOL, ETH , etc., when validating transactions.
If you don’t know whether you are “in Layer 1 or Layer 2”, you can actually judge by judging whether the network relies on another blockchain to operate. If the network you are in is completely independent, then it is basically a so-called “” Layer 1 network”. At this stage, Layer 2 still needs to rely on Layer 1, and needs to feed back the processed data to Layer 1, which means that the degree of decentralization of Layer 2 will not be very good – of course, this is also to enjoy “faster speed, lower cost” has to be paid. At this stage, Layer 2 can be roughly divided into two categories, one is focused on expansion technology, and the other is focused on cross-chain bridge technology:
1. The most typical examples of Layer 2 networks in terms of capacity expansion technology include Arbitrum , Polygon , and Optimism . Each Layer 2 blockchain processes Ethereum transactions on an independent, high-speed, low-cost network before the message happens to the Ethereum blockchain;
2. The most typical examples of Layer 2 networks in terms of cross-chain bridges or token bridges include Multichain , WBTC, Ren, and Wormhole, etc. These networks allow users to transfer assets across blockchains.
In this article, we will focus on how to connect Layer 2 to Ethereum using scaling technology, not a cross-chain bridge. To get the faster transaction speeds and lower transaction costs of the Layer 2 network, you have to send funds onto the network and convert all cryptocurrencies back to the blockchain base layer (like Ethereum) if you wish . For example, you can send 10 ETH to the Loopring network, trade it on a gas-free DEX , and then cash it out on the Ethereum blockchain. But how are these operations accomplished? Now, let’s take a look at it together.
Step 1: Select Layer 2 Network
The first thing you have to do is choose a Layer 2 network that bridges the token. (Xingjun o-daily Note: Transferring funds from Layer 1 to Layer 2 is called “bridging”, but not all bridges are multi-chain, some only work with Ethereum). Today, there are many different bridging solutions on the market, some of which need to be attached to a specific Layer 1 network – Ethereum is undoubtedly the most popular Layer 1 as it has the widest range of use cases, but network transaction processing costs are relatively high and Slower, current mainstream Ethereum Layer 2 bridges include Arbitrum, Boba, Loopring, Optimism and dYdX .
(There are other multi-chain bridges on the market, these bridge technologies mainly focus on interoperability, on these cross-chain bridges, you can port tokens between blockchains without worrying about whether the target blockchain supports native assets, However, this article does not focus on these cross-chain bridges for the time being.)
Step 2: Prepare your wallet
Layer 2 bridges are accessible through non-custodial Web 3 wallets, currently the most popular wallet for crypto users is MetaMask, although most wallets should be able to connect to Layer 2. Next, you need to deposit the assets you plan to send through the Layer 2 bridge in your wallet, as well as some Layer 1 native tokens to support the transaction completion, and if your Layer 1 is Ethereum, you need to prepare some ETH.
Step 3: Bridging
Next, you need to go to the target Layer 2 gateway. For better illustration, we choose Optimism, but the processing methods of other Layer 2 gateways are basically the same, and there will not be much difference. Once you have selected your gateway, you will see a screen like the following:
At this point, you can convert any ERC-20 tokens on the Layer 1 network (or ETH itself) to “on the bridge”, and the bridging technology will then move your tokens to the Layer 2 network. As an example in the image below, we entered 0.01 ETH, which is $27, and you will see a screen like the following:
In order to transfer assets, we have to pay gas fees on Ethereum, in this case the quote from MetaMask to us is about $12.50, as shown in the image below:
Don’t worry about this fee being more expensive, because we know that after this fee is paid, all transactions will be much cheaper. It takes about 20 minutes for the asset to reach Optimism, and when the transaction is complete, we get the following message:
Step 4: Make a transaction on Layer 2
After completing the above three steps, your tokens should now be on the Layer 2 network, which means these tokens can be used in any decentralized finance protocol that integrates Layer 2, or can also be used with other Layers 2 wallets for direct transactions. Below, let’s continue with the Optimism example, we can now trade on Uniswap via the Optimism Layer 2 bridge instead of using the more expensive Ethereum mainnet.
To do this, we switch to the Optimism network by clicking on “Optimism” in the network selection tab after the payment is complete, and give MetaMask permission to “change the network from Ethereum to Optimism”.
Needless to say, transactions on Layer 2 should be cheaper and faster, and on Uniswap, there is a fee of about $15 to convert 0.01 ETH to DAI, and on Ethereum it costs about $27. But when you switch to Optimism to trade 0.0099 ETH, Optimism charges less than $1 in transaction fees, and the entire transaction takes only 1.5 seconds to process.
Arbitrum works almost exactly the same way, other bridges may work slightly differently, but the differences are small. Occasionally, you may pay transaction fees in the Layer 2 native cryptocurrency, but in most cases, you may not pay any fees at all.
Step 5: “Return” funds to Layer 1 Mainnet
This step depends on personal preference. If you wish, you can trade in the Layer 2 network indefinitely, without necessarily interacting with the base layer blockchain mainnet. However, if you want to move your funds back to the mainnet, you can also transfer funds to the Layer 1 mainnet at any time by reversing the bridge transaction.
To “return” funds to the Layer 1 mainnet, the time required for different blockchain bridging technologies varies. For example, if your withdrawal transaction uses Optimistic Rollups technology, it will take about a week or so to see your transaction on Ethereum. The reason it takes so long is because Optimistic Rollups is a technology that both Optimism and Arbitrum rely on to allow blockchain validators to resolve any disputes that may arise from transactions that appear to be fraudulent.
Frankly, a week is indeed a long time, and Ethereum co- founder Vitalik Buterin has also questioned this. If you can’t stand this long, you can also use zk-Rollups technology, which allows withdrawal transactions to be completed in just a few minutes, but may be risky as it does not support dispute resolution mechanisms.
In short, the emergence of Layer 2 has indeed solved many blockchain base layer problems, and I hope this guide can help you “save some money”.
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/teach-you-how-to-bridge-from-ethereum-to-layer-2/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.