- This repo containing code for a simple DEX backrunner arbitrage bot. For simplicity this only looks for uniswaprouter02 trade.
- This can be improved by adding more different trades
- Design blueprint is attached here
- Go 1.19
- Ubuntu 20.04 (any linux based distros) / OSX
- Application can be built and initiated by using Makefile.
- Make sure to cd to project folder.
- Run the below commands in the terminal shell.
- Make sure to run Pre-run and Go path is set properly
make mod
make lint
make test
make build
- configure
.env.example
ETH_CLIENT_WSS_URL - ETH websocket client
FLASHBOTS_RELAY_URL - Flashbots bundle relay url
BUNDLE_SINGING_KEY - private key for signing flashbots bundle
SENDER_SINGING_KEY - private key for signing transaction
- source your env file
- then start the server as
go run cmd/api/main.go
make docker-image
make docker-run
- Note:Make sure to update the .env.example file before running as docker container
Warning This is just a protype. Running a mempool backrunner can be risky. There are poison tokens that drain your liquidity when you trade them. See salmonella for an example.