Posts

Showing posts with the label aaveprotocolgithub

Using Brownie for Interacting with Aave Protocol (Borrowing & Repaying)

Image
This article is about what to do for using Brownie for Aave protocol after depositing WETH in the Aave lending pool. In our next step, we will try to borrow some Dai. To do this, we should add some dependency contracts to the contracts folder such as AggregatorV3Interface.sol and LinkTokenInterface.sol. We should also modify the deploy.py and brownie-config.yaml files to adapt to our new functionality. Adding the necessary contracts to the contracts folder In this 3rd part of the tutorial, after depositing ETH into the pool, it is time to borrow some DAI using our WETH collateral. There are 2 interfaces to add to the interfaces folder: 1. AggregatorV3Interface.sol 2. LinkTokenInterface.sol pragma solidity ^ 0.6.6; interface LinkTokenInterface function allowance(address owner, address spender) external view returns (uint256 remaining); function approve(address spender, uint256 value) external returns (bool success); function balanceOf(ad...

Using Python Framework Brownie for Interacting with Aave Protocol

Image
In this tutorial, regarding the Aave protocol, we are going to interact with the Aave protocol using Brownie. The first step is to swap ETH with WETH which is necessary when we want to deal with Aave. This lending and borrowing protocol, accept WETH instead of ETH. We add WETH (Wrapped Ethereum) to our Metamask wallet and also create the project folder for interacting with the Aave protocol . After the first (which was swapping ETH with WETH), it is now time to deposit our WETH. To do this, we will download some solidity scripts related to the Aave lending pool, and paste them into the contracts directory of the project folder. Finally, modify the deploy.py to also activate the depositing contracts. Interacting with Aave Protocol by Using Brownie This series of tutorials is the continuation of How to deploy a smart contract using python web3 tools in addition to solidity, smart contracts, and brownie python tools. As a result, it is highly recommended that before you star...

How to Interact with the Aave Protocol Directly + Testnet User Interface

Image
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: ...