Git Product home page Git Product logo

Comments (12)

yuichiroaoki avatar yuichiroaoki commented on September 21, 2024 1

@Sahilkhurana I think that USDC/USDT pool is dodo v1 contract and doesn't have the flash loan function, so the tx failed.
You can use WMATIC/USDC pool.

from poly-flashloan-bot.

yuichiroaoki avatar yuichiroaoki commented on September 21, 2024 1

Yes. All you can do is increasing gas fee.

from poly-flashloan-bot.

yuichiroaoki avatar yuichiroaoki commented on September 21, 2024 1

Yes, increasing extraGas might help.

const extraGas = ethers.utils.parseUnits("100", "gwei");

from poly-flashloan-bot.

Sahilkhurana avatar Sahilkhurana commented on September 21, 2024 1

@yuichiroaoki I did try it and it still won't succeed. I noticed that there is a gap of 3-4 blocks in detecting the opportunity and the block # to which the Txn makes its way on MATIC network. I think this duration is enough to lose the arbitrage opportunity due to which the flashloan fails.

from poly-flashloan-bot.

yuichiroaoki avatar yuichiroaoki commented on September 21, 2024

Probably because the dodo pool didn't have enough tokens for you to borrow.
You should check the loan token balance of dodo pool before the execution of flash loan call.

from poly-flashloan-bot.

rinconcsc avatar rinconcsc commented on September 21, 2024

Hi,

Have successfully deployed the contract. The bot did spot an opportunity but Tx failed with above error. Any idea what might be wrong?

Thanks

Hi @Sahilkhurana

Did you find a profitable arbitrage opportunity? Did you modified anything of the configuration of the flash loan, the gas fee or the token?
I am really interested in this project but I have not been successful yet :(

Thanks for your help 👍

from poly-flashloan-bot.

Sahilkhurana avatar Sahilkhurana commented on September 21, 2024

Thanks @yuichiroaoki I was using ETH/USDC pool which Ideally should have sufficient token balance. Anyways, I updated to a bigger pool which has better token balance. The bot spotted another opportunity but the transaction again failed.
https://polygonscan.com/tx/0x11b74a634b4491bf66ec0a472c3a4e44d15467193b92644542b44c34bba3182f
Did it get front run by someone?

Hi @rinconcsc , I have modified the configurations in the following way

  1. Added some more token pools from Dodo for flash loan - specifically USDC/USDT pool
  2. Token selection for Arb - I guess its mostly about doing research on coins/token which might be prone to variation and cross checking the exchanges with liquidity on these pools and selecting the right exchange/token combination.
    Having said that, as I have written here, I am yet to have a successful transaction.

from poly-flashloan-bot.

Sahilkhurana avatar Sahilkhurana commented on September 21, 2024

@yuichiroaoki Thank you ! I didn't realize this and seems to be the issue for above transaction. Now sticking to WMATIC/USDC pool and check if I am able to find another opportunity.

from poly-flashloan-bot.

Sahilkhurana avatar Sahilkhurana commented on September 21, 2024

@yuichiroaoki I did change the pool and the bot could spot few opportunities post that. One of the opportunities was as big as 3% (USD 300) but all of 3 Txns failed with 'Fail with error 'Not enough amount to return loan'

Too slow?

https://polygonscan.com/tx/0xaac8ab6f48ec1d4b39790b316269462e951dfd667b18e173a7a1c5d184ee4192
https://polygonscan.com/tx/0xad898c4e5832039834a6890b1e8f3eafe9d8359f3a245d938cadc31231cd84a0
https://polygonscan.com/tx/0xd096ff213ac959e5ff4526ab6b732fbf91f31a25ae694f606a278838e262f161

from poly-flashloan-bot.

Sahilkhurana avatar Sahilkhurana commented on September 21, 2024

extraGas variable in flashloan.ts is the best way to handle this? . I had earlier tried playing with gasLimit which led me run into errors.

from poly-flashloan-bot.

rinconcsc avatar rinconcsc commented on September 21, 2024

@Sahilkhurana so this means that the bot is still not profitable?

from poly-flashloan-bot.

Sahilkhurana avatar Sahilkhurana commented on September 21, 2024

Yes @rinconcsc .I have been able to spot opportunities but unfortunately all 50+ transactions have failed.

from poly-flashloan-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.