BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
graphene::protocol::bitasset_options Struct Reference

The bitasset_options struct contains configurable options available only to BitAssets. More...

#include <asset_ops.hpp>

Classes

struct  ext
 

Public Types

enum  black_swan_response_type {
  black_swan_response_type::global_settlement = 0, black_swan_response_type::no_settlement = 1, black_swan_response_type::individual_settlement_to_fund = 2, black_swan_response_type::individual_settlement_to_order = 3,
  black_swan_response_type::BSRM_TYPE_COUNT = 4
}
 Defines how a BitAsset would respond to black swan events. More...
 

Public Member Functions

void validate () const
 
black_swan_response_type get_black_swan_response_method () const
 Get the effective black swan response method. More...
 

Public Attributes

uint32_t feed_lifetime_sec = GRAPHENE_DEFAULT_PRICE_FEED_LIFETIME
 Time before a price feed expires. More...
 
uint8_t minimum_feeds = 1
 Minimum number of unexpired feeds required to extract a median feed from. More...
 
uint32_t force_settlement_delay_sec = GRAPHENE_DEFAULT_FORCE_SETTLEMENT_DELAY
 This is the delay between the time a long requests settlement and the chain evaluates the settlement. More...
 
uint16_t force_settlement_offset_percent = GRAPHENE_DEFAULT_FORCE_SETTLEMENT_OFFSET
 This is the percent to adjust the feed price in the short's favor in the event of a forced settlement. More...
 
uint16_t maximum_force_settlement_volume = GRAPHENE_DEFAULT_FORCE_SETTLEMENT_MAX_VOLUME
 
asset_id_type short_backing_asset
 
extension< extextensions
 

Detailed Description

The bitasset_options struct contains configurable options available only to BitAssets.

Note
Changes to this struct will break protocol compatibility

Definition at line 109 of file asset_ops.hpp.

Member Enumeration Documentation

◆ black_swan_response_type

Defines how a BitAsset would respond to black swan events.

Enumerator
global_settlement 

All debt positions are closed, all or some collateral is moved to a global-settlement fund. Debt asset holders can claim collateral via force-settlement. It is not allowed to create new debt positions when the fund is not empty.

no_settlement 

No debt position is closed, and the derived settlement price is dynamically capped at the collateral ratio of the debt position with the least collateral ratio so that all debt positions are able to pay off their debt when being margin called or force-settled. It is allowed to create new debt positions and update existing debt positions. Also known as "Global Settlement Protection".

individual_settlement_to_fund 

Only the undercollateralized debt positions are closed and their collateral is moved to a fund which can be claimed via force-settlement. The derived settlement price is capped at the fund's collateral ratio so that remaining debt positions will not be margin called or force-settled at a worse price when the fund is not empty. It is allowed to create new debt positions and update existing debt positions.

individual_settlement_to_order 

Only the undercollateralized debt positions are closed and their collateral is moved to a limit order on the order book which can be bought. The derived settlement price is NOT capped, which means remaining debt positions could be margin called at a worse price. It is allowed to create new debt positions and update existing debt positions.

BSRM_TYPE_COUNT 

Total number of available black swan response methods.

Definition at line 112 of file asset_ops.hpp.

Member Function Documentation

◆ get_black_swan_response_method()

black_swan_response_type graphene::protocol::bitasset_options::get_black_swan_response_method ( ) const
inline

Get the effective black swan response method.

Definition at line 180 of file asset_ops.hpp.

◆ validate()

void graphene::protocol::bitasset_options::validate ( ) const

Perform internal consistency checks.

Exceptions
fc::exceptionif any check fails

Definition at line 237 of file asset_ops.cpp.

Member Data Documentation

◆ extensions

extension<ext> graphene::protocol::bitasset_options::extensions

Definition at line 173 of file asset_ops.hpp.

◆ feed_lifetime_sec

uint32_t graphene::protocol::bitasset_options::feed_lifetime_sec = GRAPHENE_DEFAULT_PRICE_FEED_LIFETIME

Time before a price feed expires.

Definition at line 156 of file asset_ops.hpp.

◆ force_settlement_delay_sec

uint32_t graphene::protocol::bitasset_options::force_settlement_delay_sec = GRAPHENE_DEFAULT_FORCE_SETTLEMENT_DELAY

This is the delay between the time a long requests settlement and the chain evaluates the settlement.

Definition at line 160 of file asset_ops.hpp.

◆ force_settlement_offset_percent

uint16_t graphene::protocol::bitasset_options::force_settlement_offset_percent = GRAPHENE_DEFAULT_FORCE_SETTLEMENT_OFFSET

This is the percent to adjust the feed price in the short's favor in the event of a forced settlement.

Definition at line 162 of file asset_ops.hpp.

◆ maximum_force_settlement_volume

uint16_t graphene::protocol::bitasset_options::maximum_force_settlement_volume = GRAPHENE_DEFAULT_FORCE_SETTLEMENT_MAX_VOLUME

Force settlement volume can be limited such that only a certain percentage of the total existing supply of the asset may be force-settled within any given chain maintenance interval. This field stores the percentage of the current supply which may be force settled within the current maintenance interval. If force settlements come due in an interval in which the maximum volume has already been settled, the new settlements will be enqueued and processed at the beginning of the next maintenance interval.

Definition at line 168 of file asset_ops.hpp.

◆ minimum_feeds

uint8_t graphene::protocol::bitasset_options::minimum_feeds = 1

Minimum number of unexpired feeds required to extract a median feed from.

Definition at line 158 of file asset_ops.hpp.

◆ short_backing_asset

asset_id_type graphene::protocol::bitasset_options::short_backing_asset

This speicifies which asset type is used to collateralize short sales This field may only be updated if the current supply of the asset is zero.

Definition at line 171 of file asset_ops.hpp.


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