How other sites calculate their prices
Price times Amount
Many wallets and websites use the following formula to calculate the value of tokens on the XRP Ledger.
{ current spot price on the (decentralized) exchange} times { the amount of tokens } = value of token holdings.
Here is an example of how it works.
Let's say you hold 100 "XYZ" tokens in your account that you could trade now for 2 USD. The value of 100 XYZ tokens would be displayed as 2*100 = 200 USD value.
- Current spot price on the DEX = 2 USD
- Amount of tokens in your account = 100
Mid price
The mid price is the current price half-way between the highest bid (buy) order and the lowest ask (sell) order on the open order book for a given token. It represents a "middle value" of a token's price at any given time, without assuming the viewer of the price is looking at it from any particular buy/sell bias.
Volume Weighted Average Price
VWAP is the average price of a token for a given volume of trading, within a given period of time. VWAP takes into account the size of orders (volume) traded at each price and arrives at the average price traded for that volume within the period, hence "volume weighted average price". It is not a high, low, open or close price.
So how does Xumm do it?
Xumm asks the DEX to report the offers on the (decentralized) exchange for a specific token, in this example "XYZ token". Let's say the order book only offers counter trades (buys) for 10 XYZ coins at 2 USD, 40 XYZ at 1 USD, and 50 XYZ at 0.5 USD.
You can not trade 100 XYZ at 2 USD because there is only 10 XYZ currently available at that price. If you place a market order for your 100 XYZ tokens, here is how the DEX will fill it:
10 XYZ * 2 USD = 20 USD
40 XYZ * 1 USD = 40 USD
50 XYZ * 0.5 USD = 25 USD
Totaling up to: 20+40+25 = 85 USD
10 XYZ * 2 USD = 20 USD
40 XYZ * 1 USD = 40 USD
50 XYZ * 0.5 USD = 25 USD
Totaling up to: 20+40+25 = 85 USD
While your 100 XYZ may be reported by other sites as $200 USD in value, Xumm reports what you could actually sell your tokens for.... $85 USD.
We consider the $200 USD "value" as a useless representation of value because you can't swap your tokens for this amount. Xumm shows the real representation of the asset based on the current DEX liquidity. We show the amount you can actually trade for, which is, in case of illiquid pairs, a lot less than the fake price most platforms show.
Explain a bit more about how liquidity works
The XRPL DEX is "open" 24 hrs a day, 7 days a week. It is basically a market place where buying and selling takes place at any time. If you are going to place a market order, you should review the charts and the order book depth before buying tokens. Make sure that there is a market on both sides of the order book. This means lots of sellers and lots of buyers. If there is only a large number of sell orders, it means that you are trading in an illiquid asset.
Remember, the state of the DEX order book has nothing to do with Xumm.
What else can be done?
If the 3rd party app you are using is reporting hypothetical amounts, take this up with them. It would show great character if they implemented a pre-trading check which looks at the opposite side of the order book and warns users if they are trading an illiquid asset.
To reiterate, if you are looking for the real (liquidation) value of your tokens, Xumm shows the right amount.
OK. So how can I check the real (liquidation) value of my tokens in Xumm?
We have created an xApp that displays the values of the tokens in your account called, "Account Worth".
Just launch Xumm and press the "x√" button at the button of the screen.


If you do not see it listed there, just select "View more xApps" option or you can scan this QR code:

Notes
We understand that you might have additional questions regarding this topic so you are welcome to contact us any time via the Xumm Support xApp in Xumm or you can simply scan this QR code with Xumm and be directed there automatically.
Comments
0 comments
Article is closed for comments.