interlay / interbtc-ui

Kintsugi and Interlay App - BTC DeFi
https://app.interlay.io/
Apache License 2.0
32 stars 30 forks source link

Discrepancy in USD price in swap UI #922

Closed tomjeatt closed 1 year ago

tomjeatt commented 1 year ago

There is a discrepancy between the to and from USD values in the Swap UI.

From user: kint seems to be trading way above real price. although it shows the right price in field where you input the amount of tokens to trade, it swaps for a much larger amount.

Discrepancy occurs because we source the USD price per token unit from a CEX but the output amount in token units is determined by the DEX.

Edit: see Peter's comment below. This behaviour is as expected, but we need to document it or flag it to avoid confusion.

kint_usdt

kint_usdt_2

peterslany commented 1 year ago

Is this an issue we want to fix? I don't actually think this is a bug - rather a feature. For example when assets ratio in pool is different from the prices on CEXes (returned by coingecko) this will allow users to see opportunity for arbitrage.

tomjeatt commented 1 year ago

Is this an issue we want to fix? I don't actually think this is a bug - rather a feature. For example when assets ratio in pool is different from the prices on CEXes (returned by coingecko) this will allow users to see opportunity for arbitrage.

Maybe not—I think this is more of a documentation issue (which isn't clear from the ticket!). We've had quite a lot of users asking why, so we either need to have this in the documentation, or as a tooltip or similar.