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

[BUG]: wrong price of 0 is shown on Portfolio page #2408

Open
cipig opened this issue Jan 22, 2024 · 4 comments
Open

[BUG]: wrong price of 0 is shown on Portfolio page #2408

cipig opened this issue Jan 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@cipig
Copy link
Member

cipig commented Jan 22, 2024

image

Komodo Wallet shows a price of 0 (with 8 decimals) for CHTA as coming from livecoinwatch, but the price from our endpoint on https://prices.komodo.earth/api/v2/tickers?expire_at=21600 is 0.000001 (6 decimals):

image

Interesting is that the price is actually used, else there wouldn't be a "Fiat Balance" value.

@cipig cipig added the bug Something isn't working label Jan 22, 2024
@ShorelineCrypto
Copy link
Contributor

Not exactly the same, but likely came from same source of error of pricing. For pytomicDEX_makebot I did over past couple of days, I found this error and bot won't run on CHTA/KMD pairs:
ERROR simple_market_maker:372] Rates from provider are Unknown - skipping for KMD/CHTA

The error came from here from mm2 code:
https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/mm2src/mm2_main/src/lp_ordermatch/simple_market_maker.rs#L41

Most likely, mm2 komodo-defi-framework code base has a rounding assumption that any price below certain smaller value will be truncated to zero.

Hopefully this source code limitation bug can be fixed and allow Cheetahcoin Nengcoin etc smaller coins have a pricing in Komodo wallet. Currently AtomicDEX is thinly traded and most user case is for smaller coins with cheap fees.

@cipig
Copy link
Member Author

cipig commented Feb 13, 2024

the integrated maker bot needs a price source... it uses the URL you passed to it... eg https://prices.komodo.earth/api/v2/tickers ... if CHTA does not have a price there, i expect to see the above error... CHTA has a id for coinpaprika and livecoinwatch defined in https://github.com/KomodoPlatform/coins/tree/master/api_ids ... coinpaprika can't be used though, because CHTA is missing circulating supply info there and as such does not have a market cap... paprika only shows the prices of the top 2500 coins in their free API... without a mcap a coin has no ranking and as such can't be in top 2500... update the supply on paprika, so CHTA has a chance to be in top 2500 coins, then the chance is higher that there will be a price for it

@smk762
Copy link
Collaborator

smk762 commented Mar 28, 2024

No longer appears to be an issue
image

@smk762 smk762 closed this as completed Mar 28, 2024
@cipig
Copy link
Member Author

cipig commented Mar 31, 2024

that is only because the price of CHTA surpassed 0.00001... everything below is shown as 0
image

price of BTTC is $0.00000160, CHTA is $0.00000398... both show up as 0...so looks like the app cuts off the last 3 decimals, so it gets the price with 8 decimals from the API, but somewhere in code it's stripped down to 5 decimals.

@smk762 smk762 reopened this Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants