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

[Improvement] Don't "double-calculate" the same currency #3

Open
WietseWind opened this issue Feb 6, 2022 · 0 comments
Open

[Improvement] Don't "double-calculate" the same currency #3

WietseWind opened this issue Feb 6, 2022 · 0 comments
Assignees

Comments

@WietseWind
Copy link
Member

WietseWind commented Feb 6, 2022

Here's an account with 19k EUR in IOU. The default currency selected in the wallet is EUR. Meaning we're looking at an IOU representation of the native asset selected in the wallet.

image

Now when the Account Worth xApp is opened:

  1. It takes the IOU value
  2. Takes the order book and checks what XRP value the IOU has
  3. Taks the XRP value and turns it into fiat value

This then results in a lower EUR value, because there's slippage (lack of liquidity)

However, if my native asset is EUR, and the IOU is EUR, I won't end up with a lower amount of EUR when looking at net worth: it should stay unconverted.

Imo, there should be one addition to the current calculations:

  • If IOU (XRPL asset code) equals user native asset code, then don't convert but use value as-is

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants