Allow editing custom tokens because price APIs are broken

Description of the issue:
When adding custom tokens that are not popular like for example HUSKY, or FLOKI. I go to the custom add function and enter the required details manually which is all good. But once the token is added and now visible in the brave wallet, I notice that the API that fetch the price of those token is completely wrong and I would like to fix it somehow but I can’t.

It seems like the brave price fetcher is broken because the coingecko page has another price than the one shown by the brave wallet listing.

Are you using the (new) Brave Wallet or the (old) Crypto wallets implementation?
Yes, using the new version.

How can this issue be reproduced?
Add a custom token like Floki or Husky.
Floki on BSC:
Husky on Avalanche:

Buy some of these coins. Notice the price in the brave wallet list is completely wrong compared to looking manually at the price on coingecko.

Brave Version (check About Brave):
Version 1.47.186 Chromium: 109.0.5414.119 (Official Build) (64-bit)

Additional Information:
I tried deleting the token and readding again does not fix the price being wrong.
thanks <3

There is no wrong price, because there is no single price. Prices are different from exchange to exchange.

Not popular tokens have low liquidity, thus the prices may have a substantial difference.
Sites like Coingecko and Coinmarketcap try to aggregate prices from different platforms and show an average price. But even these sites show different prices, as their calculated average is based on different sources.

Below some screenshots from Coingecko and Coinmarketcap where it is possible to see prices from different platforms.



1 Like

That’s an excellent point which I did not consider. I agree with you on that.

I am concerned by those two specific coins (Floki and Husky) because the difference is so huge that it is unreliable in the listing of the Brave wallet.

I own ~40$ of Husky according to both coinmarketcap and coingecko, but in the Brave Wallet, even if the coin points to the same coingecko id, it says I have 583k USD worth of Husky.

In the case of Floki, I own ~25$ worth of it according to both sites, but in Brave wallet it says 0.0003833$.

I suspect that the fetch function is using a wrong address or something and I would like to be able to fix it manually in edge cases like this one. If for example we could click on the coin and edit the data manually to ensure there is no obvious human entry mistake there it could fix the problem.

And also, if the code is open-source I am open to contribute if it is Javascript or Typescript.

Thank you for considerations.

Actually there are price errors also on more common coins like USDC:

Others that never load:

@hub figured I’d tag you in on this.

1 Like

If you see this huge difference, it may be possible that the number of decimals is wrong in the token definition.
Did you add these tokens yourself to Brave wallet? If so, try to remove them and adding again using the correct decimals. You can find the correct decimals in the contract page at bscan.

1 Like

I did add HUSKY manually.

I checked 2 times before writing here. And confirmed again after reading your reply that the token address is exact, and the number of decimals is also exact. This token is on the Avalanche C-chain

When I click the 3 dots on the token in Brave wallet, to view token details and/or View on block explorer, it is the correct data for both. But the price fetching is still wrong.

1 Like

USDT 0$ ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.