Leveraged Yield Farm using Flash Loans

Make use of a Flash loan from Balancer to earn more from Compound.

Technology Stack & Tools

Requirements For Initial Setup

  • Install NodeJS. We recommend using the latest LTS (Long-Term-Support) version, and preferably installing NodeJS via NVM.
  • Create an Alchemy account, you'll need to create an app for the Ethereum chain, on the mainnet network

Setting Up

1. Clone/Download the Repository

Make sure to enter the project directory before attempting to run the project related commands: cd flashloan_masterclass_hardhat

If the directory doesn't exist, you can execute pwd to find out your current path, and ls to see the files and folders available to you.

2. Install Dependencies:

npm install

3. Create and Setup .env

Before running any scripts, you'll want to create a .env file with the following values (see .env.example):

  • ALCHEMY_API_KEY=""

4. Run tests:

npx hardhat test

Other Notes

Uses of Flash loans

  • Arbitrage - use the vast funds to make profits from price discrepencies e.g on Exchange.
  • Leverage - increase exposure e.g earn more with Yield Farming on protocols like Compound.

Other Flashloan Providers