Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Yield Farm With Aave on Polygon

This post contains affiliate links. Purchases made through these links may earn The Stoic Trader commission, but they do not affect your purchase price. Thanks for supporting the blog!

If you have read my Monthly Updates lately you will have seen I have a growing interest in crypto and Defi in particular. Last week I finally took the plunge and decided to try it out. I had been holding off on using any sort of DeFi on Etherium due to the gas fees. The amount it would cost to move from protocol to protocol would eclipse any profits made as I would only be trading a small amount. After a bit of research/podcast listening, I stumbled on Polygon. Polygon is a Layer 2 solution for Etherium (or a sidechain, I’m not interested in getting involved in that debate).

Before we dive into the process, I will explain a few of the protocols and concepts around yield farming.

What is DeFi?

Decentralised Finance (DeFi) for short is a term used to describe cryptocurrency protocols that provide financial products. DeFi is growing rapidly, and would probably deserve a series of blog posts on its own. For this post, a quick outline will suffice.  Loans, interest-bearing deposits and currency exchanges are all examples of DeFi. DeFi aims to remove the middleman that is usually present in financial transactions. If you go to a bank to deposit your money, the bank will proceed to lend that money to a borrower at a higher rate and profit from the spread between the deposit rate and the borrowing rate. With a DeFi application, you can lend directly to another user in a peer to peer fashion. You will likely receive a much higher deposit interest rate, and the borrower will receive a lower rate than if they went through a traditional bank.

What is Polygon?

Polygon (previously Matic Network) is aiming to be a network of blockchains. It is also a scaling solution for Etherium. Through its Plasma technology, Polygon processes transactions off the main Etherium chain before finalising them on the Etherium chain. By processing off-chain, Polygon can have much higher throughput, resulting in faster and cheaper transactions. Polygon is only one solution to the Etherium scaling problem but has received good traction so far with Aave, Curve and SushiSwap all offering their services on Polygon.

What is Aave?

Aave is a DeFi protocol that allows users to deposit and borrow cryptocurrency. Depositors provide liquidity and get rewarded with passive income. Borrowers can borrow cryptocurrency and pay an interest rate on it. To borrow, users must have deposited assets to the Aave protocol (collateral). At first, when I discovered Aave I wasn’t quite sure why someone would take a loan out against their assets instead of just selling the asset. After a bit of thinking and using, it made sense. Rather than selling an asset to fund your needs, you can keep that asset (thereby participating in any upside) while getting access to the liquidity you need.

What is Yield Farming?

Yield farming is the practice of moving funds from one DeFi protocol to another to maximise yield. Some DeFi protocols like yearn automatically move your funds between protocols to maximise gains. Yield farming is the DeFi equivalent of switching bank accounts to receive more interest, just on a bigger scale at a higher speed. Yield farming as a practice has been prevalent on the Etherium chain for a while, but due to the high gas fees I never tried it. With Polygon (and Arbitrum/Optimism coming soon) the fees are minuscule and yield farming is possible with as little as $100.

Liquidity mining is a component of yield farming. Liquidity mining involves receiving a token in addition to the regular yield. Networks and DeFi apps provide these tokens as an incentive to provide liquidity to the system. Polygon is providing its native token (MATIC) to users who interact with various protocols, including Aave.

Polygon Network Access

To interact with the Polygon chain, you need to add the address manually to your wallet (I use MetaMask). To add the Polygon network, follow the below steps.

  • Select the dropdown that currently displays “Etherium Mainnet”

  • Click “Custom RPC”

  • Enter in the following settings
    • Network Name: Matic Mainnet
    • New RPC URL: https://rpc-mainnet.maticvigil.com/ or https://rpc-mainnet.matic.network
    • ChainID: 137
    • Symbol: MATIC
    • Block Explorer URL: https://explorer.matic.network or https://explorer-mainnet.maticvigil.com/
  • Click Save

You can now select the Matic/Polygon network in your MetaMask Wallet.

Moving Funds

The approach you take to funding your DeFi exploits on Polygon will depend on where your funds currently are. If you have your funds in your wallet on the Etherium chain, you will need to bridge them over to the Polygon network. There are various bridges you can use, but I used Zapper the first time I transferred funds. When you visit Zapper, make sure you have the Etherium Mainnet selected in your wallet.

  • Select the funds and amount from the funds you currently have on the Etherium chain.
  • Make sure Polygon is selected as the receiving network.
  • Note: You can swap tokens during the transfer process. For example, if you have ETH in your wallet and want to use MATIC on Polygon, you can select MATIC as the receiving token and the swap will happen simultaneously. You can also leave ETH (or whatever you have) and swap on the Polygon chain.
  • The bridging process isn’t immediate, it can take up to 8 minutes for the funds to arrive on the Polygon network.

I have not explored the fees associated with swapping while bridging so I can’t recommend it, just be aware it is an option.

Depositing Funds

If you do not have funds to transfer, you can deposit directly to Polygon using Transak. I only discovered this after my initial transfer, and it would have saved me a lot of hassle and money if I had gone this way initially (more on that below in the mistakes section).

  • Go to QuickSwap
  • Click “Buy”
  • Choose from either a card payment or bank transfer. Although the bank transfer says 1-2 days, I deposited and had the funds transferred the same day (including going through the KYC process).
  • I would recommend the bank transfer as the credit card fees can be 10x the bank transfer fees.
  • Choose your deposit currency and your receiving asset.

Being able to buy directly on Polygon with Fiat means you don’t even have to have assets on the Etherium chain to begin the process.

Using Aave

So you have your wallet connected and funded. It’s time to put those assets to work. The first thing we need to do is deposit some of your assets to Aave.

  • Firstly you need to connect your wallet. In the top right-click the “Connect” button.

  • This will bring allow you to select your preferred wallet. Select Polygon Network from the dropdown and select browser wallet (MetaMask)

  • Once your wallet is connected, you can choose to deposit whatever asset you currently hold. It will also display the APY (Annual Percentage Yield) on the right-hand side.
  • Under the APY is the MATIC rewards you will receive for using the protocol, this is the liquidity mining mentioned above.

  • As you can see, USDT provides the highest combined APY, with the native MATIC in second.

At this point, you have two options. Leave your deposits in Aave and let the interest roll in, or, borrow some funds against your deposits. I initially deposited MATIC into Aave, so I decided to borrow the maximum amount (50%) and re-deposit that back into Aave. This increases the amount I have deposited which is earning 8%+. As my deposits increased, I was eligible to borrow more, which I did. The process looks something like the below.

  • Click the borrow tab, and borrow against the collateral you have deposited. I have decided to borrow MATIC against my deposited MATIC (reasons below). You can also borrow assets other than the assets you have deposited, but this leaves you exposed to price fluctuations.

  • As you can see, my health factor is low and the ratio of borrowed funds to deposited funds is higher than the 50% LTV. I am not recommending you leverage in the same way, but I will outline my rationale in more detail below.
  • At the moment, borrowing is incentivised with the MATIC rewards providing a return above the loan interest rate. You are essentially being paid to borrow money!

As I mentioned, when you borrow funds you can re-deposit them and maximise your exposure to the Aave interest rates. Bear in mind you will only be able to do this a certain number of times as the 50% limit will provide diminishing returns.

  1. Deposit 200 MATIC to Aave.
  2. Borrow 100 MATIC.
  3. Deposit 100 MATIC.
  4. Borrow 50 MATIC.
  5. Deposit 50 MATIC.
  6. Borrow 25 MATIC.
  7. Deposit 25 MATIC.
  8. And so on.

Instead of earning the interest rate only on your initial 200 MATIC, you are now earning interest on 375 MATIC. Along with that, the borrowed MATIC is also earning interest (at the moment the MATIC rewards are greater than the interest owed).

Risks

DeFi in general is new and far from risk-free. You are exposed to smart contract risks and market risks, among others. Although you may be earning 15% on your MATIC if the token is depreciating versus the USD you may be losing money. This isn’t as much of a concern if you are bullish on the Polygon project and the MATIC token, just be aware that returns are always relative.

In terms of Aave specifically, there are a few metrics you need to keep an eye on. Health Factor is the main one. Should your health factor drop below 1, your position will be liquidated. Up to 50% of your loan will be repaid. This will be taken from your collateral, along with a liquidation fee (10% for MATIC). The reason why I borrowed MATIC against MATIC in the above example, is I would not be open to price fluctuations. As my collateral and loan are denominated in the same asset, there is no price fluctuation. This allows me to keep a low health factor without worrying too much about what the market does.

If you had borrowed USDC against MATIC and the price of MATIC drops relative to the USD, your health factor will decline. Ultimately it is up to you to find a health factor you are comfortable with, just be aware of the risks of operating with a low one.

Mistakes

As this was my first foray into the DeFi space, mistakes were made. I was unaware of the direct deposit route so I decided to use the Zapper bridge. To do so, I needed funds. Enter Kraken. Kraken is an exchange where you can trade and buy cryptocurrency. By all accounts, they are a reputable business and one of the most trusted exchanges.

Mistake #1: Initially, I tried to deposit from my bank to Kraken, but Revolut wouldn’t allow it. (I have a feeling they want to funnel users to buy crypto through their own platform). When this failed, I decided to buy directly with a credit card. I decided to purchase MATIC as I knew this is what I was going to deposit on Aave. I bought €450 worth of MATIC which cost me €23.55 in fees. A nice 5% hit immediately.

Mistake #2: I repeated mistake 1 when buying ETH to cover the gas fees to move to the Polygon chain, although it was a much smaller amount (€2.83 in fees).

Mistake #3: I should not have bought MATIC right off the bat. The reason why is the withdrawal fee Kraken charge. To withdraw my 240 MATIC would have cost me 60 MATIC. An inordinate amount. As a result, I ended up selling my MATIC and purchasing USDC ($2.50 withdrawal fee). I repurchased my MATIC once my USDC was on the Polygon chain.

I’m sure there were a few more I could throw in, but overall none of the mistakes were catastrophic. I’m glad I made them and I’m a firm believer that the best way to learn about something is to do it. Going forward all of my deposits will be direct to Polygon through QuickSwap.

Lessons Learned

As you can see from the above section, my first trip into DeFi land was not all smooth sailing. Although it will probably take me a while to recoup the money I lost to fees, the monetary reward was only one reason why I decided to take the plunge. I had been learning about DeFi for a couple of months, but the two weeks or so where I was actually using it taught me more about how it works than six months of reading would. Like many of lives endeavours, crypto rewards action.

An important point to note is that I started with a  relatively small amount of money. I knew at the outset I would be happy to lose everything to learn. Thankfully, that hasn’t happened but the process is a much more enjoyable one when you are not reliant on the capital invested to put food on the table. Only deposit what you can afford to lose. Sure it might mean your returns won’t be as big as you would like, but you an’ put a price on peace of mind.

The Future is Decentralised

It should come as no surprise to you, I’m a fan of crypto and what it is trying to achieve. I’m not going all-in on the crypto revolution, I will continue to invest in the Income Portfolio, but it is an area I will explore in more detail in the coming months. I have also looked at a few other DeFi protocols such as Polycat, Quickduck, and Polywhale. Not all of these are as well established or reputable as Aave, so be careful if you are checking them out. DeFi is very much The Wild West at the moment, I can’t stress enough the importance of doing your research. Check out the protocol, the team behind it, the docs on Gitbook, the community on discord and the audit history. There is also a nice document here that provides some references. After briefly using QuickDuck, I dropped it due to the lack of an audit and the poor communication from the anonymous team behind it.

As always, this post is not a recommendation to use the above protocols or to invest in crypto in general. It is for informational purposes only. Before investing your hard-earned money, make sure you do your research.

The Stoic Trader

The post How to Yield Farm With Aave on Polygon first appeared on The Stoic Trader.


This post first appeared on The Stoic Trader, please read the originial post: here

Share the post

How to Yield Farm With Aave on Polygon

×

Subscribe to The Stoic Trader

Get updates delivered right to your inbox!

Thank you for your subscription

×