This a smart contract for performing arbitrage with AAVE flashloan between Uniswap & Sushiswap
Last updated Jul 7, 2026
167
Stars
50
Forks
4
Issues
0
Stars/day
Attention Score
58
Language breakdown
No language data available.
▸ Files
click to expand
README
aave-flashloan-arbitrage
This a smart contract for performing arbitrage with AAVE flashloan between Uniswap & SushiswapFeatures:
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:
- 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.
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
- Clone the repo:
git clone https://github.com/kaymen99/aave-flashloan-arbitrage.git
cd aave-flashloan-arbitrage
- Set your environment variables:
PRIVATEKEY=<PRIVATEKEY>
WEB3INFURAPROJECT_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
🔗 More in this category