Some scripts written in JS to perform a basic lending/borrowing transaction to Aave
programmatically:
-
A user-specified amount of
ETH
is traded forWETH
. -
The scripts then interact with
Aave
's Lending Pool contract to Lend theWETH
the user specified and borrowDAI
against it. The amount of DAI to be borrwed is determined usingChainlink
's Price Feed oracles. -
The scripts have been tested using a fork of Ethereum mainnet.
- Blockchain:
Solidity
,Chainlink Price Feed
,Hardhat
.
-
Trading
ETH
forWETH
. -
Lending a user-specified amount of
WETH
toAave
's lending pool. -
Borrowing the equivalent amount of
DAI
usingChainlink
's Price Feed oracle to determine the price.
Author: Jaffar Totanji
Email: jaafarti@gmail.com
Telegram: @KuroHata7