bitshares-ui icon indicating copy to clipboard operation
bitshares-ui copied to clipboard

Show ammount of backing asset

Open froooze opened this issue 6 years ago • 8 comments
trafficstars

Is your feature request related to a problem? Please describe. The info page for a bitAsset doesn't show how many BTS where used to back the bitAsset.

Describe the solution you'd like Add to the line Backing asset the amount of BTS, which are locked up.

backing-asset

froooze avatar May 26 '19 23:05 froooze

Needs evaluation if that number is easily available

sschiessl-bcp avatar May 27 '19 13:05 sschiessl-bcp

Needs evaluation if that number is easily available

That number is not directly available. However, because the first page of debt positions are on the same page, so at least we can estimate:

let first_page_total_collateral = sum of collateral amounts of debt positions in the first page
let first_page_total_debt = sum of debt amounts of debt positions in the first page
let first_page_highest_collateral_ratio = collateral ratio of the last debt position in the first page
total_collateral >= (current_supply - first_page_total_debt) * first_page_highest_collateral_ratio + first_page_total_collateral

abitmore avatar May 27 '19 21:05 abitmore

If really need the exact total collateral amount, please submit a feature request in bitshares-core repository. It's not hard to maintain the data with a little performance penalty; it would need greater efforts to mitigate the performance penalty.

abitmore avatar May 27 '19 21:05 abitmore

@abitmore: It would be enough to calculate the collateral once a day and use only a cached version for the UI.

froooze avatar May 27 '19 22:05 froooze

I think calculating once a day will cause more confusion.

abitmore avatar May 27 '19 22:05 abitmore

A core issue has been submitted for this issue. I see no reason why this shouldn't be included in the asset bucket as it would be to much work for the UI to iterate all the margin positions by hand. The goal is that backed asset would have a lot of margin positions, which would be to much in the long run for the UI (and backend) to manually calculate.

startailcoon avatar May 28 '19 04:05 startailcoon

I think calculating once a day will cause more confusion.

Why?

froooze avatar Jun 04 '19 11:06 froooze

Will be enabled on Bitshares 3.3.0 by PR https://github.com/bitshares/bitshares-core/pull/1836

Testnet release will commence on 2019-08-07

startailcoon avatar Jul 09 '19 06:07 startailcoon