Skip to content

Aave V2 tutorial with BuildBear Sandboxes, featuring contract deployment and Etherscan verification. Create an Aave Flash Loan arbitrage smart contract from scratch in this comprehensive flash loan tutorial.

Notifications You must be signed in to change notification settings

BuildBearLabs/tutorial-aave-flash-loan-v2

Repository files navigation

Setting Up the Project

Clone the Repo and Install Dependencies

git clone https://github.com/BuildBearLabs/tutorial-aave-flash-loan-v2.git
cd tutorial-aave-flash-loan-v2
cp .env.example .env
npm i
npx hardhat

Contracts Deployment & Txs

Before you run the scripts:

  1. Make sure you have enough Native tokens in your EOA to cover gas
  2. Fill the env variables with:
    • PRIVATE_KEY: You can use your unlocked account mnemonic and receive a private-key for it using: - cast wallet private-key "MNEMONIC"
    • BUILDBEAR_SANDBOX_ID: Fill in your Sandbox ID for etherscan verification on BuildBear after contracts deployment
      • Your RPC Endpoint should look something like https://rpc.buildbear.io/BUILDBEAR_SANDBOX_ID
    • SANDBOX_CHAIN_ID: Fill in the chain id for the sandbox created
  3. Make sure you have at least 1000000 or more of DAI and USDC

Deploying & Verifying Contracts on BuildBear

make deploy

Running Flashloan Script on BuildBear Network

make flashloan

Running Flashloan Arbitrage Script on BuildBear Network

make arbitrage

About

Aave V2 tutorial with BuildBear Sandboxes, featuring contract deployment and Etherscan verification. Create an Aave Flash Loan arbitrage smart contract from scratch in this comprehensive flash loan tutorial.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published