Haehnchen / uniswap-arbitrage-flash-swap

Uniswap flash swap arbitrage solidity contracts
MIT License
442 stars 215 forks source link

Do we need to set the amount we want to purchase with #13

Open D3G3Nerator opened 3 years ago

D3G3Nerator commented 3 years ago

Do we need to set the amount we want to purchase with. For example, lets say i want to flashswap using 1 bnb across pancake and bakeryswap, do i need to set amount of bnb i need to spend.

mindfulme commented 3 years ago

As I see it in the watcher.js we don't need to specify the amount we purchase with, we only cover gas fees. We take a flashloan which covers the required amount to do the max profit out of each arbitrage opportunity

mindfulme commented 3 years ago

you can change amountTokenPay, I highly suggest going over the forks

mkamdoum commented 3 years ago

Does Watcher.js look for arb opportunities as well?

mindfulme commented 2 years ago

You need the optimal amount man, there is just too much math. I have gone over everything already to the profitable bot. I can tip the formula if you need it, I have all graphs and so on with Desmos charts and equations. You need to build an equation that represents your trades. You will clearly see when changing parameters how profits change when you change trade amount (it all has to do with price impact). image