Polygon (MATIC) 101 Guide: How To Save ETH Gas Fees in DeFi! Set up Polygon Network on Metamask Wallet

By June 13, 2021Polygon
Click here to view original web page at medium.com

One of the promises of cryptocurrency is to create an open and free financial system. This is exactly what the world of decentralized applications provides and most of the best DeFi dApps exist on Ethereum.

There’s just one problem and that’s network fees. While Ethereum’s gas fees aren’t nearly as bad as they were a few weeks ago are still practically high for many users and are only a matter of time before they start to tick up again too.

Luckily there’s a cryptocurrency called Polygon which hosts some of Ethereum’s most popular DeFi dApps and even leverages the Ethereum blockchain for security. Most importantly, Polygon makes it possible for you to store, transfer, and use your favorite Ethereum tokens and a near-zero cost.

Today, I’m going to show you how to set up your own Polygon wallet. How to transfer ERC20 tokens to the Polygon chain, and how to use them in a couple of Polygon’s most popular DeFi protocols.

Disclaimer: All the content converted from Coin Bureau’s “Polygon 101 Guide: How To Save ETH Gas Fees in DeFi!” video after getting the whole permissions.

What is Polygon?

If you’ve never heard of Polygon’s before, let me bring you up to speed. Polygon was founded in 2017 by a team of talented Ethereum developers who were instrumental in developing some of Ethereum’s scaling technologies.

Polygon was originally called Matic Network and rebranded to Polygon earlier this year to signal the project shift from just being a single layer-2 chain to providing a toolkit of scalability solutions for Ethereum.

In plain English, scalability, basically means speed. And the whole purpose of Polygon is to increase the speed of the Ethereum blockchain while maintaining Ethereum security. The way Polygon achieves this is by creating a copy of the Ethereum blockchain called a child chain, which is more than 500 times faster than Ethereum.

This child chain runs parallel to Ethereum and a middle layer of validator nodes. Periodically submits a snapshot of this child chain to the Ethereum blockchain.

These snapshots make it possible to recover your cryptocurrency from the Polygon child chain if it suddenly goes offline. That said it is important to note. The Polygon does not protect you from any transaction manipulation that could occur on the child chain itself. This is really the only risk associated with using Polygon, and it’s one that’s extremely small because of Matic staking.

The validator nodes that submit snapshots of the child chain to Ethereum need to stake MATIC tokens. If they try to manipulate their snapshots then some of the tokens they staked it destroyed.

The MATIC token is also used to pay for gas fees on Polygon and Polygon’s gas fees are thousands of times smaller than those on Ethereum.

Polygon’s speed and low cost have made it a popular alternative to Ethereum, especially since many of Ethereum’s most popular dApps have been migrating to Polygon.

Now, if you want to learn more about Polygon, you may reach my recent Medium post about Polygon.

How To Create Polygon Wallet With Metamask

To use Polygon, you’re going to need a MetaMask browser extension wallet. If you don’t already have a MetaMask wallet, you can read my tutorial about how to set up using my Medium post below.

Now, the first thing we need to do is make our MetaMask wallet compatible with the Polygon blockchain.

Open up your MetaMask wallet, click the three dots on the right-hand side of your wallet address and click expand view.

This should open up a new webpage that looks like this. The reason why we’re doing this is to make it easier to enter information about the Polygon blockchain.

Click on the top right of the web page where it says is Ethereum mainnet. This should open a set of network options and at the bottom, you’ll see an option called Custom RPC. Click on that.

This will take you to a page where you can enter all the blockchain details for Polygon.

You can follow the below steps and fill in as explained.

How do I set up Polygon (MATIC)?

For more info, see their official docs. 218

Polygon Mainnet

Network Name: Polygon Mainnet
New RPC URL: https://rpc-mainnet.maticvigil.com/ 248
ChainID: 137
Symbol: MATIC
Block Explorer URL: https://explorer.matic.network/ 83

Polygon Testnet

Network Name: Mumbai TestNet
New RPC URL: https://rpc-mumbai.maticvigil.com/ 7
ChainID: 80001
Symbol: MATIC
Block Explorer URL: https://mumbai-explorer.matic.today/

Now, be sure to enter all the information correctly. After you’ve done that, click the save button at the bottom. This should automatically add the MATIC Network to the blockchain options in your MetaMask wallet, and you can close out the window.

How To Add Ethereum Tokens To Polygon Wallet

Once you’ve made your MetaMask wallet compatible with Polygon. The next step is to load up your MetaMask wallet with the Ethereum tokens you want to use on Polygon.

Now, this is easier said than done, because you cannot send any Ethereum tokens directly to the MATIC wallet address you just created on MetaMask.

You need to send these to your Ethereum wallet address on MetaMask first so that they can be converted using the Matic Bridge.

This conversion process is going to require some ETH and MATIC. What this means is that you need to have ETH and MATIC in addition to the other tokens you want to use on Polygon.

Before you send any of these tokens to your MetaMask, make sure you’ve changed the network back to Ethereum in your MetaMask wallet.

In this case, I’ve set myself some ETH, MATIC, and USDC.

Next head over to the MATIC wallet website. You should automatically be prompted to connect a wallet.

Pro-tip, if the prompt doesn’t show up and the page just keeps loading, it’s because there seems to be a conflict between the MetaMask wallet, and Coinbase wallet browser extensions.

So, you’ll have to uninstall the Coinbase wallet extension, if you have it but make sure you have your seed phrase handy before you do that, or else you could lose your crypto on your Coinbase browser extension wallet.

After clicking on MetaMask, you’ll need to sign the transaction.

This will bring you to the main screen of the MATIC AKA Polygon wallet, click on the blue button that says move funds to MATIC mainnet.

This will bring you to the MATIC bridge where you can start swapping all the cryptocurrencies in your Ethereum MetaMask Wallet to your Matic MetaMask wallet.

Pro-tip, start by converting your MATIC tokens, so you can get a sense of how much the process will cost in ETH gas.

The last thing you want is to send over your ETH, and not have enough ETH for gas to do the same for the other tokens.

To do this. Click on where it says Ether. This will open up a search screen for other Ethereum tokens.

In this case, I’m looking for a MATIC token.

As you can see, I’ve selected the maximum amount of MATIC tokens in my wallet. Next, click transfer.

You’ll get a pop-up that tells you how long the process will take and if you click continue, it will tell you how much the conversion will cost in ETH gas.

When you click continue again, you’ll have to give permission to the Matic Bridge to access the MATIC tokens in your Ethereum wallet, and this costs gas.

After waiting for a bit, you’ll be asked again to click continue to pay the gas fee in ETH for the actual conversion.

Now, while I wait for my MATIC tokens to make it over, I’m going to go through the same conversion process with my USDC.

This time, I’ll do it with more gas just to speed everything up.

Once the transfers have confirmed, you can close out the window and click back to the wallet on the top left side of the screen.

The balance of the cryptocurrencies, who transferred to your MATIC address should be visible on the Polygon bullet home page.

How To Fix Missing Tokens On Polygon Wallet

Open your MetaMask wallet browser extension and switch back to the MATIC blockchain. The balance of your tokens should show up automatically.

If one of the tokens is missing, you’ll have to get technical information about this token and this can easily be done using the Polygon wallet homepage.

Since my USDC isn’t showing up, I’m going to click on those three dots on the right side where my USDC balance is showing on the Polygon wallet homepage. This will let me add it to my MATIC MetaMask wallet.

After clicking, add to MetaMask a prompt should pop up that will ask you to add the token.

As you can see, my USDC is now in my MATIC MetaMask wallet, and now I’m ready to play around on Polygon.

How To Use Aave On Polygon

One of my favorite DeFi protocols on Ethereum is AAVE, and AAVE happens to be on Polygon as well.

Now AAVE is a decentralized lending and borrowing protocol that lets you lend and borrow cryptocurrency without a bank or credit score.

The advantage of using AAVE on Polygon is that it is more than 500 times faster and more than 10,000 times cheaper than it is on Ethereum.

To connect to AAVE on Polygon make sure you’ve selected the right market on the right-hand side of the AAVE app website.

Just above the option of the market, you’ll see a button that says “Connect”. When you click it a window will pop up giving you all your web wallet options.

You’ll see that it gives you the option to switch from the Ethereum mainnet to the Polygon mainnet just underneath where it says connect your wallet.

Because you’re using a MetaMask wallet, you’ll need to click on the browser wallet.

This will automatically open up your MetaMask wallet, and ask you to confirm that you want to connect to AAVE. Once that’s done you’re ready to start lending and borrowing.

Now, I happen to be pretty bullish on the MATIC token. So I’m going to deposit some of my MATIC tokens as collateral to get USDC and buy even more MATIC tokens.

When you click on the token you want to deposit on AAVE, you’ll be given this big screen with a bunch of statistics. The only things you really need to take note of here are the interest rates for lending and borrowing.

On the right-hand side, you’ll see a small button that says deposit, click on it.

In this case, I’m going to deposit all but two of the MATIC tokens I have to make sure I have enough for gas fees. Then I click continue.

This will give me a MetaMask wallet prompt to pay for the gas fee for the deposit. As you can see, the fee is just 0.001 MATIC tokens.

Once the transaction has gone through, click on the dashboard button that lights up in purple.

This will bring you to the borrowing terminal. Click on borrow now. Now you’ll be able to choose which cryptocurrency you want to borrow. It doesn’t have to be the same one you deposited and you don’t have to borrow if you don’t want to. In this case, I want more USDC. So I’m going to click on USDC.

This next screen is where you want to be extremely careful. At the bottom, you can see that there’s a multicolored slider with safer on the green end and riskier on the red end.

As a rule of thumb, you want to avoid the risky end. Because, if the cost of the cryptocurrency you’re borrowing goes up past that red zone. Due to a price gain or an accumulation of debt, the cryptocurrency you deposited will be sold.

Since I’m only going to be borrowing this USDC for a short time, I’m going to borrow 10 USDC which is a bit deeper in the red zone.

Next, I’ll be given the choice to select my interest rate. Normally, AAVE gives you the option to have a stable or variable borrowing interest rate, but only the variable one is available right now apparently.

After clicking on variable click continue. This will bring you to the borrow overview page, where you pay the gas fee to move that crypto from AAVE into your MATIC wallet on MetaMask.

Once that’s complete, you can click on dashboard and this will bring you to the overview of what cryptocurrencies you’re lending and borrowing on AAVE.

When you open up your MetaMasked wallet browser extension, you should see the cryptocurrency you borrowed pop up in your balance. In this case, I have an extra 10 USDC that I can use to buy MATIC.

How To Use Quickswap On Polygon

Even if you’ve never used DeFi before, you’re probably familiar with Uniswap.

Uniswap is an automated market-maker decentralized exchange. In plain English, it uses the ratio of two assets in a pool to determine their price, and the entire exchange is decentralized because it exists on the Ethereum blockchain.

Anyhow, Uniswap doesn’t actually exist outside of Ethereum for the time being. That’s why Polygon has its own version of Uniswap called Quickswap. Now, Quickswap is basically a carbon copy of Uniswap with a few minor details that I won’t go into here.

As I mentioned earlier, I’m bullish on the MATIC token and I want to get as much of it as I can while selling the least amount of crypto that I can.

Because I’m using my existing MATIC tokens as collateral on AAVE. This means I still technically owned them. Those MATIC tokens haven’t been sold. All I’ve done is use them as collateral to get more USDC.

Now I can use that extra USDC to buy even more MATIC tokens than if I had simply used the 40 USDC I had before, and I’m going to use Quickswap to do that.

Using Quickswap is super straightforward, just click connect wallet on the top right-hand corner, select MetaMask, and firm in your wallet that you want to connect to Quickswap and you’re all set.

To swap a cryptocurrency, just select the one you want to swap from and the one you want to swap to.

Select the amount, click approve, and then pay the minuscule gas fee in MATIC tokens.

After the approval is finished, you’ll have to click swap, click confirm swap, and once again, the gas fee in MATIC tokens is so small that it doesn’t even register as a dollar amount.

The same transaction on Uniswap would cost between ten and twenty dollars.

I now have 36 MATIC tokens plus the 20 MATIC tokens are deposited into AAVE. If I were a real gambler, I could deposit at 36 MATIC and borrow even more USDC to borrow more MATIC, and so on.

Once you’re done with all your DeFi shenanigans, it’s time to move those profits off Polygon and back onto Ethereum. So you can cash out somewhere.

How To Move Polygon Tokens Back To Ethereum

Moving your crypto off Polygon is just the reverse of the process you use to get your crypto onto Polygon. Start by going back to the Polygon aka MATIC Bridge.

Where’s the for you were swapping from Ethereum to Polygon, this time you’re going to swap from Polygon to Ethereum. First, click on the switch button in the middle of the swapping box.

Then click on the token option and find the token you want to swap back to an Ethereum. I’m going to start with USDC.

When you click transfer you’ll be shown a similar window to the one, when you were transferring from Ethereum to Polygon.

The difference is that the reverse process takes around one hour of regular Polygon’s tokens and seven days for tokens that are noted as being on the plasma chain such as the MATIC token.

The ETH gas fee for this is quite expensive. So I’m just going to convert all of my MATIC into USDC so that I can do the entire withdrawal in one transaction.

Thankfully, the fee to approve my USDC for transfer is cheap since it’s coming off the Polygon chain. As you can see, the reason why moving your funds from Polygon to Ethereum takes so long is because you must wait for the next snapshot to be submitted to the Ethereum blockchain.

Once that snapshot has been completed, you’ll have to open up the MetaMask browser extension wallet and switch back to the Ethereum blockchain.

When you click confirm, you’ll have to pay that hefty fee in ETH gas, and your token should be back in your Ethereum wallet within 10 minutes depending on how congested the blockchain is and how much gas you’re paying.

Now that your crypto is back in your Ethereum wallet, you can send it to crypto to fiat payment gateway to cash out, or back to exchange for some more crypto trading.

All Today's Crypto News In One Place