Skip to content

Using Flash loans to borrow a significant amount of assets from DY/DX without the need for collateral, as long as the borrowed funds are returned within the same transaction block. Then after getting the loan we can use the loan for yieldfarming

Notifications You must be signed in to change notification settings

1Busayo/Flashloan-bots-yield-farming

Repository files navigation

Flash Loan -- Leveraged Yield Farm

Make use of Flash loan from DY/DX to earn more from Compound.

🔧 Project Diagram: - How it works

🔧 Deposit Diagram:

Deposit Diagram

🔧 Withdraw Diagram:

Deposit Diagram

Technology Stack & Tools

  • Solidity (Writing Smart Contracts)
  • Javascript (Testing)
  • Hardhat (Development Framework)
  • Ethers.js (Blockchain Interaction)
  • Alchemy (Blockchain Connection)

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

  • Other Flashloan Providers
  • Augment your profits with trading bot - TradingBot Masterclass
  • 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.

About

Using Flash loans to borrow a significant amount of assets from DY/DX without the need for collateral, as long as the borrowed funds are returned within the same transaction block. Then after getting the loan we can use the loan for yieldfarming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published