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

UniswapLP Polygon mainnet - 'Token not supported' error #44

Open
fengtality opened this issue Feb 25, 2023 · 6 comments
Open

UniswapLP Polygon mainnet - 'Token not supported' error #44

fengtality opened this issue Feb 25, 2023 · 6 comments
Assignees
Labels
bug Something isn't working uniswap-lp

Comments

@fengtality
Copy link
Sponsor Contributor

Original issue: hummingbot/hummingbot#6099

--
Whatever I do on Polygon, I always get "Token not supported"

Steps to reproduce:

Created clean docker instance
Created gateway with 'gateway create'
Set up uniswap and uniswapLP with appropriate information and keys
Created strategy with uni_v3_lp on pair WMATIC-USDC
"start"
Release: latest / 1.12.0

log snippet:

...
2023-02-20 01:23:45 | error | Token not supported: WMATIC | Error: Token not supported: WMATIC
at getFullTokenFromSymbol (/usr/src/app/dist/src/connectors/uniswap/uniswap.controllers.js:303:15)
at /usr/src/app/dist/src/connectors/uniswap/uniswap.controllers.js:278:24
at Generator.next ()
at /usr/src/app/dist/src/connectors/uniswap/uniswap.controllers.js:8:71
at new Promise ()
at __awaiter (/usr/src/app/dist/src/connectors/uniswap/uniswap.controllers.js:4:12)
at poolPrice (/usr/src/app/dist/src/connectors/uniswap/uniswap.controllers.js:276:12)
at /usr/src/app/dist/src/amm/amm.controllers.js:79:52
at Generator.next ()
at fulfilled (/usr/src/app/dist/src/amm/amm.controllers.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@fengtality fengtality added the bug Something isn't working label Feb 25, 2023
@fengtality fengtality self-assigned this Feb 25, 2023
@fengtality
Copy link
Sponsor Contributor Author

While gateway create is now deprecated, the error message above seems to indicate that Hummingbot could not resolve the WMATIC symbol.

I confirmed that Gateway can resolve the WMATIC symbol via Postman:
Screen Shot 2023-02-25 at 8 22 27 AM.

I'll check if this works in Hummingbot later.

@nikspz nikspz changed the title Polygon 'Token not supported' error UniswapLP Polygon mainnet - WMATIC 'Token not supported' error Mar 6, 2023
@nikspz
Copy link
Contributor

nikspz commented Mar 6, 2023

Latest development 1.14.0 Issue reproduced
image

Noticed that on uniswap WMATIC token will be placed as MATIC-USDC
WMATIC-USDC turned into MATIC-USDC when creating a pool

Also noticed that bot mentioned WETH-USDC as the non-active market for uniswapLP-polygon-mainnet
However this market exists on the exchange
image

@nikspz
Copy link
Contributor

nikspz commented Mar 6, 2023

Same issue (Token not supported) testing other pairs (UNI-USDC)
image

p.s. for the note: was able to trade UNI-USDC using amm_arb strategy

@nikspz nikspz changed the title UniswapLP Polygon mainnet - WMATIC 'Token not supported' error UniswapLP Polygon mainnet - 'Token not supported' error Mar 6, 2023
@fengtality
Copy link
Sponsor Contributor Author

@nikspz Can you still reproduce this issue?

@nikspz
Copy link
Contributor

nikspz commented Jun 6, 2023

Yes, reproduced on dev-1.17.0

logs_unilppolygondev117.log
UniswapLP polygon mainnet WBTC-USDC - Token not supported error
image

logs_uniswlpwmaticusdc.log
UniswapLP polygon mainnet WMATIC-USDC - Token not supported error
image
Got trades on WMATIC-USDC using amm_arb before testing uniswapLP

@johna1203
Copy link

I think UniswapLP does not support Polygon yet. I was looking at the code, and it seems that UniswapLP is not handling the 'Polygon' chain.

https://github.com/hummingbot/gateway/blob/main/src/connectors/uniswap/uniswap.lp.helper.ts#L38

You can notice that in uniswap.ts, it is being checked if it's Ethereum; otherwise, it will be Polygon.

https://github.com/hummingbot/gateway/blob/main/src/connectors/uniswap/uniswap.ts#L61

I'm trying to fix this, but I think I'll spend some time testing to make sure everything is running smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working uniswap-lp
Projects
None yet
Development

No branches or pull requests

4 participants