The best and easiest way to manage your Aave v3 position

Utilize your assets to the fullest with Instadapp

Harshit Yadav
Instadapp
13 min readApr 12, 2022

--

“AAVE this name has made its mark in the world of DeFi; it is one of the oldest players in the DeFi protocols and is one of the top markets by holdings. AAVE made decentralized lending and borrowing a reality showing users they could beat the bank’s outdated loan-taking procedures. AAVE is currently #3 (at the time of writing) in the top 10 list of DeFi protocols with billions locked in billions of USD value. AAVE maintains that position by continuing to create better features with each release.

At Instadapp, we keep perfecting ourselves to better serve our community! We help users make the best of their assets by providing them out-of-the-box strategies and ways to increase their yields and manage their DeFi assets. We have prepared a brand new dashboard ready to help you manage your positions on AAVE v3 efficiently.

AAVE v3 is already integrated and live with mind-blowing strategies that can drastically improve yield generation by making better use of your assets.

This guide introduces one of the many ways you can use Instadapp to make better use of your assets. Before we move on with the major updates in AAVE V3, it will be helpful to learn how AAVE V3 is different from AAVE V2

The V2 protocol provided users with vital functionalities such as Debt Tokens, Collateral Swaps, Batch Flashloans, however, AAVE v2 also has some areas for improvement: It is still challenging to list new tokens, most of the protocol liquidity sits idle in the protocol smart contracts, and borrowing power can be improved etc. AAVE V3 is a step toward improving those specific areas by improving Capital Efficiency, Protocol Safety, and the Decentralization of the protocol.

Aave v3 came up with three notable updates which have been integrated at Instadapp, those changes are:

High-Efficiency mode

This update aims to provide users with the highest borrowing power out of their collateral. This feature restricts borrowers to borrow only the assets belonging to a specific category or pool, consisting of correlated assets (e.g., stETH, sETH, alETH), generally the assets that are derivatives of the same underlying asset. This helps the user by giving better predictability and providing better health factors with increased collateral factor and a super low 1% liquidation penalty.

Portal

As the blockchain industry is growing day by day, and many chains have come up with new features, it is still difficult if someone wants to shift their supplied assets or aTokens from one chain to another (e.g. Mainnet to Polygon). The AAVE protocol has come up with a new feature to deal with this issue. AAVE Portal creates bridges between the different iterations of the AAVE v3 protocol on different chains, helping users move supplied assets or aTokens from one chain to another.

Isolation Mode

Isolation Mode makes listing new assets easier for the protocol. When a new token is listed in the Isolation mode, users can only borrow Stablecoins using it as collateral. While doing this, the user’s collateral should only consist of the Isolated token. This will allow the AAVE protocol to more quickly list newer or riskier assets while minimizing the risk to the overall protocol.

How to use AAVE V3 on Instadapp

This blog section will help you learn how to use Instadapp Dashboard to manage your assets with AAVE v3. This tutorial is performed on Polygon Mainnet.

You will need a web3 wallet like Metamask or Rabby.io with some asset, for example, MATIC. We will work with a minimal amount so that you can follow along.

This part of the blog contains 3 modules:

  • Turning E-Mode ON
  • Supplying to E-Mode selected Asset
  • Borrowing on AAVE V3

𝘕𝘰𝘵𝘦 -> If you are not familiar to the Instadapp Platform, you can start with the guide here

Module 1: Turning E-Mode ON

This section will introduce you AAVE V3, how to navigate to the AAVE V3 page and turning E-Mode ON for your desired category.

Step 1: Move to ‘AAVE V3’ under ‘Protocols’ on the left sidebar then Click on ‘E-Mode’ to list all the categories present.

Step 2: Find the category you would like high borrowing power for.

As you can see, currently, two categories are listed here (more will be added overtime)

  1. All — This is the default mode set. It means that you have access to borrow all tokens depending on your collateral value.
  2. Stablecoins — This mode allows you to borrow selected assets with 97% of collateral value. This means if you deposit 100 DAI, You can borrow up to 96.99 USDC or USDT.

Note — Selecting Stablecoins will make AAVE restrict your borrowing power to only Stablecoins; however, you will still be allowed to supply other assets not under this category like Matic, but you cannot borrow them.

Instadapp has a Unique way of tackling this. You can just create multiple DSA and manage them on Instadapp with different E-Mode per your need and liking. This is further explained in later sections of the blog.

Step 3: Select your desired E-Mode by clicking on it.

We will be selecting the Stablecoins category for now.

Step 4: Approve the transaction to enable your E-Mode.

Step 5: See the ‘Enabled’ label on your selected category.

Move back to the 4th step and look for the C.F of DAI before enabling Stablecoin E-Mode, its C.F was 75%, but after selecting ‘Stablecoins’, you can see the C.F is now 97% for all Stablecoins.

Module 2: Supplying to E-Mode selected Asset

This module will introduce you to how to deposit your assets to AAVE V3 to earn interest on them.

Step 1: Click on “Supply” under the desired asset.

Step 2: Enter the amount you want to supply and earn interest on then click on Supply and confirm the transaction.

Module 3: Borrowing on AAVE V3

Now, as we selected the category “Stablecoins”, we can only borrow Stablecoins for this DSA for 97% Collateral Factor. Still, you can always create multiple DSA, each employing a different E-Mode Category and bypass this restriction.

Step 1: Click on ‘Borrow’ under the allowed assets.

The allowed assets for the Stablecoins category are USDC, USDT, DAI.

Step 2: Enter the amount you want to borrow for your supplied collateral. Click on borrow to confirm the transaction.

As you can see here, we can borrow 9.699 USDC for 10 Supplied DAI because Collateral Factor is 97 %.

Why Instadapp?

The DeFi community has trusted us with billions worth of USD into our protocol, we take this as a great honor and view it as our duty to serve the community with the best features and services! AAVE V3 is a critical upgrade to the DeFi ecosystem and we saw this as our duty to make it available at launch to our users! We worked day and night to make sure it was integrated into our platform at launch with the latest strategies to help you make the most out of your assets.

Now that we have expressed how influential these changes are, lets review all the new AAVE V3 features and the new exciting tactics Instadapp has to make the most of your assets!

Note: The information below is provided for informational purposes and is not meant to constitute financial advice.

1. Strategies

This section will introduce you to the strategies that Instadapp provides you with a single click. You can use these strategies with different assets depending on the market conditions. All the strategies can be found on the right sidebar under “Strategies” for AAVE protocol.

1.1. Leverage / Max Mining

This strategy involves borrowing against a collateral asset and depositing the borrowed asset back to the protocol. This is done to gain better farm yields, and a single click can leverage your position up to 2x-5x depending on the asset. (5x and higher with may be possible with AAVE V3 E-Mode) For example -

  • You can borrow ETH debt by keeping deposited ETH as collateral and depositing the borrowed ETH as collateral to gain more exposure and better yield results.
  • You can borrow WBTC debt by keeping deposited USDC as collateral, swapping the borrowed WBTS with USDC, and then depositing that USDC back as collateral.

1.2. Save / Unwind Mining

Using this strategy allows us to use the collateral asset to exchange and pay the debts. It is majorly used to deleverage a position. Example-

  • You can withdraw ETH as collateral and pay back the ETH debt.
  • You can withdraw USDC as collateral, swap USDC with ETH and payback ETH debt.

1.3. Collateral Swap

This strategy revolves around swapping your collateral for another collateral within the protocol that can be used when the collateral is bearish and you want to save your position from being liquidated. You can do this with a single click on Instadapp with your selected assets. Example-

  • Withdraw the USDC as collateral, then swap the USDC with ETH and deposit the ETH collateral.

We have many such strategies like Debt Swap, Deposit and Borrow, Payback and Withdraw, etc., which are used to earn a lucrative yield on the assets deposited by the user.

2 Migrating AAVE position from V2 to V3 and Cross Chain

AAVE V3 has undoubtedly come up with excellent features for the benefit of users. On Ethereum Mainnet the AAVE V2 positions on Mainnet will automatically be upgraded.

But what if you have an AAVE V2 position on Polygon and want to reap the benefits of Polygon’s AAVE V3? This is the current situation: AAVE v3 on other chains will not be automatically converted to V3 but will exist alongside the current v2 markets. That means there will be two markets on networks like Avalanche and Polygon, AAVE v2 and a AAVE v3 market.

What if you want to Migrate your AAVE positions completely from one chain to another chain?

Instadapp is here to provide the flexibility you need in these changing times! Instadapp has two exciting tools you can use “Aave Migration” and “Inter Chain”.

2.1. Aave Migration

Instadapp’s implementation of “Aave Migration” is our refinancing method! It works like magic to migrate your V2 positions to V3 positions on the same chain. That means you can migrate your V2 position on the Polygon to V3 with a single click. Easy!

The science behind this magic is simple, we make use of the Flash Loans to help you migrate your position completely from V2 to V3 in one transaction!

Using Refinance feature (“Aave Migration”) to move position from V2 to V3

This was for refinancing your V2 position to V3 on the same chain But what if you want to move your position from one chain to another chain? Here is when Instadapp’s Inter Chain feature comes into use.

3 Breaking the E-Mode restriction using multiple DSA

Photo by Ankush Minda on Unsplash

High-Efficiency Mode or E-Mode is one of the main features that has been introduced in the V3 of AAVE. As explained earlier, you can use this feature to access higher borrowing power from your collateral with the condition that the lending and borrowing should happen within the same category of assets. You will have a higher borrowing power if you collateralize and borrow the assets that are derivatives of the same underlying asset, thus correlated in value. But to make use of this, all of your borrowed assets must be of the same category.

For example, in the image above, to choose the stable coin category, you will have to have all your borrowed assets to be in DAI, USDC and/or USDT to enjoy the fruits of 98% Collateral Factor and 1% Liquidation Penalty. But that poses restrictions over your assets. You just cannot borrow and supply other assets when your E-Mode is ON!!.

Here is when Instadapp’s robust Defi Smart Account(DSA) comes into use! You can think of the DSA as an account linked to your wallet’s address, and the beauty of DSA is that you can have multiple DSA’s linked to your single wallet address. The DSA works on top of Instadapp’s DeFi Smart Layer (DSL) which lets the DSA interact with other protocols. Now how does this help you?

Each DSA functions as an individual account for all the protocols on Instadapp. For example, if you have three DSA’s linked to your wallet and all those three DSAs each have their own addresses, and they act as three separate accounts for the AAVE protocol. This is because AAVE is account based, and treats each address as one account to its protocol.

You can have multiple DSAs linked to your primary wallet, and you have complete access to all three. By utilizing multiple DSA accounts you can have each DSA handle one of the different E-Modes each! Not only is this better for managing more assets, you are able to get the most out of E-Mode and your assets! This is the Magic and power that Instadapp presents you with.

This was just one of the MANY use cases of Instadapp’s DSA for E-Mode. From simply account management, to more complex debt management there are many more strategies and use cases for DSAs! Let’s explore them all on Instadapp.

Developer First

Hey fellow developers! What if I tell you that you can Deposit 1 ETH to AAVE, Borrow 100 DAI and deposit those 100 DAI on Compound and all of this in nine function arguments (three per action) in one script? It sounds like magic! This is the magic of Instadapp’s innovative spells and cast functions.

To get started you need to install the dsa-connect package and set up the account. Thats it! Welcome to the magically realm of Instadapp Defi!

But what is this magic exactly? Instadapp works by integrating and creating a framework for a variety of protocol contracts to interact with one another. These functionalities are expressed through dsa-connectors enabling protocols to function with each other in a sequence or script. These scripts are what consists of a spell and cast functions.

You can think of spells as trailing function calls to different protocol’s smart contracts in the script sequence. For example, “Deposit 1 ETH to AAVE” is one spell added to the script, then “Borrow 100 DAI” is another spell added to the script, then “Deposit 100 DAI on Compound” is the third spell in the script then after adding all these in this sequence we can cast this script for execution and all these actions will be taken care of by the script. To learn more on setting up to cast the spells, follow the installation guide here.

Now how will the spell and cast function work and help us in the case of AAVE V3? We can make use of this in a similar fashion as the example mentioned above. We can add spells interacting with the AAVE V3 functions and cast them to execution. You can execute all sorts of strategies you have with this.

Walkthrough

What serves better to a developer than examples? We have created an example script for you that can be executed at Instadapp’s Terminal. This example works with minimal funds to serve you for testing purposes. The script is a compilation of 4 spells that work in a sequence as follows:

Note:- Please deposit 1 Matic in DSA before executing this script

1. Deposit 1 Matic from DSA to the AAVE V3 Protocol.

2. Borrow 0.5 USDC.

3. Swap the USDC with Matic.

4. Deposit the Matic again to the protocol.

The transaction details of the executed script can be found here.

Link

Wrapping up

It’s great to see that you made it. It always feels good to learn something new. The Instadapp team is determined to bring you the latest DeFi updates and concepts. This guide introduced you to how you can not just manage but get the strategies, tactics and unique hacks to generate a better yield and manage your assets well using the robust UI of the Instadapp platform. Instadapp always loves to give back to the DeFi community by presenting the users with incredible opportunities and features. This guide was just an attempt to introduce you to one of the many ways you can use Instadapp’s platform to your advantage. There are many more exciting features on the Instadapp platform to help you manage your assets. To learn more about them all:

Join the Instadapp Discord

Follow Instadapp on Twitter

Subscribe to the Instadapp Blog

--

--

Harshit Yadav
Instadapp

A student of IIT-Roorkee enthusiastic about Bockchain, DeFI, Machine Learning and Artificial Intelligence, learning, implementing and sharing the knowledge.