CORE CONCEPTS
You’ve interacted with several dapps now, including ENS and POAP, and observed that some of your transactions on those dapps required paying hefty gas fees. Today we’re going to move some of your assets off a Layer 1 blockchain like Ethereum and onto a Layer 2 blockchain called Polygon. The process of moving assets from one chain to another chain is called bridging. Once you’ve bridged some of your assets to Polygon, you’ll be able to perform transactions for significantly less gas.
When you claimed your POAP, you may have noticed a small message above the “Mint POAP token” button that said “Free minting in xDAI”.
POAP runs on a separate blockchain called Gnosis Chain. Gnosis Chain is a side chain that is compatible with Ethereum’s network but designed to facilitate low cost, nano-transactions or complex transactions that would otherwise be prohibitively expensive on Ethereum. xDAI is the native currency of Gnosis Chain, just like ETH is the native currency of Ethereum.
Critically, side chains like Gnosis Chain lack the security and decentralization of Ethereum. But they offer a fun playground for projects like POAP. And, because they are compatible with Ethereum, a person can easily migrate assets (like POAPs) off Gnosis and onto the Ethereum network if they are need of greater security or just want to plug in more directly with the Ethereum ecosystem.
Side chains still have gas fees in their native currency. However, the gas fees on side chains are negligible (fractions of a cent) because there is much less demand for blockspace and lower security requirements. In the case of Gnosis Chain, the negligible gas fees, which are denominated in xDAI, are covered directly by the POAP project and therefore feel invisible to users.
However, if you did want to migrate your POAP off Gnosis Chain and onto Ethereum, then you would pay a (high) ETH gas fee to complete the transaction.
Each side chain has its own rules, functions, purposes, and security parameters.
A “Layer 2” is a form of side chain that relies on the security and infrastructure provided by the Layer 1 network (ie, Ethereum in our case), but that is optimized to increase transactional throughput and reduce gas fees. All transactions performed on a Layer 2 eventually settle to Layer 1.
For example, a Layer 2 chain may handle 10,000 transactions on its own chain and then settle all this through a single transaction on a Layer 1 chain.
Our traditional financial system works like this, too. If I transfer $5 from my bank account at Chase to your bank account at Wells Fargo, the transaction between the two banks is not settled on the spot. Rather, my transaction is being bundled with lots of other inter-bank transactions and being settled as part of a batch.
Layer 2 solutions are an elegant way to scale usage of the Ethereum network without sacrificing too much in terms of security and decentralization.
Haseeb Qurashi elaborates on the notion of “vertical scaling” in his piece comparing blockchains to cities.
Ethereum can be thought of like New York City - real estate is dense and expensive. It is much cheaper to build vertically than horizontally. However, no matter how high up you build, you are still bound by the laws of New York City. Even skyscrapers cannot escape the congestion of the underlying city. You are still dependent on the same underground water, sewerage, transportation infrastructure to keep things functioning.
To extend the analogy, suburban counties in the Tri-State Area are like side chains of New York City. Many of the things people want to do can be satisfied without living in New York City - and oftentimes more cheaply and conveniently. It is straightforward (but not free) to commute back and forth from suburbs to New York City for certain needs. For many people, the suburbs offer the best of both worlds.
Ultimately, suburbs have different rules and are optimized for different types of activities than major cities. A major city will likely survive just fine without one of its suburbs, but a suburb in northern New Jersey would face an existential crisis if it were to be cut off from New York City.
OK, that was a lot of theory and conceptual frameworks…
Let’s move some assets onto Polygon so we can take advantage of low gas fees. Polygon is one of the largest and most popular Layer 2 chains built on top of Ethereum.
There are many dapps for bridging, but we’ll use Zapper for our example. Go to the Zapper website (zapper.fi) on your MetaMask-enabled browser. (I also recommend adding a bookmark for Zapper to your browser, since we’ll be coming back here often.)
After you click Connect wallet, choose MetaMask from the list of wallet options. Your MetaMask extension will pop-up asking you to sign the transaction.
Connect and you’ll find yourself on a homepage that shows your ENS name and the contents of your wallet. Remember, you own your data. You are simply bringing it with you when you connect to Zapper.
On the left sidebar, you’ll see an option to Bridge. Click on it and you’ll get a screen that prompts you to select the type of transfer you want to make.
Once you get this screen, follow these steps to configure your transfer properly:
It might take a couple attempts before you are able to enter all of these fields and get the Confirm button to appear on the bottom of the widget. Be patient. Refresh the page if you need to.
A lot is happening behind the scenes here. Zapper is trying to find the best bridge for you to use, to estimate the gas fee, and to track the current ETH/WETH token values on either side of the bridge. Sometimes, during periods of high throughput and market volatility, it may be necessary to adjust the Slippage Tolerance to a value higher than 5%. This gives the bridging algorithm a bit more wiggle room to fulfill your order.
Although the screen may refresh and update a few times while you’re preparing your transaction, hopefully you can get a gas fee less than $10 and hit Confirm.
Once you hit Confirm, MetaMask will prompt you to sign the transaction. Sign and then you’ll get a notification stating that the transaction is processing. My notification says the transaction could take up to 8 minutes to resolve.
While we wait for this to go through, let me explain a bit more about what’s happening behind the scenes.
When we set up our transaction, you’ll recall we sent ETH from the Ethereum chain and received WETH on the Polygon chain.
What’s actually happening is that, on one side of the bridge, our ETH is getting locked up and taken into custody by the bridge provider. On the other side of the bridge, the provider is minting a new token for you - WETH - which is of equivalent value and collateralized by the ETH on the other side of the bridge.
It took me some time to wrap my head around this concept (sorry). Tokens like Wrapped Ethereum and Wrapped Bitcoin are tokenized versions of cryptocurrencies that are pegged to the value of the original coin and can be unwrapped at any time.
Hopefully you’re reading this ~10 minutes or so after you confirmed your bridging transaction.
Now, go back to your Zapper homepage (click Home or the Zapper logo up top). You should see a new item in your wallet - some WETH.
This is proof that the bridging was successful. Now you have some WETH on the Polygon network that you can transact with. And in subsequent days you’ll see that your WETH goes much farther on Polygon due to reduced gas fees.
There’s just one final step though.
Click the MetaMask extension on your browser to pull up your wallet. You should see a dropdown at the top that says “Ethereum Mainnet”. Right now, you are connected to the Ethereum network. But, in the future, we’ll want to do transactions on the Polygon network too.
There are two ways to add the Polygon network to your MetaMask.
Option 1
In your browser, go to polygonscan.com and scroll to the bottom of the page. Click the button to Add Polygon Network.
MetaMask will pop up asking you to approve the transaction. Click Approve and then follow the prompt to Switch network. You’re done!
Option 2
In your MetaMask extension, select the dropdown that says “Ethereum Mainnet” and click Add Network. You’ll get a form that needs to be filled with information about the Polygon network. You can copy the information below into the form.
Once you’ve added the information, click Save. You will be directly switched to “Polygon Mainnet” in the network dropdown list.
You are now connected to the Polygon aka Matic network. If you go back to Zapper and refresh the page, it should look exactly the same except you’ll see that your are on the Polygon network now instead of Ethereum.
You can change back to Ethereum by toggling the network button either on Zapper or directly on your MetaMask extension.
Today covered a lot of ground, so let’s do a quick recap:
Don’t worry if this feels a bit fuzzy. The next few days’ activities are straightforward - and you won’t be spending any (significant) ETH or WETH on gas fees.