BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Public Attributes | List of all members
graphene::chain::price_feed_with_icr Struct Reference

defines market parameters for margin positions, extended with an initial_collateral_ratio field More...

#include <asset_object.hpp>

Inheritance diagram for graphene::chain::price_feed_with_icr:
graphene::protocol::price_feed

Public Member Functions

 price_feed_with_icr ()
 
 price_feed_with_icr (const price_feed &pf, const optional< uint16_t > &icr={})
 
price calculate_initial_collateralization () const
 
- Public Member Functions inherited from graphene::protocol::price_feed
void validate () const
 
bool is_for (asset_id_type asset_id) const
 
price max_short_squeeze_price () const
 
price max_short_squeeze_price_before_hf_1270 () const
 
price margin_call_order_price (const fc::optional< uint16_t > margin_call_fee_ratio) const
 
ratio_type margin_call_pays_ratio (const fc::optional< uint16_t > margin_call_fee_ratio) const
 
price maintenance_collateralization () const
 
bool margin_call_params_equal (const price_feed &b) const
 

Public Attributes

uint16_t initial_collateral_ratio = GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO
 
- Public Attributes inherited from graphene::protocol::price_feed
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
 

Detailed Description

defines market parameters for margin positions, extended with an initial_collateral_ratio field

Definition at line 228 of file asset_object.hpp.

Constructor & Destructor Documentation

graphene::chain::price_feed_with_icr::price_feed_with_icr ( )
inline

Definition at line 235 of file asset_object.hpp.

graphene::chain::price_feed_with_icr::price_feed_with_icr ( const price_feed pf,
const optional< uint16_t > &  icr = {} 
)
inline

Definition at line 239 of file asset_object.hpp.

Member Function Documentation

price price_feed_with_icr::calculate_initial_collateralization ( ) const

The result will be used to check new debt positions and position updates. Calculation: ~settlement_price * initial_collateral_ratio / GRAPHENE_COLLATERAL_RATIO_DENOM

Definition at line 143 of file asset_object.cpp.

Member Data Documentation

uint16_t graphene::chain::price_feed_with_icr::initial_collateral_ratio = GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO

After BSIP77, when creating a new debt position or updating an existing position, the position will be checked against this parameter. Fixed point between 1.000 and 10.000, implied fixed point denominator is GRAPHENE_COLLATERAL_RATIO_DENOM

Definition at line 233 of file asset_object.hpp.


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