- Solidity (Writing Smart Contract)
- Javascript (Bot & Testing)
- Ethers (Blockchain Interaction)
- Hardhat (Development Framework)
- Alchemy (For forking the Ethereum mainnet)
$ npm install
⚠️ Only use npm , do not use Yarn
Before running any scripts, you'll need to create a .env file with the following values (see .env.example):
- ETH_NODE_URI="https://eth-mainnet.alchemyapi.io/v2/apiKey"
- MNEMONIC="season clay citizen print travel olive umbrella cream high wrestle cupboard trash" (I use this for testing only. the first account goingto recieve profit/execute arbitrage contract)
- CONTRACT_ADDRESS="0xeE9F0a940f7eD451A08527Cb828B490D115dd51E" (Arbitrage contract address, it will appear to you after you deploy it)
- PRICE_DIFFERENCE=0.50 (Difference in price between Uniswap & Sushiswap, default is 0.50%)
- UNITS=0 (Only used for price reporting)
- GAS_LIMIT=600000 (Currently a hardcoded value, may need to adjust during testing)
- GAS_PRICE=0.0093 (Currently a hardcoded value, may need to adjust during testing)
Before running any scripts, you'll need to create a pairs.config.js file with the following values (see pairs.config.js.example):
- for="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" (By default we are using WETH)
- against="0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE" (By default we are using SHIB)
- _unlockAddress=0xdEAD000000000000000042069420694206942069 (This is optional if you want to test locally and manipulate the pool price)
- _swapAmount=405000000000000 (This is optional if you want to test locally and manipulate the pool price)
$ npm run node:deploy:bot
In another terminal run:
$ npm run swap <PairIndexNumber>
$ npm run deploy -- --network mainnet
$ npm run verify -- --network mainnet
CONTRACT_ADDRESS_MAINNET="0xeE9F0a940f7eD451A08527Cb828B490D115dd51E"
$ npm run bot -- --network mainnet
$ npm run deploy -- --network goerli