hummingbot / gateway

Middleware that standardizes DEX API endpoints on different blockchain networks
Apache License 2.0
62 stars 109 forks source link

uniswap_v3_lp error after opening position - One of the tokens in this position isn't recognized #172

Open Arnique opened 11 months ago

Arnique commented 11 months ago

Describe the bug I'm running latest latest Hummingbot(1.18.0) and Gateway(1.18.0). The strategy i'm trying to run is uniswap_v3_lp on ethereum arbitrum one but I'm getting this error immediately after a position is added:

One of the tokens in this position isn't recognized. | Error: One of the tokens in this position isn't recognized.

Error in logs:

2023-07-25 13:49:08,017 - 29915 - GatewayEVMAMMLP - INFO - Created ADD liquidity order add-WETH-USDT-1690282143386635 txHash: 0xdf4772e2301b4cf7045538a7596bbb056b994754bf8ef05453eee0010703c930 on arbitrum_one. Estimated Gas Cost: 0.000015069000000000  (gas limit: 3000000, gas price: 0.1000000000000000055511151231257827021181583404541015625)
2023-07-25 13:49:08,018 - 29915 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1690282148.0, "order_id": "add-WETH-USDT-1690282143386635", "exchange_order_id": "0xdf4772e2301b4cf7045538a7596bbb056b994754bf8ef05453eee0010703c930", "order_action": "LPType.ADD", "trading_pair": "WETH-USDT", "fee_tier": "LOWEST", "lower_price": "1846.253652335600000", "upper_price": "1864.808965424400000", "amount": "0.001000", "creation_timestamp": 1690282143.0, "token_id": 0, "event_name": "RangePositionUpdateEvent", "event_source": "uniswapLP_ethereum_arbitrum_one"}
GatewayEVMAMMLP - INFO - Liquidity added for position with ID 743687.
hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1690282150.0, "order_id": "add-WETH-USDT-1690282143386635", "exchange_order_id": "0xdf4772e2301b4cf7045538a7596bbb056b994754bf8ef05453eee0010703c930", "trading_pair": "WETH-USDT", "lower_price": "1846.253652335600000", "upper_price": "1864.808965424400000", "amount": "0", "fee_tier": "LOWEST", "creation_timestamp": 1690282143.0, "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "ETH", "amount": "0.0001393066000000000077330697401"}]}, "token_id": 743687, "event_name": "RangePositionLiquidityAddedEvent", "event_source": "uniswapLP_ethereum_arbitrum_one"}
hummingbot.core.gateway.gateway_http_client - WARNING - Call to https://localhost:15888/amm/liquidity/position failed. See logs for more details.
GatewayEVMAMMLP - ERROR - Error on POST https://localhost:15888/amm/liquidity/position Error: {'message': 'Unknown error.', 'httpErrorCode': 503, 'errorCode': 1099, 'stack': "Error: One of the tokens in this position isn't recognized.\n    at UniswapLP.<anonymous> (/gateway/dist/src/connectors/uniswap/uniswap.lp.js:76:23)\n    at Generator.next (<anonymous>)\n    at fulfilled (/gateway/dist/src/connectors/uniswap/uniswap.lp.js:28:58)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"}
Traceback (most recent call last):
  File "/hummingbot/hummingbot/connector/gateway/amm_lp/gateway_evm_amm_lp.py", line 1097, in _status_polling_loop
    await safe_gather(
  File "/hummingbot/hummingbot/core/utils/async_utils.py", line 22, in safe_gather
    return await asyncio.gather(*args, **kwargs)
  File "/hummingbot/hummingbot/connector/gateway/amm_lp/gateway_evm_amm_lp.py", line 970, in update_nft
    raise nft_update_result
  File "/hummingbot/hummingbot/core/gateway/gateway_http_client.py", line 798, in amm_lp_position
    return await self.api_request("post", "amm/liquidity/position", request_payload)
  File "/hummingbot/hummingbot/core/gateway/gateway_http_client.py", line 218, in api_request
    raise e
  File "/hummingbot/hummingbot/core/gateway/gateway_http_client.py", line 206, in api_request
    raise ValueError(f"Error on {method.upper()} {url} Error: {parsed_response}")

Steps To Reproduce Here are the steps to reproduce the issue (see attachments in the section below):

  1. Connect gateway to UniswapLP and ethereum arbitrum_one
  2. Choose uniswap_v3_lpStrategy as your strategy
  3. Start the strategy
  4. A new liquidity position should be created, but fail immediately after when the strategy tries to get the position info ...

Release version 1.18.0

melodous commented 10 months ago

Hi there,

I'm experiencing the same issue described above. I've tried installing the software directly from the master branch as well as using the Docker package, and in both cases, I encountered the same error.

Just to provide some additional context:

Hummingbot Version: 1.18.0 Gateway Version: 1.18.0 Strategy: uniswap_v3_lp on ethereum arbitrum one I get the identical error message ("One of the tokens in this position isn't recognized.") immediately after a position is added.

Is there any workaround for this, or is a fix in progress?

Thanks in advance for any assistance!