Skip to content

When STEEM is priced below the haircut price, condenser values are wrong #25

@remlaps

Description

@remlaps

Currently, the post value pop-up in condenser displays unrealistic estimates when the price of STEEM is below the haircut price. To improve accuracy, the displayed value and pending STEEM/SP count should be multiplied by the haircut ratio (i.e. the median witness price of STEEM / the haircut price) when the sbd_print_rate is 0.

Here are the values to be updated.

Image

The sbd_print_rate can be retrieved from condenser_api.get_dynamic_global_properties.

Instead of another network call, the haircut price can also be obtained from global properties, as follows:

current_sbd_supply / ( virtual_supply - current_supply )

The median witness price of STEEM can be retrieved and calculated from condenser_api.get_feed_history.

These values should not be adjusted if the sbd_print_rate is above 0, and they only need to be collected once per hour.

This update needs to be done:

  1. In feeds
  2. In top-level posts when the post is open
  3. Throughout the reply thread when the post is open
  4. In blog/posts/comments/replies under a profile
  5. Anywhere else that can be identified

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions