Flash loan arbitrage bot for BSC
The bot is not profitable as-is
The project relies on a PostgreSQL database to keep trusted tokens and LPs lists
chmod +x defiarb
/usr/bin
)Clone the repo
git clone ...
Install dependencies
go get ./...
[Customize configuration](#Config file)
Copy config.example.json
and edit it according to your needs:
NodeUrl
: bsc node URLContractAddress
: bsc node URLDb
: PostgreSQL db config
Host
: DB host (default localhost)Port
: DB portDbName
: DB nameUser
: UsernamePassword
: PasswordThe arbitrage smart contract is in contracts/flash_loans
, deploy it with truffle migrate
and add the resulting address in config.json
.
Before starting the arbitrage bot the database should be updated:
updateTokens
scan [EXCHANGE_1 ... EXCHANGE_n]
(this command may take a long time to complete)run
commandRun defiarb --help
for command list and defiarb [COMMAND] --help
for detailed command help
defiarb writeconfig [CONFIG_FILE.json]
defiarb updateTokens
defiarb scan [EXCHANGE_1 ... EXCHANGE_n]
defiarb run
The project was meant as a learning project, so it is not regularly maintained but any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)