This codebase improves the simple-arbitrage library for discovering, evaluating and rating arbitrage opportunities on ethereum. It is currently somewhat profitable, but may become progressively less so as the number of users increases. The reason for opening the source code is that I would like to get more suggestions, which would be very helpful!
-
ETHEREUM_RPC_URL - Ethereum RPC endpoint.
-
PRIVATE_KEY - Private key for the Ethereum EOA that will be submitting Flashbots Ethereum transactions.
-
FLASHBOTS_RELAY_SIGNING_KEY [Optional, default: random] - Flashbots submissions require an Ethereum private key to sign transaction payloads. This newly-created account does not need to hold any funds or correlate to any on-chain activity, it just needs to be used across multiple Flashbots RPC requests to identify requests related to same searcher.
-
HEALTHCHECK_URL [Optional] - Health check URL, hit only after successfully submitting a bundle.
-
MINER_REWARD_PERCENTAGE [Optional, default 30] - 0 -> 100, what percentage of overall profitability to send to miner. After a month of use, 30 is a relatively balanced value.
Make sure you have the node.js environment on your device before you start using it.
- Clone this repository
git clone https://github.com/TobiasFeistmantl/Arbitrage-Bot
- Go to the folder(Can be accessed manually)
cd arbitrage-bot
- Install project dependencies
npm install
- Configuring .env parameters
-
Go to
.env.example
and fill inPRIVATE_KEY
as the private key of your primary ethereum account in a format that starts with 0x, as in the example.(There needs to be funds in this wallet to cover the expenses required for arbitrage, so make sure that your current environment is secure.) -
The contract content is located in
/contracts/BundleExecutor.sol
, you can go to Remix IDE to deploy it and write the resulting contract address to theBUNDLE_EXECUTOR_ADDRESS
parameter. -
Create a new Etherwallet for the
FLASHBOTS_RELAY_SIGNING_KEY
parameter and write the private key to it. (This wallet does not require any funds) -
HEALTHCHECK_URL
Can be blank. -
ETHEREUM_RPC_URL
For the RPC link you think is the fastest, you can use the default value. -
MINER_REWARD_PERCENTAGE
You can use the default value or higher.
When all is done, change .env.example
to .env
.
- start running
npm run start
If you have any suggestions, please contact me, it would be very helpful for me to improve this program:
Discord: 0x_ethdev