crypto-com / chain-desktop-wallet

Crypto.com DeFi Desktop Wallet
https://crypto.com/defi-wallet
Other
364 stars 112 forks source link

Problem: Potential not up-to-date CRC20 balances fetched from Indexing Service #1257

Open crypto-matto opened 1 year ago

crypto-matto commented 1 year ago

Background

Unlike wallets, for example Metamask & DeFi Mobile Wallet, which they directly query the node to fetch balances, DeFi Desktop Wallet uses Cronos.org Explorer indexing API to fetch CRC20 token balances.

There’s a GOOD THING about this approach. As long as the Explorer API is indexing to the latest block, users would not need to manage Import / Manage Token. We do the work for them & all their CRC20 token balances would be reflected correctly.

The DOWNSIDE is that there are times where the indexing service is not indexed up-to-date quick enough, and resulted in a not up-to-date balance. Also we’ve discovered that the indexing service is taking extra longer time on balances from 0 -> n or n -> 0, which we did reflected to the indexing team & they’ve tried to lighten the issue already. I’d say that’s a compromise with the approach. But it should be working well most of the time.

Suggestion

With our current Desktop Wallet setup, Import / Manage Token is not something meaningful we’d implement in a foreseeable roadmap. But if the aforementioned issue is becoming more severe, we may consider to change the approach, query the balances directly from node, together with the support of Import / Manage Token system.

The indexing service may still serve a purpose, which is to auto-fetch all non-zero CRC20 token balances for the user. But in the end users shall manager their own token list.

sh0x commented 1 year ago

It's no fun opening your wallet and seeing half your balance 'gone'.. I'd like the option to disable this feature until it works more reliably. Same for 'enable new assets', it keeps popping up even after enabling them.

crypto-matto commented 1 year ago

Hi @sh0x, thanks for your feedback. I'm sorry that sometimes our service might not be stable. We'll see if we could better manage this issue.

In regard to Enable new assets, I think we could hide it from annoying users indeed.