Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail with error 'Not enough amount to return loan' #8

Open
hatemua opened this issue Jan 2, 2022 · 7 comments
Open

Fail with error 'Not enough amount to return loan' #8

hatemua opened this issue Jan 2, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@hatemua
Copy link

hatemua commented Jan 2, 2022

when the bot found an oportunity , the transaction not succeed du to this error
Fail with error 'Not enough amount to return loan'

@MetaNynja
Copy link
Contributor

I've had the same thing happen twice. Does the logic allow for an attempt to be launched if the opportunity won't be successful?

@hatemua
Copy link
Author

hatemua commented Jan 4, 2022

I think there is a problem of timing , the arbitrage can fail because the price is changed befire the transaction is lanched

@yuichiroaoki
Copy link
Owner

Since the way the bot trade is different from the 1inch does, you may not trade with the prices you'd expect.
Also, the prices move too fast. Currently, I don't know how to solve this issue.

I'm hoping to integrate with other defi protocols like uniswapV3 and dodo other than uniswapV2 fork defis so that you can get more arbitrage opportunities.

@frankwalter1301
Copy link

frankwalter1301 commented Jan 12, 2022

Since the way the bot trade is different from the 1inch does, you may not trade with the prices you'd expect. Also, the prices move too fast. Currently, I don't know how to solve this issue.

I'm hoping to integrate with other defi protocols like uniswapV3 and dodo other than uniswapV2 fork defis so that you can get more arbitrage opportunities.

I think implementing the arbitrage opportunity finder on the smart contract will fix this issue. I read from your medium article that you tried it wih 1INCH smart contract unsuccessfully because it is developed very bad, so there is the need to find/publish another smart contract.

@yuichiroaoki
Copy link
Owner

Maybe that's true. I think relying solely on 1inch api to detect price changes is one of the problem.

I will fork some blocks where the flashloan failed because of it and see what was happened on prices.

@yuichiroaoki yuichiroaoki added the bug Something isn't working label Jan 17, 2022
@BaLaurent
Copy link

did you tried paraswap ? i personnaly did but the doc there just suck,
or 0x it work pretty well too and it has a nice doc

@dani-s-92
Copy link

Is it a possibility to check the arbitrage opportunities in the smart contract and rund the loop for the checks there forever? Or is it not possible to run a checking loop there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants