Project aims to build a high frequency arbitrage bot using liquidity from Aave in a Flashloan to perform token swaps
This project aims to build a high frequency arbitrage bot. The goal is to exploit the slippage when swapping tokens in Uniswap, and use the liquidity generated by Flashloan.
There are several arbitrage projects already existing in DeFI space, and currently flashloan usecases are mainly based around collateral swaps, interest rate swaps. By utilising small variations in token pricing, and performing a multi-token arbitrage a small profit can be made using the liquidity generated from Flashloan. A small amount of Eth for example 0.2 Eth needs to be deposited for covering the gas fees, and also transactions getting potentially reverted due to change in price
The pipeline for performing such an arbitrage:
This project uses Solidity and Python.
-->Truffle flashloan box example by Aave is used as a template.
--> To achieve the 1st goal a script is used to query via GraphQL the token pricing, and then to calculate the spread.
--> UniSwap router contract is used as an interface, and function swapExactETHForTokens is used to create the swaps generating the slippage value
Unfortunately the project could not achieve the goal of generating profit in step 4. The spreads were such that 3 way token exchange rate was higher resulting in not enough reserve to payback the flash loan.