Giter VIP home page Giter VIP logo

aave-flashloan-arbitrage's Introduction

aave-flashloan-arbitrage

This a smart contract for performing arbitrage with AAVE flashloan between Uniswap & Sushiswap

Features:

Flashloans are one of the most exciting concept in the web3.0 & Defi industry, they allow users to borrow a large amounts of assets (ERC20) and use the them for any kind of application in condition that the borrowed money is returned in the same transaction.Many protocols provide the possibility of flashloan like aave, uniswap, dydx,...

The FlashLoanArbitrage smart contrat uses the aave flashloan to do arbitrage between Uniswap & Sushiswap exchanges, it's devided into 2 part: The first is for the arbitrage logic and deposit and withdraw functionalities and the second implement the flashloan logic that can be found in the aave Docs

Built With:

Usage:

Installation & Setup:

  1. Installing Brownie: Brownie is a python framework for smart contracts development,testing and deployments. It's quit like HardHat but it uses python for writing test and deployements scripts instead of javascript. Here is a simple way to install brownie.

     pip install --user pipx
     pipx ensurepath
     # restart your terminal
     pipx install eth-brownie
    

    Or if you can't get pipx to work, via pip (it's recommended to use pipx)

    pip install eth-brownie
    

    Install ganache-cli:

     npm install -g ganache-cli
  2. Clone the repo:

    git clone https://github.com/kaymen99/aave-flashloan-arbitrage.git
    cd aave-flashloan-arbitrage
  3. Set your environment variables:

    To be able to deploy to real testnets you need to add your PRIVATE_KEY (You can find your PRIVATE_KEY from your ethereum wallet like metamask) and the infura project Id (just create an infura account it's free) to the .env file:

    PRIVATE_KEY=<PRIVATE_KEY>
    WEB3_INFURA_PROJECT_ID=<< YOUR INFURA PROJECT ID >>
    

How to run:

To start an arbitrage on the mainnet fork (for testing purposes only, you can also use the kovan testnet) you just need to run the command :

brownie run scripts/flashloan_arbitrage.py --network=mainnet-fork

aave-flashloan-arbitrage's People

Contributors

kaymen99 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.