Golos
Разработчикам Статистика Баунти Документация Партнеры Github
Public Member Functions | Public Attributes | List of all members
golos::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 golos::chain::asset_bitasset_data_object:

Public Member Functions

template<typename Constructor , typename Allocator >
 asset_bitasset_data_object (Constructor &&c, allocator< Allocator > a)
 
 asset_bitasset_data_object ()
 
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
 
time_point_sec feed_expiration_time () const
 
bool feed_is_expired (time_point_sec current_time) const
 
void update_median_feeds (time_point_sec current_time)
 

Public Attributes

id_type id
 
protocol::asset_name_type asset_name
 Ticker symbol for this asset, i.e. "USD". More...
 
protocol::bitasset_options options
 The tunable options for BitAssets are stored in this field. More...
 
flat_map< account_name_type, pair< time_point_sec, protocol::price_feed< 0, 17, 0 > > > feeds
 
protocol::price_feed< 0, 17, 0 > 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...
 
protocol::price< 0, 17, 0 > settlement_price
 
share_type settlement_fund
 Amount of collateral which is available for force settlement. More...
 

Detailed Description

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

Definition at line 182 of file asset_object.hpp.

Constructor & Destructor Documentation

◆ asset_bitasset_data_object() [1/2]

template<typename Constructor , typename Allocator >
golos::chain::asset_bitasset_data_object::asset_bitasset_data_object ( Constructor &&  c,
allocator< Allocator >  a 
)
inline

Definition at line 186 of file asset_object.hpp.

◆ asset_bitasset_data_object() [2/2]

golos::chain::asset_bitasset_data_object::asset_bitasset_data_object ( )
inline

Definition at line 190 of file asset_object.hpp.

Member Function Documentation

◆ feed_expiration_time()

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

Definition at line 239 of file asset_object.hpp.

◆ feed_is_expired()

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

Definition at line 244 of file asset_object.hpp.

◆ has_settlement()

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

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

Definition at line 222 of file asset_object.hpp.

◆ max_force_settlement_volume()

share_type golos::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 10 of file asset_object.cpp.

◆ update_median_feeds()

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

Definition at line 26 of file asset_object.cpp.

Member Data Documentation

◆ asset_name

protocol::asset_name_type golos::chain::asset_bitasset_data_object::asset_name

Ticker symbol for this asset, i.e. "USD".

Definition at line 197 of file asset_object.hpp.

◆ current_feed

protocol::price_feed<0, 17, 0> golos::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 208 of file asset_object.hpp.

◆ current_feed_publication_time

time_point_sec golos::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 210 of file asset_object.hpp.

◆ feeds

flat_map<account_name_type, pair<time_point_sec, protocol::price_feed<0, 17, 0> > > golos::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 205 of file asset_object.hpp.

◆ force_settled_volume

share_type golos::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 216 of file asset_object.hpp.

◆ id

id_type golos::chain::asset_bitasset_data_object::id

Definition at line 194 of file asset_object.hpp.

◆ is_prediction_market

bool golos::chain::asset_bitasset_data_object::is_prediction_market = false

True if this asset implements a Prediction Market.

Definition at line 213 of file asset_object.hpp.

◆ options

protocol::bitasset_options golos::chain::asset_bitasset_data_object::options

The tunable options for BitAssets are stored in this field.

Definition at line 200 of file asset_object.hpp.

◆ settlement_fund

share_type golos::chain::asset_bitasset_data_object::settlement_fund

Amount of collateral which is available for force settlement.

Definition at line 236 of file asset_object.hpp.

◆ settlement_price

protocol::price<0, 17, 0> golos::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 234 of file asset_object.hpp.


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