Uniswap Liquidity Error "unkown error: Couldnot get position with id **"
While Running a script that monitor liquidity positions, the script is running successfully, and at random times it produce an error as seen on this screenshot, it can take 18 hours till the bug appears, or several minutes, I tried to use different nodes to see if this could be something unrelated to hummingbot, but it keeps on appearing:
Steps To Reproduce activate a liquidity strategy and let it run for a while, Im testing on Arbitrum one
hi @emusol Could you please attach the log file and the script that you're running
hi @nikspz , I encountered the same problem。I used the 'startup.sh' to run gateway.
hi @nikspz , I encountered the same problem。I used the 'startup.sh' to run gateway.
Hey I tried to debug it with my node provider, and got this: "These 7 invalid requests all triggered the 502 errors. This is caused by the long response time (around 30 seconds) of the eth_call method sent from your side. Right now there are no other 502 errors with your node." and hummingbot dont handle it right now, but a few weeks or a month back it worked without problem, my script just retried to fetch the position, still trying to work on a script I can share here, but hard error to reproduce, need to run a script for a few hours till it appears
hey did anyone was able to solve this one?
hi @emusol for the HBF team currently uniswapLP strategy is not a priority, maybe someone from the community was able to solve it
hi @nikspz would love to fund this as a bounty, do you know how I can do it?
@emusol Yes, you could fund the bounty, you could try to post it here https://discord.com/channels/530578568154054663/1103258262385741844 for devs to estimate bounty amount
Also you could check this: https://hummingbot.org/bounties/sponsors/
@emusol Probably we need to debug here: https://github.com/hummingbot/gateway/blob/4afa163bb0a8d18a838209cdca10878cb0a25bf7/src/connectors/uniswap/uniswap.lp.ts#L57-L60
You got the error because the connector saw there are reject from the request promises that it made from the above code, the check is here: https://github.com/hummingbot/gateway/blob/4afa163bb0a8d18a838209cdca10878cb0a25bf7/src/connectors/uniswap/uniswap.lp.ts#L65-L66
So the connector found reject and thrown error, but the problem is that we are not sure which request failed, contract.positions(tokenId) or this.collectFees(this.ethereum.provider, tokenId)
For debugging and fixing this, I think I can help you for 50k of HBOT :)
Add new scope for this issue:
when adding a position HB dont recognize it(its a new issue, before it recognized it and just failed to get the position at one point and crashed, now its like that from the start)
This bounty has been funded and work has been performed but the current status is unclear. Let me propose a clarification of the acceptance criteria to ensure that we can close it out.
Per @emusol, the issue appears to be when running scripts on the uniswaplp connector, errors fetching the position occur that prevent the connector from being used reliably. The user funded a bounty that Hummingbot Foundation is currently holding in escrow. Afterwards, the bounty was assigned to @mlguys, who has provided a potential fix to the issue.
However, it's not clear what the acceptance criteria for this bounty should be. Here is the acceptance criteria I propose:
- Successfully running
amm_v3_lpstrategy onuniswaplpfor over 48 hours without any position fetching errors
@mlguys @emusol Do you agree? If not, please propose revised acceptance criteria
hi @emusol Could you please check and provide updates on acceptance criteria?
Hey @fengtality @nikspz, I have worked with @emusol and we agreed that we will set acceptance criteria as follow:
- We will run his script and make sure there is no position fetching errors in 48 hours.
Hey! the issue is now resolved, we can close this issue and release all funds
Thanks @mlguys for the hard work, was pleasure working on it with you
Hey @nikspz, I will add tests to meet coverage requirement and some more updates to finalize the solution, probably finish by the end of this weekend.
@mlguys Could you please finalize this bounty with adding tests here? https://github.com/hummingbot/hummingbot/pull/6731 https://github.com/hummingbot/gateway/pull/257
Mark this bounty as paid
