Git Product home page Git Product logo

aave-flash-loan-tutorial's Introduction

Aave Flash Loan Tutorial

Create an Aave Flash Loan arbitrage smart contract from scratch in this comprehensive flash loan tutorial by Block Explorer.

Project repo:

https://github.com/jspruance/aave-flash-loan-tutorial

Aave v3 Flash Loan documentation:

https://docs.aave.com/developers/guides/flash-loans https://docs.aave.com/developers/deployed-contracts/v3-testnet-addresses

DAI-TestnetMintableERC20-Aave token (Goerli):

0xDF1742fE5b0bFc12331D8EAec6b478DfDbD31464

USDC-TestnetMintableERC20-Aave token(Goerli):

0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43

AAVE PoolAddressProvider (Goerli):

0x5E52dEc931FFb32f609681B8438A51c675cc232d

Remix imports:

import {FlashLoanReceiverBase} from "https://github.com/aave/protocol-v2/blob/master/contracts/flashloan/base/FlashLoanReceiverBase.sol"; import {ILendingPool} from "https://github.com/aave/protocol-v2/blob/master/contracts/interfaces/ILendingPool.sol"; import {ILendingPoolAddressesProvider} from "https://github.com/aave/protocol-v2/blob/master/contracts/interfaces/ILendingPoolAddressesProvider.sol"; import {IERC20} from "https://github.com/aave/protocol-v2/blob/master/contracts/dependencies/openzeppelin/contracts/IERC20.sol";

Dex.sol deployed (Goerli):

0xD6e8c479B6B62d8Ce985C0f686D39e96af9424df

Add liquidity to Dex.sol:

USDC 1500 DAI 1500

Approve:

USDC 1000000000 DAI 1200000000000000000000

Request Loan - USDC (6 decimal):

0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43,1000000000 // 1,000 USDC 0xA2025B15a1757311bfD68cb14eaeFCc237AF5b43,1000000 // 1 USDC

aave-flash-loan-tutorial's People

Contributors

jspruance avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.