In this tutorial, regarding the Aave protocol, we are going to connect our Metamask to the Aave website to be able to interact with the Aave protocol directly. Then, we will switch to the Testnet. We will also get some Kovan ETH from the Chainlink Kovan faucet. Using the test ETH we have got, we will deposit it, withdraw Dai, and then finally pay back all the funds.
What Is Aave Protocol?
Aave is a decentralized finance (DeFi) protocol that allows us to borrow and lend our crypto assets. It provides tools to deposit our money and get some yields or borrow some money and repay whenever we want with a certain APY.
Now, we are going to first interact manually with the user interface at the Aave web app and then get into the code interaction with the Aave protocol.
Connecting Metamask to Aave:
First of all, you should connect your Metamask wallet to the Aave web app.
Then from the top right settings button, switch to Testnet mode
Getting Kovan ETH:
Also, don’t forget to get some Kovan ETH from this link:
Interacting with Aave Protocol Directly
Once your wallet is connected and you have got some kovan ETH, you will be able to see that your available asset on kovan test network is displayed on the webpage:
Now, in order to deposit or supply some ETH, Click supply and choose the amount of ETH you want to supply or lend. And then click Supply ETH.
You will see the Metamask pop-up asking for confirmation:
And there we go! We have deposited 0.1 ETH.
You can activate and deactivate the collateral option, you can also withdraw the money any time you want, and if you balance you will notice that the amount increases little by little.
You can also borrow any other assets that you want. To do that, you should click borrow next to the token that you want to borrow and choose the borrow APY rate and check the health factor to avoid being liquidated.
Click borrow DAI (the token we have chosen to borrow) and confirm the Metamask pop-up.
Now, you can see the borrows and supplies (deposits) lists on top.
You can repay DAI whenever you want. To do that, click repay:
Notice that even if you choose the max amount, you cannot repay all of it because the amount of debt has increased with time because of APY. Click approve to continue and confirm the Metamask pop-up.
After it is successfully done, you will be able to see that your debt has decreased to a very small fraction of DAI.
In the next part, we are going to interact with these tools through python scripts.
In this tutorial, we have managed to connect our Metamask to the Aave website to be able to interact with the Aave protocol directly. Then, we switched to Testnet. We also got some Kovan ETH from the Chainlink Kovan faucet. Using the test ETH we have got, we have managed to deposit it, withdraw Dai, and pay it back.
We Are Working on Metaverses
Metaverses, 3d modeling, 3d application, 3d websites, and even animations are just some of our vase expertise.