yuichiroaoki / poly-flashloan-bot

Flashloan Bot on Polygon
https://yuichiroaoki.medium.com/flashloan-bot-on-polygon-part-2-3eae0ac33986?sk=80821da4ca1d0462c7c9ae617df56bdd
MIT License
305 stars 194 forks source link

Not enough amount to return loan #99

Open JulioSarda opened 2 years ago

JulioSarda commented 2 years ago

After several weeks, I achieved a version without errors. But when finding an opportunity, it returns the following result: Fail with error 'Not enough amount to return loan'. Can it be caused by the Slip Page? If I use a higher Gas Price, could it be solved? Thank you https://polygonscan.com/tx/0xd593def172e1f5fe76f24fc933210fdfd7b6f77740838ff76a0d316c9c77c0af

JulioSarda commented 2 years ago

The problem is the price difference between the function "quoteExactInputSingle" in Script and the price in "ExactInputSingleParams" in the Contract.

rinconcsc commented 2 years ago

@JulioSarda, does this mean that the bot is not profitable yet?

JulioSarda commented 2 years ago

@rinconcsc my version yet is not profitable.

JulioSarda commented 2 years ago

I am testing a version now replacing Uniswap V3.

JulioSarda commented 2 years ago

In my new version Quick->Sushi I get some successful arbitrages !!

rinconcsc commented 2 years ago

@JulioSarda so did you got a positive arbitrage opportunity and were able to make the swap?

JulioSarda commented 2 years ago

@rinconcsc yes. I am trying now to increase the % of successful transactions.

andybn commented 2 years ago

@JulioSarda Which token pair / amount have you set up?

rinconcsc commented 2 years ago

@JulioSarda I have a couple of questions for you Julio, please tell me if you are able to DM via Instagram whatsapp or Telegram, I need your help. Thank you.

dani-s-92 commented 2 years ago

I never get a opportunity that will lead to profits. I check wmatic to weth and back on uniswap v3, quickswap and sushiswap (all possible routes) for days already. Can that actually be? I set up with trade amount 100.000.

Kru0489 commented 2 years ago

The problem is the price difference between the function "quoteExactInputSingle" in Script and the price in "ExactInputSingleParams" in the Contract.

@JulioSarda What should be changed to fix the issue? Update the contract and re-deploy? I’m running into the same problem. Thanks