galacticcouncil / hydration-ui

8 stars 12 forks source link

Cross-chain transfer of assets when Degen Model is "enabled" prevents the selection of all desired unique Asset IDs in the search panel likely because it does not list duplicate Asset Symbols #1645

Closed ltfschoen closed 3 weeks ago

ltfschoen commented 4 weeks ago

Hydration now only appears to support the cross-chain transfer at https://app.hydration.net/cross-chain of a limited amount of assets from Hydration to Polkadot AssetHub and back from from Polkadot AssetHub to Hydration.

The following screenshot shows USDT is the default asset that is chosen for cross-chain transfers from Hydration to Polkadot AssetHub:

Screenshot 2024-09-19 at 7 50 06 AM

The following screenshot shows USDT is the default asset that is chosen for cross-chain transfers from Polkadot AssetHub to Hydration:

Screenshot 2024-09-19 at 7 48 36 AM

If I open a new "incognito" browser window and go to https://app.hydration.net/cross-chain, it has USDT selected by default (asset id 10 on Hydration, asset id 1984 on Polkadot AssetHub) but it isn't clear which asset id it is because the address bar just shows https://app.hydration.net/cross-chain (it would be better if it shows the asset ids in the address bar like it does when you do a swap, like this i.e. https://app.hydration.net/cross-chain?&assetOut=10), and when i click "TRANSFER ASSET" to open the search panel, it only lists USDC, PINK, DED, and DOTA (but apart from having an icon it's not clear which asset id each of those symbols correspond to). Usually the only way i know whether it's the right one or not is because usually the right one has a branded icon instead of a question mark, and it might show a token balance that i recognise.

But this is really risky, for example, there might be two different asset ids on Polkadot AssetHub (e.g. 1984, and 202406) that both use the same asset symbol "USDT", and let's say I had 1,000,000 USDT of asset id 1984 on Polkadot AssetHub, which was the official Tether token and had the Tender icon added to its metadata, and that was worth $1M USD. And let's say whoever minted asset id 202406 and its total supply on Polkadot AssetHub airdropped me with 1,000,000 USDT tokens that weren't worth anything, and somehow fraudulently associated the official Tether icon to its metadata. Then if that was the case, and I went to https://app.hydration.net/cross-chain, and chose to do a cross-chain transfer from Polkadot AssetHub to Hydration, how would I know whether the USDT token that is selected by default for the source chain of Polkadot AssetHub that I was going to send to Hydration was associated with asset id 202406 or 1984?

Similarly, if someone minted an asset on Hydration chain with an asset metadata symbol of ZZZ associated with its unique asset id 123 and associated an icon with it and gave you a balance of 10 ZZZ of that asset 123, and then they or someone else also somehow minted another asset on Hydration chain with the same asset metadata symbol of ZZZ associated with it but with a different unique asset id of 456 and associated the same icon with it that was used by asset id 123 and they gave you a balance of 10 ZZZ of that asset id 456, then how would a user on Hydration be able to tell the difference between those two assets when choosing one or the other in the UI?

The following screenshot that shows the full list of other assets that are available to be chosen in the search panel when you click "TRANSFER ASSET", and it happens when you either choose to make a cross-chain transfer from Hydration to Polkadot AssetHub, or from Polkadot AssetHub to Hydration:

Screenshot 2024-09-19 at 9 04 08 AM

Previously it supported the cross-chain transfer of other assets like WUD, which is Asset ID 1000085 on Hydration

Instead of it correctly picking up asset id 31337 from AssetHub (parathread 1000) https://assethub-polkadot.subscan.io/assets/31337 that uses the WUD asset symbol and is listed here https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/assets, it's possible that it might be picking up the wrong WUD asset symbol, since there's another one on AssetHub (parathread 1000) that has a different asset id 201 but that also uses the WUD symbol.

Similarly instead of it correctly picking up asset id 1984 from AssetHub (parathread 1000) https://assethub-polkadot.subscan.io/assets/1984 that uses the USDT asset symbol and is listed here https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/assets, it's possible that it might be picking up the wrong USDT asset symbol, since there's another one on AssetHub (parathread 1000) that has a different asset id 202406 but that also uses the USDT symbol.

A solution that would be helpful could be to update the search panel to list each asset ids along with its associated asset symbol so users may choose the one they need. Ideally also updating the asset input field too, to show the asset id that has been selected that corresponds to the symbol that is shown.

jak-pan commented 4 weeks ago

We are aware of this and all of this is being worked on. The XCM UI is currently separate that's why we don't show (yet) the same information as on other pages but it's coming.

The WUD is an issue that happened when it was approved as sufficient asset and was not re-added to the XCM UI also being fixed.

ltfschoen commented 3 weeks ago

FYI, i just saw the message from @lolmcshizz in the Hydration Telegram chat who pointed out that the reason why the other assets (that do not feature in your standard UI) were suddenly appearing (e.g. the unofficial USDT Tether like asset id 202406 on Polkadot AssetHub, and another WUD token like asset id 201 on Polkadot AssetHub that isn't a sufficient asset on Hydration) was because I had enabled "Degen Mode". If I simply "disabled" Degen Mode, as shown in the screenshot below, then it shows the official USDT Tether asset id 1984 on Polkadot AssetHub instead again, and shows the WUD token asset id 31337 on Polkadot AssetHub instead too again.

Screenshot 2024-09-19 at 6 36 56 PM Screenshot 2024-09-19 at 6 38 03 PM

So in the interim "disabling" Degen Mode solves the problem.

But I think it would be helpful to do the following in this order split across separate issues:

jak-pan commented 3 weeks ago

I am closing this issue and creating 2 new ones to track remaining stuff.

Thanks for the very detailed issue description and the suggestions we appreciate it 🙏🏻