Arbitrage bot setup to search for arbitrage opportunities using the pair ETH/DAI in the Sushiswap & Meshswap DEXes
- This version of the bot only works for the ETH/DAI pair and only listens for arbitrage on Sushiswap and Meshswap.
Set up a local .env file that contains the following configuration variables
PROVIDER_URL=<POLYGON URL>
PRIVATE_KEY=<YOUR PRIVATE KEY>
MIN_PROFIT=<YOUR MIN PROFIT IN DOLLARS>
AMOUNT_DAI=<AMOUNT OF DAI TO TRADE>
To give allowances to the contract to spend out of your tokens uncomment this line of code
(async () => {
await daiAllowance();
await wethAllowance();
})();
Then comment out this part of the code
provider.on("block", async (blockNumber) => {
arbitrageQueue.add("arbitrage", { blockNumber: blockNumber });
});
npm start