yuichiroaoki / poly-flash

Flashloan on Polygon
https://yuichiroaoki.medium.com/no-flashloan-fee-with-dodo-cc78215d7f93
MIT License
296 stars 174 forks source link

Fail with error 'SafeERC20: low-level call failed' #33

Open adedade opened 2 years ago

adedade commented 2 years ago

Describe the bug

Two arbitrage opportunities have been logged but failed with error Fail with error 'SafeERC20: low-level call failed'

The transactions are:

I suspect there might be a bug with the contract, or maybe with these specific pairs?

adedade commented 2 years ago

@yuichiroaoki do you happen to know why this would fail?

yuichiroaoki commented 2 years ago

That error message is ambiguous, but it happens when you try to borrow more tokens than the dodo pool has.

rolandweb3 commented 3 months ago
  • 0x14986633cd0901dc74987cd6e9e3ef3d75a42e9e70f4830bf53a441a66b4e25f

How can I customize it to borrow minimum from the pool? if I run this command npx hardhat run scripts/flashloan.ts it will always print the same address from the terminal, also the txn hash is not found on polygon scan but when I run npx hardhat run scripts/flashloan.ts --network polygon I will get this error massage Fail with error 'SafeERC20: low-level call failed

That error message is ambiguous, but it happens when you try to borrow more tokens than the dodo pool has. please help on how to customize it Screenshot (30)