BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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 get_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_order_ratio (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 229 of file asset_object.hpp.

Constructor & Destructor Documentation

◆ price_feed_with_icr() [1/2]

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

Definition at line 236 of file asset_object.hpp.

◆ price_feed_with_icr() [2/2]

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

Definition at line 240 of file asset_object.hpp.

Member Function Documentation

◆ get_initial_collateralization()

price graphene::chain::price_feed_with_icr::get_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 145 of file asset_object.cpp.

Member Data Documentation

◆ initial_collateral_ratio

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


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