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

Undefined when opportunity found, followed by invalid Bignumber error message. #51

Closed
Sshimaninja opened this issue Feb 7, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Sshimaninja
Copy link

Getting an "undefined" issue when there is profitable arb opportunity on the flash loan bot. I have changed the loan amount, and added several router addresses for different exchanges, as well as a new token.

│ 19 │ USDC │ 11111.00 │ WMATIC │ 11096.64 │ -14.4 │ -0.1 │ Getting quote for USDC → WMATIC… │ │ 2022-02-07T03:53:51.878Z │ │ WBTC │ 11111.00 │ WMATIC │ 349.05 │ -10761.9 │ -96.9 │ Getting quote for WBTC → WMATIC… │ │ 2022-02-07T03:53:51.92 │ undefined20 │ undefinedUSDC │ undefined11111.00 │ undefinedWBTC │ undefined11126.36 │ undefined 15.4 │ undefined 0.1 │ undefined │ undefined 1.7s │ undefined2022-02-07T03:53:53.600Z │C… │ 1.0s │ 2022-02-07T03:53:52.91 │ 21 │ USDC │ 11111.00 │ CRV │ 10890.26 │ -220.7 │ -2.0 │ Getting quote for CRV → USDC… │ 0.8s │ 2022-02-07T03:53:52.67

No error thrown for this but, I do get the following error which is mentioned in another issue:

Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.5.0)

I will look into this myself, and I thank you for any help you can offer.

@yuichiroaoki yuichiroaoki added the bug Something isn't working label Feb 7, 2022
@yuichiroaoki
Copy link
Owner

My bad. The problem was because of the poor error handling of axios response. Will fix that.

@Sshimaninja
Copy link
Author

ty King Roaoki I'll verify asap.

virajsoni06 pushed a commit to virajsoni06/poly-flashloan-bot that referenced this issue Feb 14, 2022
…-bot into main

* 'main' of https://github.com/yuichiroaoki/poly-flashloan-bot: (43 commits)
  Update issue templates
  📚 add comments
  🐛 fix fee undefined
  update flashloan address
  update address
  catch errors when estimating price
  catch tx error
  🐛 fix uniswap v3 fee param
  skip jet swap for now
  🐛 fix error handling
  get price on dodo
  fix yuichiroaoki#51
  pass byte data
  update abi
  jlk
  🐛
  fix test 🐛
  add uniswap price test
  fix tests
  change file structure
  ...
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

2 participants