Not the optimum path to arbitrage but good learning tools to help understand how liquidity effects different prices on defi-exchanges Web3, nodejs, javascript, infura tools to measure liquidity between Uniswap and Sushiswap. Binance Chain(Pancake,Apeswap,Julswap,Bakeryswap) price comparison also.
- Install nodejs from command line FILE LOCATION THEN --- install npm
- Create dot env file (.env) from command line --- https://www.npmjs.com/package/dotenv
- Create an Infura account --- https://infura.io/
.env file should look like this
RPC_URL="https://mainnet.infura.io/v3/PROJECT_ID"
PRIVATE_KEY="YOUR METAMASK ACCOUNT PRIVATE KEY REMOVE 0x from string"
ACCOUNT="YOUR METAMASK ETH/BINANCE ACCOUNT ADDRESS REMOVE 0x from string"
This project can be greatly improved. I orginally wrote the code for fun to learn how arbitrage works. I have from time to time been able to sucessfully do arbitrage between exchanges. I have also had many failures and have tweaked to code multiple times to improve the chances of success.
PLEASE US the sushiswap_uniswap_ropsten.js BEFORE using real money on ETH network. I am not responsible for any losses from any transaction you make.
You can use these for arbitrage BUT there are faster and more accurate ways to find arbitrage between exchanges. I will leave that up to you to discover. Here are a couple of links to devs that I learned a lot from. Feel free to ask me a question.
https://github.com/dappuniversity
Extra: A couple of helpful principles to help you understand how price is determined with Uniswap, Pancake pairs etc EthTokens is BinanceCoin on Binance Network
#EthTokens /(#Tokens X EthPrice) = Token Price
#EthTokens / #Tokens = Token per Eth
If you catch the market at the right time and find some great arbs send a few wei my way. 0x2076D4Ad149ce6d682b80efDfDb13fdE2bA0cB7f