AAVE, Quickswap and the Polygon Network (MATIC)

Mark T
19 min readAug 4, 2021

So you have probably heard about this new thing called, DeFi or Decentralized Finance. You might even already have gone so far as depositing your crypto assets in centralized lending platforms such as BlockFi or Celsius. DeFi has grown so much over the last year, it’s insane. Many people are of the opinion that together, the DeFi and CeFi financial services are soon going to surpass the old conventional finance industry. As of this writing, the TVL (Total Value Locked) for DeFi is just shy of $55B. AAVE is the largest of these DeFi protocols, but how do you make use of it? Stay tuned, cause we are going to show you exactly how to use AAVE together with Quickswap and the Polygon (MATIC) network.

What is AAVE?

AAVE is a decentralized non-custodial liquidity protocol. The Platform AAVE is used as an earning and borrowing platform. You can earn interest on your deposits on AAVE but you can also borrow funds against your assets using them as collateral. The AAVE protocol essentially performs more or less the same function as some of its CeFi counterparts like BlockFi or NEXO. Accept, that AAVE is completely decentralized as well as open-source. I will link to the Whitepaper, for those of you who are more technically inclined or simply would like a more in-depth look at the AAVE protocol. The name AAVE means Ghost in Finnish.

Of all the DeFi protocols, AAVE is the largest with a staggering TVL of over $10.8B. That’s almost 20% of the entire DeFi market, Total Value Locked. Of course, AAVE is a multichain protocol, which means it can support more than just the Ethereum network. In this tutorial, we will be focusing on how to use AAVE together with the Polygon (MATIC) Network as well as Quickswap. It has several advantages in my opinion over Ethereum in this case. One, the Fees are a lot cheaper than ETH gas fees, almost non-existent really. Two, we can earn some additional MATIC tokens while staking our assets, as well as when borrowing. That’s right, AAVE is going to pay us to borrow!

Getting Started with AAVE and MATIC

This is probably the hardest part, getting set up to use the AAVE protocol on the Polygon network. Especially if you have never used the Polygon network before. But don’t worry, we are going to go through every step of the process for you to get you set up correctly. First off, you are going to have to fund your Metamask wallet. If you do not yet have a Metamask wallet setup, check out this detailed Metamask tutorial, first.

Using the Polygon V2 Bridge — (Bridging Ethereum Assets to the MATIC Network)

Adding MATIC Mainnet to Metamask

Firstly, we are going to assume that you already have some funds in your Metamask wallet, on the Ethereum Mainnet. If not, please revisit the Metamask tutorial above. Second, we need to make sure that we have the MATIC Mainnet settings added to our Metamask wallet. Again, if you are unsure of how to do that, check out the Metamask tutorial above. If you do not yet have the MATIC network set up on your Metamask, please add the following information to Accounts -> Settings -> Networks.

Now that we have the MATIC Mainnet set up and we have also had our wallet funded, we can go ahead and send those funds over to the Polygon network. In this next step, we are going to have to bridge our ETH assets to the MATIC network. Open the Polygon Bridge in your web browser.

The Polygon Bridge

As you can see from the image above, I have MATIC and USDT in my wallet (on Ethereum) that I would like to send to the MATIC network. Note, I’m sending MATIC in addition to the USDT because the MATIC token is needed in the wallet to pay for the GAS fees on the MATIC network. Now, you don’t necessarily need $200 worth of MATIC in your wallet. I’m only going to leave about $30 worth of MATIC in the wallet (for Fees) eventually and the balance I’m going to invest in AAVE.

Bridge ETH — to — MATIC

After connecting your Metamask wallet to the Polygon Bridge, Click on, “Move funds from Ethereum to Polygon” and then select the amount (in this case MAX). Next, select “Transfer”. After which, we are going to have to confirm a series of “accept and confirmations” on both the bridge platform as well as Metamask.

Confirm Bridge Move ETH-to-Polygon

Bridge Transaction Progress

Adding Funds to Metamask Wallet

Of course, you are going to have to repeat the process for any type of ERC-20 (Ethereum) tokens you would want to send to the Polygon network. So in my case, that means the same for the MATIC tokens. Once the bridging process has been completed, you will need to add the token addresses to your wallet (otherwise, they will not be visible in the wallet). This process is quite simple, all we need to do is copy the contract address from Coinmarketcap into our Metamask wallet.

So, for the sake of full transparency — yes, I did send USDT (Tether) over to the Polygon network, not USDC. However, I later realised that USDT can’t be used as collateral on the AAVE platform, only USDC and DAI can be used as stable coin collateral. Thus, I used the Quickswap DEX (Decentralized Exchange) and quickly converted my USDT into USDC. Luckily the fees on the Polygon network are next to nothing ($0,01 for the swap! 🤯 ).

Paste Contract Address to Metamask Wallet

After you have copied the Polygon contract address of your token of choice (USDC for this post) from Coinmarketcap, you can now go ahead and add the token to the Metamask wallet. You will need to scroll down to the bottom of the Metamask extension and click on “Add Token”.

Add Token on MATIC — Metamask

Next, paste the contract address that you copied from Coinmarketcap into the Token Symbol box. The rest of the boxes will auto-populate and you can simply select, “Next”. And BOOM 💥 , we now have are tokens displaying in the Metamask wallet. Congratulations, the most arduous part is now complete — you will literally never have to do that again.

AAVE DeFi Protocol

Welcome to the AAVE app. The first thing that we need to do, is connecting our Metamask wallet to the AAVE app. To do this, we will need you to click on “CONNECT” in the top right-hand corner. You will be greeted with this window.

Next, click on the “Browser Wallet” tab and select Metamask. Metamask will prompt you to authorise or confirm this connection for the first time. After authorising the connection, you will see the AAVE Dashboard for the first time. From here we will be able to deposit assets to the AAVE platform.

We can go ahead and deposit some USDT from our Metamask wallet. After selecting “Deposit Now”, you will have the option of depositing a few different assets. From the MATIC token itself to wrapped Bitcoin as well as a variety of stable coins including USDT. In this case, we are going to deposit USDT.

Deposit on AAVE

Deposit

I’m going to go ahead and choose the max amount of USDT1,236. Again, we are going to be prompted to continue and approve the deposit at least twice by the AAVE protocol. After which, we will again need to confirm the deposit on the Metamask wallet.

Now let’s have a look at our AAVE Dashboard after the deposit.

As you can see from the image above, USDT is not available as collateral. So, as it turned out — I ended up withdrawing the USDT again and swapping it for some USDC as well as some wrapped Bitcoin (WBTC).

Exchanging Assets with Quickswap

Once on the quickswap exchange, you will again have to connect your Metamask wallet. Quickswap will allow you to swap between any tokens on the Polygon network as well as stake Liquidity Provider (LP) tokens, which is usually a combination of a token pair. The first thing we are going to do is swap that USDT for some WBTC as well as USDC. I thought buying some BTC now isn’t such a bad idea, considering the recent corrections in price. But at the same time, keeping about a third of the pot in a stable coin will allow me to hedge some of the risks, should BTC go for a further dump.

As mentioned previously I am going to swap approximately 2/3 of the $1,200 into WBTC. From the swap tab, we are going to select the coin and the amounts. Next, simply approve the transaction. Of course, Metamask is going to ask us to approve and confirm the same.

Metamask — Approve & Confirm Swap

As you can see, the fees are really low, about $0.00 in this case. I’m just going to go ahead and follow the same procedure for the USDC swap. After which I’m simply going to deposit both assets via the AAVE dashboard, exactly as we did before with the USDT. Keep in mind, you might need to go back to Coinmarketcap and just paste those contract addresses into your wallet for the funds to appear inside the Metamask wallet.

The AAVE Dashboard

The AAVE Dashboard welcomes you! Now that we have added some assets, the dashboard has a bit more info for us to look at. Let’s familiarize ourselves with some of this info before we proceed.

Top Half

As you can see, the top half of the dashboard is split into two sections. On the left, we have the total assets deposited. Nicely presented in the form of a pie chart. When hovering over the pie chart, the asset Ticker will be displayed along with its percentage of your portfolio. On the right-hand side, we have the borrowed section. This section also presents us with our total amount borrowed. It also shows us the current LTV (Loan-To-Value) ratio as well as a general Health Factor of our portfolio. More on this a bit later.

Bottom Half

The bottom part of the dashboard displays our current assets in the number of units and dollar value. In the column on the right (red block) we can see our APY (Anual Percentage Yield). As you can see, there are two numbers for each asset. The top APY number represents the percentage return you can expect on your asset in kind (paid out in the same token/coin). The second/bottom APR number represents the return you can expect on your asset in MATIC tokens. This is one of the reasons we are using the MATIC/Polygon network. Polygon is paying us a bonus to use their network instead of the Ethereum network for example. A little more on this later.

Lastly, I would like to point out the highlighted red block in the top right-hand corner. This is where these MATIC APR returns get accumulated and from where we can also claim them and send them back to our Metamask wallet.

Borrowing on AAVE

Finally, we can get to the fun part. Now that we have invested collateral into the AAVE protocol, we are now also entitled to borrow against that collateral.

Head on over to the “Borrow” tab at the top of the screen and click on it. Next, you will be presented with a screen of all available assets to borrow. I am going to choose to borrow some USDC as this is what I will be required to stake along with MATIC as an LP token in my pool of choice. Choose the amount of USDC you would like to borrow. As you can see above, I’m only going to borrow about half of the maximum amount I am allowed. USDC affords me an LTV (Loan To Value) of about 75% and the WBTC about 70%. So I’m going slap bang in the middle, purely to mitigate some risk.

Confirm Borrow — AAVE

On the following screen, I’m greeted with the interest rate at which I’m borrowing. Currently, this variable rate is set at 3.53%. Then, click continue and confirm. Obviously, Metamask will also ask you to again confirm this transaction. And viola as seen in the Metamask screenshot below, we now have USDC 500 in our wallet.

The Risk

When looking at risk, we have to split this between depositing and borrowing on AAVE as well as looking at the third party DeFi protocols that we will be investing funds in. First of all, depositing funds on AAVE is pretty safe. The protocol ensures that lending vs borrowing is always maintained in a healthy Loan-To-Value. The protocol must ensure that collateral exceeds the amount borrowed at all times to stay solvent. Let’s see what the AAVE whitepaper says about managing risk on the platform.

The Protocol Risk

Given the specificities of Aave’s model, the selection of currencies has been performed with the following constraints:

Each additional currency will slightly increase the gas cost of the borrow and redeem actions permanently. The currency must be included in the smart contract, adding complexity and thus costs.

Each currency added to Aave protocol as collateral increases the protocol risk of insolvency. From a financial perspective, the assets of Aave Protocol are the collaterals, while the liabilities are the loaned amounts. The underlying currencies of assets and liabilities often differ, with loans mostly taken in stablecoins and backed by volatile tokens. This means the protocol is heavily exposed to the failure of supported token systems as well as market fluctuations.

A centralised currency accepted as collateral exposes the protocol to its centralisation risk. The single point of failure risks of underlying currencies flow into Aave Protocol.

Currencies only enabled for depositing and borrowing (not usable as collaterals) present lower risk for the protocol. Collaterals are the assets of the protocol. To remain solvent, these assets must remain greater than the liabilities, the loans. Currencies which can only be used for borrowing should always be excessively backed by other currencies as the collaterals.

Having volume from different currencies in our lending pools reduces risks via diversification benefits.

AAVE Whitepaper

The Risk when Borrowing

Let’s familiarise ourselves with the dashboard, now that we have also borrowed some funds. As we will now see, the top-right window now gives us some more information than before. The following is available at a glance;

  • the total amount borrowed in USD
  • simply indicates how much we have borrowed
  • our total collateral amount
  • our total collateral available, against which we can borrow
  • current LTV (Highlighted in red block)
  • current Loan to value at 35%, which is a ratio (loan / collateral x 100)
  • Health factor (Highlighted in red block)
  • a simple single number by which you can gauge your LTV risk. Once it goes below 1, you will start getting liquidated. This will also change color from green to yellow, orange to dark red
  • Borrowing power used
  • I have only used half of the amount I can borrow, which means I may borrow more, up to an LTV of 70% or ±$1,000

Risk Management with LTV

The risk of borrowing is totally up to the user. Your appetite for risk will determine how comfortable you are with your current, borrowed position. Thankfully, the protocol has safety features in place to prohibit us “degens” from over-borrowing from the get-go. This is called the LTV or Loan-To-Value ratio. If we click on “details” on the dashboard, we will see the following LTV info.

As we can see from the image above, our current LTV is 35%, our maximum allowed LTV is 70% and we would start to get liquidated at approximately 76%.

My collateral is split between 13% MATIC, 27% USDC and 59% WBTC. The USDC will remain pegged to the dollar value because that’s just what stable coins do. A bit of a hedge really given the current uncertain market. Now, the MATIC and wBTC on the other hand, could really go either way? I’m betting that BTC will eventually revisit ATH (All-Time Highs) again in the near future, but you just don’t know? So, with an LTV of only 35%, BTC and MATIC could drop by 50% (under 16K for BTC) and I would still not get liquidated. This was the big reason I only borrowed $500 or 50% of my allowed LTV — Risk Management!

The Cost of Borrowing

On the screenshot of the Borrowing dashboard above, we can see the variable APYs or the cost of borrowing, per asset. If we have a closer look at USDC, we can see that it will cost us 3,53% variable APY to borrow USDC. Now, bear in mind that the APY is variable and that this could change over time. However, this amount is derived from the average of the variable borrow rate and should be quite accurate going forward.

But, if we take a glance at the APR number underneath the borrowing rate, we will see that it is designated in MATIC. This actually means that the Polygon (MATIC) network is going to pay us to borrow funds on AAVE. They recently announced this on their Medium page. This initiative is called, the DeFi for All Fund. The fund consists of about $150M in MATIC tokens that have been allocated as rewards or incentives for people who use the Polygon network.

Risk of using 3rd Party DeFi Protocols

The risk here is pretty high, especially when investing funds in yield farms or liquidity pools (like we are going to do later). But, that’s also where the returns are. With higher risk, comes a higher reward. Again, it’s up to each individual to decide on the amount of risk he/she is comfortable with. Common risks when yield farming can include the following;

  • Rug Pulls
  • Impermanent Loss
  • Smart contract exploits

We have a full in-depth review and how-to yield farm on pancakeswap here, in case you are interested. It also goes more into detail on the risks of DeFi yield farming.

Risk in General

As mentioned previously, the risk is relative and we all have to decide on how much we are comfortable with. As a rule of thumb, “don’t put all your eggs in one basket”, sums it up pretty nicely. Don’t go putting all your funds into AAVE and keep borrowing up to your full LTV like a degen! And absolutely never invest more than you can afford to lose.

Personally, I use a variety of centralized as well as decentralized platforms. Some the likes of which include AAVE (obviously), as well as NEXO, Yield APP, Celsius, Pancakeswap etc. This way I can be sure that my portfolio is diversified and my risk is as low as I can manage.

Quickswap Rewards Pools

So, what to do with our hard-earned $500 loan? Well, I thought we’d do a little liquidity mining, don’t you think? Let’s head on over to the Quickswap exchange again. Make sure that your Metamask wallet is connected and select the “Rewards” tab in the top-left menu. I’m going to search for a pool where we can stake USDC.

Why did I choose this pool, well it’s simple really — for one, another case of risk management. At least, as far as possible given that we are engaging in a more risky type of investment, than just staking our USDC in NEXO for example. The difference is, where NEXO is going to give us up to 12 APY this liquidity pool is going to give us 91% APY!

Investing with a USDC stable coin will ensure that my funds (at least half of them) remain untouched by the volatility of the market. Now, I have to invest MATIC and USDC (50/50) into this pool. But, in general, I’m bullish on MATIC as well, given the fact that it’s the native token for the Polygon Network which we are currently using. As well as the fact that it’s a layer 2 solution. We will be earning QUICK tokens in this liquidity pool. At least if half my investment is in a stable coin, then we are somewhat mitigated from impermanent loss.

Supplying LP Tokens for Liquidity Mining on Quickswap with Polygon Network

First off, we have to use the swap feature in the Quickswap platform and equally distribute our 500 USDC into, 50/50 MATIC/USDC. This includes the exact same swapping process as we used earlier when swapping our original USDT into WBTC and USDC. Once we have our tokens in equal value ready, we can go back to the rewards pool that we wish to invest in. Click on “Deposit”.

Next, select “Add MATIC-USDC” liquidity.

Next, we will have to click “Supply” and then “Confirm Supply”.

Confirm Supply LP Tokens

Of course, Metamask will ask us to confirm this transaction as well. After which, we will click “Deposit QUICK-V2 LP Tokens” and Approve.

Approve LP Token Supply

We will then be prompted for one final “Sign” Confirmation by Metamask.

And BOOM 💥 , we have our LP tokens deposited and we are now mining liquidity for MATIC-USDC on Quickswap. In the screenshot below we can see, our total of the Liquidity, deposits is $499. We can also see that the total Liquidity in the pool is just over $24,5M.

The QUICK Token

What we will be receiving in rewards is the QUICK token. QUICK is obviously the native token of the Quickswap ecosystem. The QUICK token has a market cap of $44,7M and is currently trading at $279. You can see from the chart below, QUICK had an ATH of almost $1,700. This was in May of this year, just before the big correction.

The QUICK token can be traded or purchased on Uniswap, Gate.io as well as the Quickswap exchange of course. In my personal opinion, QUICK has the potential to go another 2–3X from here, given that it would then still not be close to the previous ATH. This provides the possibility to further increased returns given that the QUICK token will actually increase in value.

Final Thoughts

BOOM 💥 ! Talk about a crash course in DeFi — that was a mouth full. I trust that you will now be able to use AVVE on the Polygon network to its absolute full potential. And I hope it’s clear to see that you are not limited only to using AAVE with Quickswap on the Polygon (MATIC) network. In fact, you can use any other DeFi protocol as long as they support the Polygon network. Some other examples of these could include, Sushiswap as well as Curve Finance.

It is not just my personal belief, but also that of many others that DeFi will someday free many from the centralized clutches of the conventional old finance industry. The AAVE protocol, Quickswap and the Polygon (MATIC) network are just some more great examples of how you can be 100% in charge of your own finances. Not only that but the fact that we do not have to settle for meagre interest rates of just 1% or 2% APY.

I believe that DeFi is going to play a very important role in terms of financial freedom heading into the future. Many people especially those in developing countries will experience the benefits of Fee-less and uncensored financial services. However, the barrier to entry (ease of use) to this new technology is still quite high. It is up to us to increase the rate of adoption of cryptocurrency and DeFi as a whole and that in turn will lower the barrier to entry.

Shameless Plug

If you like this type of content and you were able to get some value from it, please share it and feel free to make use of our affiliate links below and on our Deals page at no extra cost to you. Cheers.

Other Platforms we Like & Use

--

--

Mark T

Real Estate Professional by day — Crypto Blogger by night. Self-proclaimed Beer enthusiast. https://bitmarkcrypto.com https://twitter.com/mark_thiel