Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.58 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.58 KB

GamlaFund Yield-Aggregator (Back End)

This project is an fork of merritt-bank-web-ethereum's project to adapt GamlaFund changes.

This project is a simple decentrialized app where a user can deposit DAI into our smart contract. Once funds are deposited, the contract compares the interest rate of Compound & Aave, and deposits funds to whichever has the highest interest rate. The user can rebalance his/her funds to ensure that the funds are still currently in the higher interest rate protocol, and can also withdraw at any time.

Technology Stack & Tools

  • Solidity (Writing Smart Contract)
  • Javascript (React & Testing)
  • Ethers (BlockChain Interaction)
  • Hardhat (Development Framework)
  • Alchemy (Forking Ethereum Mainnet)
  • https://metamask.io/ (Ethereum Wallet)
  • Openzeppelin (Solidity Math)

Setting Up

  1. Install
  • $ npm install

  1. Start Local BlockChain
    • $ npx hardhat compile

    • $ npx hardhat node

    • $ npx hardhat run --network localhost scripts/deploy.ts

Testing

Go to hardhat.config.ts and comment out the mining params

$ npx hardhat test

Details

This hardhat project is configured to fork the Ethereum mainnet. The code to do this is in the hardhat.config file. When the deploy script is run, the mcd join account is impersonated to be able to mint dai for the first account. Do not use any of the hardhat generated accounts for anything but testing as these accounts the same for all hardhat users.