yuichiroaoki / poly-flashloan-bot

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

The result is unclear #45

Open yanrising opened 2 years ago

yanrising commented 2 years ago

Hi! I try to start script and a few hours later he returned this result undefined5 │ undefinedUSDT │ undefined1000.00 │ undefinedETH │ undefined1020.48 │ undefined20.5 │ undefined2.0 │ undefined │ undefined 2.4s │ undefined2022-02-04T21:53:53.923Z │50 │ undefined19.5 │ undefined 2.0 │ undefined │ undefined6 │ undefinedUSDT │ undefined1000.00 │ undefinedUSDC │ undefined1019.50 │ undefined19.5 │ undefined2.0 │ undefined │ undefined 2.0s │ undefined2022-02-04T21:53:53.506Z │17 │ undefined15.2 │ undefined 1.5 │ undefined │ undefined7 │ undefinedUSDT │ undefined1000.00 │ undefinedWMATIC │ undefined1015.17 │ undefined15.2 │ undefined1.5 │ undefined │ undefined 5.3s │ undefined2022-02-04T21:53:56.837Z

What could be the problem? As far as I understand, the script found a positive result, but nothing happened further. Nothing happened at the contract address

yuichiroaoki commented 2 years ago

Did the flashloan tx show up in the console? It not, maybe that's something to do with the price check after fetching price data from 1inch.

yanrising commented 2 years ago

No, flashloan tx not show in the console. I think problem with unstable connection from server. Thanks!

yanrising commented 2 years ago

After update error again Screenshot

manlikedan commented 2 years ago

Seems to happen to me every opportunity too:

Screenshot 2022-02-16 at 22 43 07
manlikedan commented 2 years ago

Not sure if it helps but i added more crypto to cover transaction fees & also re-ran yarn build & i dont seem to be getting the above error!

yanrising commented 2 years ago

I re-deployed the contract. On main address 12 MATIC and 5 WMATIC and this error is gone. But i have new problem Transaction Hash: 0xed8d4ee67a2ef3444a8937b8a752fbd0b0c2f72da20d6f33048a0f64181ea67d Status: Pending This txn hash was found in our secondary node and should be picked up by our indexer in a short while. And other 10 transactions with this problem. I think problem with Alchemy RPC? Maybe try to use another RPC services?

yanrising commented 2 years ago

In the end it didn't solve the problem - still undefined results

iouae commented 2 years ago

Not sure if it helps but i added more crypto to cover transaction fees & also re-ran yarn build & i dont seem to be getting the above error!

Would you tell me more, added where to? Your personal wallet? Transferred MATIC to your deployed contract?

Sshimaninja commented 2 years ago

Not sure if you guys read the follow up article, but this arbitrage bot is not profitable because it relies on 1inch routing which is not fast enough to perform profitable arbitrage. You'll need to directly query prices from each dex if you want profit. That's not included in this bot - this bot was an exploration into how to do this, but not necessarily a way to make a profit.

iouae commented 2 years ago

Not sure if you guys read the follow up article, but this arbitrage bot is not profitable because it relies on 1inch routing which is not fast enough to perform profitable arbitrage. You'll need to directly query prices from each dex if you want profit. That's not included in this bot - this bot was an exploration into how to do this, but not necessarily a way to make a profit.

Sounds like another one 'not important' note then. Do you have any profitable examples based on different decentralized exchanges?