hummingbot icon indicating copy to clipboard operation
hummingbot copied to clipboard

AMM Arbitrage - Could not find the exchange rate using rate_oracle_enabled FALSE

Open nikspz opened this issue 1 year ago • 3 comments

Describe the bug Failed to start Uniswap Optimism strategy with rate_oracle_enabled False. OETH rates are not able at any available reliable rate oracle source (coingecko with extra-tokens are immediately exceed rate limits)

Steps To Reproduce

  1. Clone and install latest development Client + gateway
  2. connect uniswap optimism
  3. Create/start amm_arb startegy using uniswap optimism

Actual: Bot flooded with couldn't find exchange rate for OETH-USDC

Expected: User able to use uniswap_ethereum_optimism

logs_conf_amm_arb_2.log gwissueopt.zip

Screenshots image

Release version dev-1.18.0 /staging

nikspz avatar Jul 22 '23 13:07 nikspz

When using uniswap-goerli got this error too when using fix rates on amm-arbitrage.

image

ValueError: Could not find the exchange rate for ETH-USDC using the rate source fixed rates (please verify it has been correctly configured)
2023-07-25 20:51:37,001 - 18045 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: Could not find the exchange rate for ETH-USDC using the rate source fixed rates (please verify it has been correctly configured)
Traceback (most recent call last):
  File "/home/rapcmia/github/hummingbot/dev/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/rapcmia/github/hummingbot/dev/hummingbot/strategy/amm_arb/amm_arb.py", line 221, in main
    profitable_arb_proposals: List[ArbProposal] = [
  File "/home/rapcmia/github/hummingbot/dev/hummingbot/strategy/amm_arb/amm_arb.py", line 223, in <listcomp>
    if t.profit_pct(
  File "/home/rapcmia/github/hummingbot/dev/hummingbot/strategy/amm_arb/data_types.py", line 130, in profit_pct
    sell_fee_amount: Decimal = sell_trade_fee.fee_amount_in_token(
  File "/home/rapcmia/github/hummingbot/dev/hummingbot/core/data_type/trade_fee.py", line 226, in fee_amount_in_token
    conversion_rate: Decimal = self._get_exchange_rate(conversion_pair, exchange, rate_source)
  File "/home/rapcmia/github/hummingbot/dev/hummingbot/core/data_type/trade_fee.py", line 193, in _get_exchange_rate
    raise ValueError(f"Could not find the exchange rate for {trading_pair} using the rate source "
ValueError: Could not find the exchange rate for ETH-USDC using the rate source fixed rates (please verify it has been correctly configured)

Steps to reproduce:

  1. Setup AMM-ARb with rate_oracle_enabled FALSE
  2. Use Uniswap-Goerli and use BAT-USDC
  3. Observe after starting the strategy

logs_amm-goerli1.log

rapcmia avatar Jul 25 '23 12:07 rapcmia

Did you ever figure this out?

Dave5557966 avatar Jan 26 '24 17:01 Dave5557966

I was searching for the option to disable rate oracle since I was getting spammed by rate oracle errors as well, but I couldn't find any documentation.

Check here: https://hummingbot.org/strategy-configs/rate-oracle/ no mention of rate_oracle_enabled. Also, CLI does not hint at this option.

Meanwhile, I am suspicious of spam error messages that max out CPU utilization. I am experimenting with eliminating spam to check if it solves CPU issues.

0xferit avatar Feb 06 '24 13:02 0xferit