Open oussaki opened 2 years ago
If you look on how you calculated the profit
const profit = (totalDifference*priceToken0Eth)-gasCost
the profit should be calculated this way :
const profit = (totalDifferencepriceToken1Eth)-(gasCost2)
because you wanted the difference to be calculated in price of the token that you are arbitraging with and what the point if you pay 0.02 Eth for gas and then your total profit is less of what you paid for gas
The bot still working nowadays?
Did you get this working on local?
Is it working? Am about to try to set it up and get it all figured out.
If you look on how you calculated the profit
const profit = (totalDifference*priceToken0Eth)-gasCost
the profit should be calculated this way :
const profit = (totalDifferencepriceToken1Eth)-(gasCost2)
because you wanted the difference to be calculated in price of the token that you are arbitraging with and what the point if you pay 0.02 Eth for gas and then your total profit is less of what you paid for gas