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

In Assets list group by tokens instead of blockchain #3294

Open
tab00 opened this issue Sep 12, 2023 · 8 comments
Open

In Assets list group by tokens instead of blockchain #3294

tab00 opened this issue Sep 12, 2023 · 8 comments

Comments

@tab00
Copy link

tab00 commented Sep 12, 2023

Innovative blockchains have been increasingly arising, so tokens are becoming multi-blockchain, and token holders have a choice of which blockchains they want their tokens on.

Withdrawal pages on centralized exchanges often provide a list of many blockchain options:

photo_2023-09-12_22-36-31

photo_2023-09-12_22-36-38

Tether lists some of the blockchains that USDT officially exists on at Supported Protocols and Integration Guidelines.
e.g.:
Ethereum: https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7
Avalanche: https://snowtrace.io/token/0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7
Polygon: https://polygonscan.com/address/0x170a18b9190669cda08965562745a323c907e5ec
Kava: https://explorer.kava.io/address/0x919C1c267BC06a7039e03fcc2eF738525769109c
Tron: https://tronscan.org/#/token20/TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
EOS: https://bloks.io/account/tethertether

A wallet may hold various quantities of a token on multiple blockchains. Currently, AlphaWallet would show each in separate rows, in sections separated by blockchain.

It'd make more sense to list a token only once in the Assets list, and then show how much of the token is held on each blockchain, and then maybe a total quantity across all enabled blockchains. i.e. group by logical token instead of by blockhain.

@JamesSmartCell
Copy link
Member

I see, how would you propose that this is shown? Maybe under defi we can show a 'conglomerate' view that bunches together the corresponding tokens, for a start at least.

I like the idea.

@tab00
Copy link
Author

tab00 commented Sep 18, 2023

Here are some of my ideas:

Each row in the assets list can have:
On left show the logo of the logical token (as it already does, but without any small blockchain logo on it), then in the middle part show small icons of the blockchains on which the user has such tokens, then on right the total quantity across all blockchains.

There could be a dropdown button near the total, that when clicked, expands a subsection under the row that shows the breakdown of how much of the token the user has on each blockchain.

@tab00
Copy link
Author

tab00 commented Sep 18, 2023

Behind the scenes there'd need to be a data structure that maps a logical token to a set of addresses on blockchains.

@JamesSmartCell
Copy link
Member

@tab00 do you know if there's a resource or API with a list of common tokens?

I can see on (for example) the Tether Coingecko page there's a drop down that shows the address for every chain:

https://www.coingecko.com/en/coins/tether

however I couldn't find the corresponding API call to fetch this.

@tab00
Copy link
Author

tab00 commented Sep 19, 2023

See https://api.coingecko.com/api/v3/coins/list?include_platform=true

I'm surprised to see that USDT is on 43 different blockchains. They'll need to be checked.

The Polygon address is different from the one published on Tether's official web site. I think the address in CoinGecko is the correct one based on the activity on PolygonScan. It's weird that the official web site shows an address with almost no activity.

@tab00
Copy link
Author

tab00 commented Sep 19, 2023

In the token details panes (e.g. Token Info, Activity) you'd need to add blockchain names.

@JamesSmartCell
Copy link
Member

See https://api.coingecko.com/api/v3/coins/list?include_platform=true

I'm surprised to see that USDT is on 43 different blockchains. They'll need to be checked.

The Polygon address is different from the one published on Tether's official web site. I think the address in CoinGecko is the correct one based on the activity on PolygonScan. It's weird that the official web site shows an address with almost no activity.

Wow that's an epic API call! Nice find.

@tab00
Copy link
Author

tab00 commented Sep 23, 2023

For individual logical tokens see https://api.coingecko.com/api/v3/coins/tether which has keys platforms and detail_platforms (which has decimal_place which could be important).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants