A case study to learn how to interact with decentralized finance using AAVE protocol.
In this repository, you can learn about:
- deposit an ETH collateral as WETH (Wrapped ETH)
- use the borrowed ETH to buy other assets (DAI)
- repay the debt to AAVE
- test by forking a mainnet
- git
- Node.js
- yarn
git clone [email protected]:nvtrinh2001/hardhat-defi.git
cd hardhat-defi
yarn
Set up the MAINNET_RPC_URL
using Alchemy
Run:
yarn hardhat run scripts/aaveBorrow.js
Setup all the .env variables based on the .env.example
Run:
yarn hardhat run scripts/aaveBorrow.js --network kovan