MoralisWeb3 / issue-tracker

25 stars 7 forks source link

Token Prices discrepancy #84

Closed stychu closed 3 years ago

stychu commented 3 years ago

Hey there. I just found about the Moralis and I love it! It's basically everything I was looking for past 3 months to have something like this and be able to build quickly apps.

I have a problem tho.

When it comes to the prices for the token it seems there is a big Discrepancy for the tokens that have a Hight supply and low price per token.

All is good when the price is no less than 0.00001 I guess but everything lower seems to bring a big discrepancy. For example, given the Baby Doge token prices

Current price : 0.00000000194071 (taken from PooCoin)

0.000000001 (taken from Moralis API)

0.0000000019356 (taken from my own Price Calculation)

As U can see there Is aaa big difference between the Price and impact on calculations it implies.

Consider this transaction https://bscscan.com/tx/0x12a3a73d630273e8d7618e042026bfab6ae0302d017ecd68a6ae526cc67868d2

73,530,000,000 ($139.71) - BSC SCAN

73,530,000,000 ($142.70) (0.00000000194071 * 73530000000) - PooCoin

73,530,000,000 ($73.53) (0.000000001* 73530000000) - Moralis API

73,530,000,000 ($142.32) (0.0000000019356* 73530000000) - MyOwn

As U can see there is almost a 50% ~difference in Price for MORALIS!!!

I had the same issue with my API and what I could suggest is to either increase the decimals up to the price is calculated for or expose a parameter for flexibility that user could define how many decimal places should be taken into consideration for price calculation

Currently seems Moralis is restricted to the Token Decimals price calculation which in this case is 9 decimals. If I would be able to define in parameter for the API CALL for example 13 decimals the price calculation would be closer to what It should be.

This is a big flaw to me currently which restricts me from using Moralis APIs in its full potential and I need to sitck to my own solutions.

Until this is somehow fixed I can't fully use Moralis the way I would like to :(

Please look into this ASAP!

ivan-liljeqvist commented 3 years ago

Please post in https://forum.moralis.io - we have staff actively checking there