DeFi-Arbitrage-and-Prediction-Tool
Running the project
Run the flask application using:
python3 app.py
Exploring my machine learning and data science work
In the neural_networks folder you will see a simple Long-Short-Term-Memory (LSTM) implemented in lstm.py which produces a model which predicts prices using the price of crypto suprisingly well with a low error score
In my_model.py you will find a model which I create using a hybrid approach to predict prices. my_model.py is much more advanced than the lstm and uses a combination of ISOMAP and UMAP features which are then gridsearched using the Random Forest Regressor (RF) and the Gradient Boosting Regressor (GBR).
Arbitrage
In the arbitrage directory you can find a script smart_contract.py which uses functions from different files under the fetch folder, to generate the current prices on different exchanges.
Arbitrage Hardhat Project
-- INSIDE hardhat folder -- This project uses hardhat to generate 2 mock tokens (MockWETH, MockDAI) to test arbitrage.
To compile contracts:
npx hardhat compile if you want to clean the directory before compiling the contracts run:
npx hardhat clean npx hardhat compile To run all the tests:
npx hardhat test To run a specfic test:
npx hardhat test test/specific_test.ts
Log in or sign up for Devpost to join the conversation.