BitShares-Core
6.1.0
BitShares blockchain implementation and command-line interface software
|
contains properties that only apply to bitassets (market issued assets) More...
#include <asset_object.hpp>
Public Member Functions | |
bool | is_current_feed_price_capped () const |
share_type | max_force_settlement_volume (share_type current_supply) const |
Calculate the maximum force settlement volume per maintenance interval, given the current share supply. More... | |
bool | has_settlement () const |
bool | has_individual_settlement () const |
price | get_individual_settlement_price () const |
Get the price of the individual settlement pool. More... | |
bitasset_options::black_swan_response_type | get_black_swan_response_method () const |
Get the effective black swan response method of this bitasset. More... | |
price | get_margin_call_order_price () const |
Get margin call order price (MCOP) of this bitasset. More... | |
ratio_type | get_margin_call_order_ratio () const |
Get margin call order ratio (MCOR) of this bitasset. More... | |
ratio_type | get_margin_call_pays_ratio () const |
Get margin call pays ratio (MCPR) of this bitasset. More... | |
bool | need_to_update_cer () const |
Whether need to update core_exchange_rate in asset_object. More... | |
time_point_sec | feed_expiration_time () const |
The time when current_feed would expire. More... | |
bool | feed_is_expired_before_hf_615 (time_point_sec current_time) const |
bool | feed_is_expired (time_point_sec current_time) const |
void | update_median_feeds (time_point_sec current_time, time_point_sec next_maintenance_time) |
![]() | |
abstract_object () | |
object_id< SpaceID, TypeID > | get_id () const |
![]() | |
std::unique_ptr< object > | clone () const override |
void | move_from (object &obj) override |
fc::variant | to_variant () const override |
std::vector< char > | pack () const override |
![]() | |
object ()=default | |
object (uint8_t space_id, uint8_t type_id) | |
virtual | ~object ()=default |
Public Attributes | |
asset_id_type | asset_id |
The asset this object belong to. More... | |
bitasset_options | options |
The tunable options for BitAssets are stored in this field. More... | |
flat_map< account_id_type, pair< time_point_sec, price_feed_with_icr > > | feeds |
price_feed_with_icr | median_feed |
This is the median of values from the currently active feeds. More... | |
price_feed_with_icr | current_feed |
This is the currently active price feed, calculated from median_feed and other parameters. More... | |
time_point_sec | current_feed_publication_time |
This is the publication time of the oldest feed which was factored into current_feed. More... | |
price | current_maintenance_collateralization |
price | current_initial_collateralization |
bool | is_prediction_market = false |
True if this asset implements a Prediction Market. More... | |
share_type | force_settled_volume |
This is the volume of this asset which has been force-settled this maintanence interval. More... | |
bool | asset_cer_updated = false |
Track whether core_exchange_rate in corresponding asset_object has updated. More... | |
bool | feed_cer_updated = false |
Track whether core exchange rate in current feed has updated. More... | |
price | settlement_price |
share_type | settlement_fund |
Amount of collateral which is available for force settlement due to global settlement. More... | |
share_type | individual_settlement_debt |
share_type | individual_settlement_fund |
Amount of collateral which is available for force settlement due to individual settlements. More... | |
![]() | |
object_id_type | id |
Additional Inherited Members | |
![]() | |
static constexpr uint8_t | space_id |
static constexpr uint8_t | type_id |
contains properties that only apply to bitassets (market issued assets)
Definition at line 255 of file asset_object.hpp.
|
inline |
The time when current_feed would expire.
Definition at line 370 of file asset_object.hpp.
|
inline |
Definition at line 383 of file asset_object.hpp.
|
inline |
The old and buggy implementation of feed_is_expired before the No. 615 hardfork. See https://github.com/cryptonomex/graphene/issues/615
Definition at line 380 of file asset_object.hpp.
|
inline |
Get the effective black swan response method of this bitasset.
Definition at line 334 of file asset_object.hpp.
|
inline |
Get the price of the individual settlement pool.
Definition at line 327 of file asset_object.hpp.
|
inline |
Get margin call order price (MCOP) of this bitasset.
Definition at line 340 of file asset_object.hpp.
|
inline |
Get margin call order ratio (MCOR) of this bitasset.
Definition at line 346 of file asset_object.hpp.
|
inline |
Get margin call pays ratio (MCPR) of this bitasset.
Definition at line 352 of file asset_object.hpp.
|
inline |
Definition at line 324 of file asset_object.hpp.
|
inline |
Definition at line 299 of file asset_object.hpp.
|
inline |
Definition at line 277 of file asset_object.hpp.
share_type graphene::chain::asset_bitasset_data_object::max_force_settlement_volume | ( | share_type | current_supply | ) | const |
Calculate the maximum force settlement volume per maintenance interval, given the current share supply.
Definition at line 33 of file asset_object.cpp.
|
inline |
Whether need to update core_exchange_rate in asset_object.
Definition at line 364 of file asset_object.hpp.
void graphene::chain::asset_bitasset_data_object::update_median_feeds | ( | time_point_sec | current_time, |
time_point_sec | next_maintenance_time | ||
) |
Definition at line 47 of file asset_object.cpp.
bool graphene::chain::asset_bitasset_data_object::asset_cer_updated = false |
Track whether core_exchange_rate in corresponding asset_object has updated.
Definition at line 358 of file asset_object.hpp.
asset_id_type graphene::chain::asset_bitasset_data_object::asset_id |
The asset this object belong to.
Definition at line 260 of file asset_object.hpp.
price_feed_with_icr graphene::chain::asset_bitasset_data_object::current_feed |
This is the currently active price feed, calculated from median_feed and other parameters.
Definition at line 272 of file asset_object.hpp.
time_point_sec graphene::chain::asset_bitasset_data_object::current_feed_publication_time |
This is the publication time of the oldest feed which was factored into current_feed.
Definition at line 274 of file asset_object.hpp.
price graphene::chain::asset_bitasset_data_object::current_initial_collateralization |
After BSIP77, when creating a new debt position or updating an existing position, the position will be checked against the initial_collateral_ratio
(ICR) parameter in the bitasset options. This value is derived from current_feed (which includes ICR
) for better performance and should be kept consistent.
Definition at line 288 of file asset_object.hpp.
price graphene::chain::asset_bitasset_data_object::current_maintenance_collateralization |
Call orders with collateralization (aka collateral/debt) not greater than this value are in margin call territory. This value is derived from current_feed for better performance and should be kept consistent.
Definition at line 283 of file asset_object.hpp.
bool graphene::chain::asset_bitasset_data_object::feed_cer_updated = false |
Track whether core exchange rate in current feed has updated.
Definition at line 361 of file asset_object.hpp.
flat_map<account_id_type, pair<time_point_sec,price_feed_with_icr> > graphene::chain::asset_bitasset_data_object::feeds |
Feeds published for this asset. The keys in this map are the feed publishing accounts. The timestamp on each feed is the time it was published.
Definition at line 268 of file asset_object.hpp.
share_type graphene::chain::asset_bitasset_data_object::force_settled_volume |
This is the volume of this asset which has been force-settled this maintanence interval.
Definition at line 294 of file asset_object.hpp.
share_type graphene::chain::asset_bitasset_data_object::individual_settlement_debt |
The individual settlement pool. In the event of individual settlements to fund, debt and collateral of the margin positions which got settled are moved here.
Amount of debt due to individual settlements
Definition at line 318 of file asset_object.hpp.
share_type graphene::chain::asset_bitasset_data_object::individual_settlement_fund |
Amount of collateral which is available for force settlement due to individual settlements.
Definition at line 320 of file asset_object.hpp.
bool graphene::chain::asset_bitasset_data_object::is_prediction_market = false |
True if this asset implements a Prediction Market.
Definition at line 291 of file asset_object.hpp.
price_feed_with_icr graphene::chain::asset_bitasset_data_object::median_feed |
This is the median of values from the currently active feeds.
Definition at line 270 of file asset_object.hpp.
bitasset_options graphene::chain::asset_bitasset_data_object::options |
The tunable options for BitAssets are stored in this field.
Definition at line 263 of file asset_object.hpp.
share_type graphene::chain::asset_bitasset_data_object::settlement_fund |
Amount of collateral which is available for force settlement due to global settlement.
Definition at line 310 of file asset_object.hpp.
price graphene::chain::asset_bitasset_data_object::settlement_price |
In the event of global settlement, all margin positions are settled with the siezed collateral being moved into the settlement fund. From this point on forced settlement occurs immediately when requested, using the settlement price and fund. Price at which force settlements of a globally settled asset will occur
Definition at line 308 of file asset_object.hpp.