You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Assets have decimals, for example, USDT with 5 decimals, and BTC/USDT = 60,000,
then 1 unit of USDT = (1 BTC Sat) * 1,000 (msat) / (Price * decimal)
Since the PriceOracle cannot return values below 1/1000 sat, after rounding, the result will be 17 mSat, the resulting price deviation can be quite significant.
For assets with more decimals or lower prices, it may no longer be possible to return 1 mSat.
if AssetA = 0.01 USDT , So 1 unit AssetA = 0.16667 mSat.
As a solution, since subject_asset_max_amount is already provided in the QueryRateTickRequest, could the Price Oracle return the total value instead of the unit price for the asset, thereby avoiding the issue described above?
The text was updated successfully, but these errors were encountered:
When Assets have decimals, for example, USDT with 5 decimals, and BTC/USDT = 60,000,
then 1 unit of USDT = (1 BTC Sat) * 1,000 (msat) / (Price * decimal)
Since the PriceOracle cannot return values below 1/1000 sat, after rounding, the result will be 17 mSat, the resulting price deviation can be quite significant.
For assets with more decimals or lower prices, it may no longer be possible to return 1 mSat.
As a solution, since subject_asset_max_amount is already provided in the QueryRateTickRequest, could the Price Oracle return the total value instead of the unit price for the asset, thereby avoiding the issue described above?
The text was updated successfully, but these errors were encountered: