Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
graphene::chain::asset_bitasset_data_object Class Reference

contains properties that only apply to bitassets (market issued assets) More...

#include <asset_object.hpp>

Inheritance diagram for graphene::chain::asset_bitasset_data_object:

Public Member Functions

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 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_hardfork_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)
 

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 > > feeds
 
price_feed current_feed
 
time_point_sec current_feed_publication_time
 This is the publication time of the oldest feed which was factored into current_feed. More...
 
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. More...
 

Static Public Attributes

static const uint8_t space_id = implementation_ids
 
static const uint8_t type_id = impl_asset_bitasset_data_type
 

Detailed Description

contains properties that only apply to bitassets (market issued assets)

Definition at line 173 of file asset_object.hpp.

Member Function Documentation

◆ feed_expiration_time()

time_point_sec graphene::chain::asset_bitasset_data_object::feed_expiration_time ( ) const
inline

The time when current_feed would expire.

Definition at line 232 of file asset_object.hpp.

◆ feed_is_expired()

bool graphene::chain::asset_bitasset_data_object::feed_is_expired ( time_point_sec  current_time) const
inline

Definition at line 242 of file asset_object.hpp.

◆ feed_is_expired_before_hardfork_615()

bool graphene::chain::asset_bitasset_data_object::feed_is_expired_before_hardfork_615 ( time_point_sec  current_time) const
inline

Definition at line 240 of file asset_object.hpp.

◆ has_settlement()

bool graphene::chain::asset_bitasset_data_object::has_settlement ( ) const
inline

return true if there has been a black swan, false otherwise

Definition at line 204 of file asset_object.hpp.

◆ max_force_settlement_volume()

share_type 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.

◆ need_to_update_cer()

bool graphene::chain::asset_bitasset_data_object::need_to_update_cer ( ) const
inline

Whether need to update core_exchange_rate in asset_object.

Definition at line 226 of file asset_object.hpp.

◆ update_median_feeds()

void graphene::chain::asset_bitasset_data_object::update_median_feeds ( time_point_sec  current_time)

Definition at line 54 of file asset_object.cpp.

Member Data Documentation

◆ asset_cer_updated

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 220 of file asset_object.hpp.

◆ asset_id

asset_id_type graphene::chain::asset_bitasset_data_object::asset_id

The asset this object belong to.

Definition at line 180 of file asset_object.hpp.

◆ current_feed

price_feed graphene::chain::asset_bitasset_data_object::current_feed

This is the currently active price feed, calculated as the median of values from the currently active feeds.

Definition at line 191 of file asset_object.hpp.

◆ current_feed_publication_time

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 193 of file asset_object.hpp.

◆ feed_cer_updated

bool graphene::chain::asset_bitasset_data_object::feed_cer_updated = false

Track whether core exchange rate in current feed has updated.

Definition at line 223 of file asset_object.hpp.

◆ feeds

flat_map<account_id_type, pair<time_point_sec,price_feed> > graphene::chain::asset_bitasset_data_object::feeds

Feeds published for this asset. If issuer is not committee, the keys in this map are the feed publishing accounts; otherwise, the feed publishers are the currently active committee_members and witnesses and this map should be treated as an implementation detail. The timestamp on each feed is the time it was published.

Definition at line 188 of file asset_object.hpp.

◆ force_settled_volume

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 199 of file asset_object.hpp.

◆ is_prediction_market

bool graphene::chain::asset_bitasset_data_object::is_prediction_market = false

True if this asset implements a Prediction Market.

Definition at line 196 of file asset_object.hpp.

◆ options

bitasset_options graphene::chain::asset_bitasset_data_object::options

The tunable options for BitAssets are stored in this field.

Definition at line 183 of file asset_object.hpp.

◆ settlement_fund

share_type graphene::chain::asset_bitasset_data_object::settlement_fund

Amount of collateral which is available for force settlement.

Definition at line 216 of file asset_object.hpp.

◆ settlement_price

price graphene::chain::asset_bitasset_data_object::settlement_price

In the event of a black swan, the swan price is saved in the settlement price, and all margin positions are settled at the same price with the siezed collateral being moved into the settlement fund. From this point on no further updates to the asset are permitted (no feeds, etc) and forced settlement occurs immediately when requested, using the settlement price and fund. Price at which force settlements of a black swanned asset will occur

Definition at line 214 of file asset_object.hpp.

◆ space_id

const uint8_t graphene::chain::asset_bitasset_data_object::space_id = implementation_ids
static

Definition at line 176 of file asset_object.hpp.

◆ type_id

const uint8_t graphene::chain::asset_bitasset_data_object::type_id = impl_asset_bitasset_data_type
static

Definition at line 177 of file asset_object.hpp.


The documentation for this class was generated from the following files: