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

Error occurring when fetching pool information on Fantom #550

Open
Lesigh-3100 opened this issue Apr 16, 2024 · 2 comments · Fixed by #552
Open

Error occurring when fetching pool information on Fantom #550

Lesigh-3100 opened this issue Apr 16, 2024 · 2 comments · Fixed by #552
Assignees
Labels
bug Something isn't working

Comments

@Lesigh-3100
Copy link
Collaborator

Bug Description

This bug was reported when running the bot on Fantom:

2024-04-16 10:09:00,727 [fastlane:ERROR] - Error in main loop: Traceback (most recent call last):
2024-04-16T10:09:00.728333936Z stderr F   File "/app/main.py", line 385, in run
2024-04-16T10:09:00.728339063Z stderr F     run_async_update_with_retries(
2024-04-16T10:09:00.728342702Z stderr F   File "/app/main.py", line 578, in run_async_update_with_retries
2024-04-16T10:09:00.728345523Z stderr F     async_update_pools_from_contracts(mgr, current_block, logging_path)
2024-04-16T10:09:00.728349159Z stderr F   File "/app/fastlane_bot/events/async_event_update_utils.py", line 469, in async_update_pools_from_contracts
2024-04-16T10:09:00.72835226Z stderr F     new_pool_data = get_new_pool_data(
2024-04-16T10:09:00.728355249Z stderr F                     ^^^^^^^^^^^^^^^^^^
2024-04-16T10:09:00.72835893Z stderr F   File "/app/fastlane_bot/events/async_event_update_utils.py", line 293, in get_new_pool_data
2024-04-16T10:09:00.728361848Z stderr F     pool_info = get_pool_info(pool, mgr, current_block, tkn0, tkn1, pool_data_keys)
2024-04-16T10:09:00.728364979Z stderr F                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-16T10:09:00.728367998Z stderr F   File "/app/fastlane_bot/events/async_event_update_utils.py", line 176, in get_pool_info
2024-04-16T10:09:00.72837079Z stderr F     fee_raw = eval(str(pool["fee"]))
2024-04-16T10:09:00.728374Z stderr F               ^^^^^^^^^^^^^^^^^^^^^^
2024-04-16T10:09:00.728377911Z stderr F   File "<string>", line 1, in <module>
2024-04-16T10:09:00.728380769Z stderr F NameError: name 'nan' is not defined

Relevant configuration:

--arb_mode=multi --blockchain=fantom --default_min_profit_gas_token=0.0005 --exchanges=fraxswap_v2,velocimeter_v2,sushiswap_v2,equalizer_v2,wigoswap_v2,knightswap_v2,sushiswap_v3,spookyswap_v2,soulswap_v2,carbon_v1,hyperjump_v2 --flashloan_tokens=0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83,0x28a92dde19D9989F39A49905d7C9C2FAc7799bDf,0x1B6382DBDEa11d97f24495C9A90b7c88469134a4 --alchemy_max_block_fetch=1000

Severity (High/Medium/Low)

High

Steps to Reproduce

Config in description

Expected Behavior

Error should not occur when fetching new pool data.

Actual Behavior

Error occurs when getting new pool data.

Impact Analysis (to be filled by contributors)

  • Automated Tests: Are there existing tests covering this? Do we need new tests?
    Potentially - TBD
  • Risks: Potential areas affected by this bug and its probable fix
    TBD
  • Performance: Is this bug affecting performance?
    No
  • Monitoring: Does this affect any current monitoring? Any new alerts needed?
    No
  • Logging: Any changes required in logging?
    TBD
  • Documentation: Updates needed in documentation?
    No
@Lesigh-3100 Lesigh-3100 added the bug Something isn't working label Apr 16, 2024
@Lesigh-3100 Lesigh-3100 changed the title Error occurring on Fantom Error occurring when fetching pool information on Fantom Apr 16, 2024
@sklbancor
Copy link
Collaborator

2024-04-16T10:09:00.72837079Z stderr F     fee_raw = eval(str(pool["fee"]))
2024-04-16T10:09:00.728380769Z stderr F NameError: name 'nan' is not defined

1/ why do we use eval here?
2/ clearly we did not get the pool fee; where is this data created and why is it NaN (not a number)?

@Lesigh-3100
Copy link
Collaborator Author

This error is a result of running the bot with the fraxswap_v2 exchange, which is implemented in multichain_addresses but not supported by the bot.

To resolve this, references to fraxswap_v2 should be removed.

@Lesigh-3100 Lesigh-3100 linked a pull request Apr 16, 2024 that will close this issue
@barakman barakman self-assigned this Apr 17, 2024
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

Successfully merging a pull request may close this issue.

3 participants