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

defines market parameters for margin positions More...

#include <asset.hpp>

Public Member Functions

void validate () const
 
bool is_for (asset_id_type asset_id) const
 

Friends

bool operator== (const price_feed &a, const price_feed &b)
 
price settlement_price
 
price core_exchange_rate
 Price at which automatically exchanging this asset for CORE from fee pool occurs (used for paying fees) More...
 
uint16_t maintenance_collateral_ratio = GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO
 
uint16_t maximum_short_squeeze_ratio = GRAPHENE_DEFAULT_MAX_SHORT_SQUEEZE_RATIO
 
price max_short_squeeze_price () const
 

Detailed Description

defines market parameters for margin positions

Definition at line 165 of file asset.hpp.

Member Function Documentation

◆ is_for()

bool graphene::chain::price_feed::is_for ( asset_id_type  asset_id) const

Definition at line 247 of file asset.cpp.

◆ max_short_squeeze_price()

price graphene::chain::price_feed::max_short_squeeze_price ( ) const

When updating a call order the following condition must be maintained:

debt * maintenance_price() < collateral debt * settlement_price < debt * maintenance debt * maintenance_price() < debt * max_short_squeeze_price() price maintenance_price()const;When selling collateral to pay off debt, the least amount of debt to receive should be min_usd = max_short_squeeze_price() * collateral

This is provided to ensure that a black swan cannot be trigged due to poor liquidity alone, it must be confirmed by having the max_short_squeeze_price() move below the black swan price.

Definition at line 261 of file asset.cpp.

◆ validate()

void graphene::chain::price_feed::validate ( ) const

Definition at line 234 of file asset.cpp.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const price_feed a,
const price_feed b 
)
friend

Definition at line 214 of file asset.hpp.

Member Data Documentation

◆ core_exchange_rate

price graphene::chain::price_feed::core_exchange_rate

Price at which automatically exchanging this asset for CORE from fee pool occurs (used for paying fees)

Definition at line 188 of file asset.hpp.

◆ maintenance_collateral_ratio

uint16_t graphene::chain::price_feed::maintenance_collateral_ratio = GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO

Fixed point between 1.000 and 10.000, implied fixed point denominator is GRAPHENE_COLLATERAL_RATIO_DENOM

Definition at line 191 of file asset.hpp.

◆ maximum_short_squeeze_ratio

uint16_t graphene::chain::price_feed::maximum_short_squeeze_ratio = GRAPHENE_DEFAULT_MAX_SHORT_SQUEEZE_RATIO

Fixed point between 1.000 and 10.000, implied fixed point denominator is GRAPHENE_COLLATERAL_RATIO_DENOM

Definition at line 194 of file asset.hpp.

◆ settlement_price

price graphene::chain::price_feed::settlement_price

Required maintenance collateral is defined as a fixed point number with a maximum value of 10.000 and a minimum value of 1.000. (denominated in GRAPHENE_COLLATERAL_RATIO_DENOM)

A black swan event occurs when value_of_collateral equals value_of_debt, to avoid a black swan a margin call is executed when value_of_debt * required_maintenance_collateral equals value_of_collateral using rate.

Default requirement is $1.75 of collateral per $1 of debt

BlackSwan —> SQR —> MCR -—> SP Forced settlements will evaluate using this price, defined as BITASSET / COLLATERAL

Definition at line 185 of file asset.hpp.


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