1

I assume that this means the transaction works but the profit margin isn't high enough to pay back the loan. But unlike the Uniswap errors that have an output like "INSUFFICIENT LIQUIDITY" or "INSUFFICIENT OUTPUT AMOUNT" which can easily be traced back to in the UniswapV2Pair.sol contract this one has no such output and therefore I cannot trace it back in the contracts.

The traceback does point to the swap function call in my arbitrage contract but it gives no other info. However, there is no such error in the UniswapV2Pair contract.

Anyone know how to learn more about this error?

TIA

7
  • I have exactly the same error right now. In my case the problem occurs when I try to init Uniswap in the constructor. However I can not log anything exact. I already deployed a test version on the main net as a test and the Uniswap related function didn't work at all.
    – rihekopo
    Nov 23, 2021 at 18:44
  • At the end of your flashloan logic, add a require statement that reverts if the balance of the asset you flashloaned is less than the flashloan amont + fee to rule that error out. You should also isolate your flashloan logic into functions that so you easily unit test them and see exactly where the error is. Here is an example for a flashloan that finds arbitrage between Curve and Quickswap: github.com/jalbrekt85/Flashloan-Strategy
    – jcalb
    Nov 23, 2021 at 19:22
  • Is flashloan fee on quickswap the same as the trading fee? Nov 24, 2021 at 0:39
  • When you take out a flashloan with Aave, you must return the full amount of the flashloan plus 0.09% of the amount that was flashloaned. This 0.09% is typically called the flashloan fee
    – jcalb
    Nov 24, 2021 at 4:42
  • I'm not getting flashloan from Aave. Getting it from quickswap. Nov 27, 2021 at 22:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.