cp .env.sepolia.example .env
cargo run -- simple
Modes (arbitrage strategies):
simple
- this is a Rust port of https://github.com/EkuboProtocol/atomic-arbitrage-bot with more comments and some little improvementsekubo-flash
- with Ekubo flash loan, see also https://github.com/maksimryndin/ekubo_flash_loanIf EKUBO_API_REBUILD
env variable is set to any value, then the openapi Ekubo stubs are built. For that Docker is required.
General advice: an error usually contains a backtrace with contract addresses - try to check the related address versus your account address, token contract, Ekubo contracts and verify an abi.
If you see the error ContractNotFound
that it is highly probable that either you put the wrong address of token/router contract/account contract or your account is not deployed.
UPPERCASE_REASON
- check Ekubo smart contracts error codes.
CLEAR_AT_LEAST_MINIMUM
- every swap on Ekubo encompasses three phases: transfer some input amount, swap and withdraw the output. The order doesn’t matter because of the flash accounting. The error means that there is nothing to withdraw. Important: we cannot rely on the error instead of the profit estimation. Otherwise unprofitable strategies would just drain our balance at Ekubo Core contract.