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

tracks debt and call price information More...

#include <market_object.hpp>

Inheritance diagram for graphene::chain::call_order_object:

Public Member Functions

asset get_collateral () const
 
asset get_debt () const
 
asset amount_to_receive () const
 
asset_id_type debt_type () const
 
asset_id_type collateral_type () const
 
price collateralization () const
 
pair< asset_id_type, asset_id_typeget_market () const
 
share_type get_max_debt_to_cover (price match_price, price feed_price, const uint16_t maintenance_collateral_ratio) const
 Calculate maximum quantity of debt to cover to satisfy target_collateral_ratio. More...
 

Public Attributes

account_id_type borrower
 
share_type collateral
 call_price.base.asset_id, access via get_collateral More...
 
share_type debt
 call_price.quote.asset_id, access via get_debt More...
 
price call_price
 Collateral / Debt. More...
 
optional< uint16_t > target_collateral_ratio
 maximum CR to maintain when selling collateral on margin call More...
 

Static Public Attributes

static const uint8_t space_id = protocol_ids
 
static const uint8_t type_id = call_order_object_type
 

Detailed Description

tracks debt and call price information

There should only be one call_order_object per asset pair per account and they will all have the same call price.

Definition at line 112 of file market_object.hpp.

Member Function Documentation

◆ amount_to_receive()

asset graphene::chain::call_order_object::amount_to_receive ( ) const
inline

Definition at line 120 of file market_object.hpp.

◆ collateral_type()

asset_id_type graphene::chain::call_order_object::collateral_type ( ) const
inline

Definition at line 122 of file market_object.hpp.

◆ collateralization()

price graphene::chain::call_order_object::collateralization ( ) const
inline

Definition at line 123 of file market_object.hpp.

◆ debt_type()

asset_id_type graphene::chain::call_order_object::debt_type ( ) const
inline

Definition at line 121 of file market_object.hpp.

◆ get_collateral()

asset graphene::chain::call_order_object::get_collateral ( ) const
inline

Definition at line 118 of file market_object.hpp.

◆ get_debt()

asset graphene::chain::call_order_object::get_debt ( ) const
inline

Definition at line 119 of file market_object.hpp.

◆ get_market()

pair<asset_id_type,asset_id_type> graphene::chain::call_order_object::get_market ( ) const
inline

Definition at line 132 of file market_object.hpp.

◆ get_max_debt_to_cover()

share_type call_order_object::get_max_debt_to_cover ( price  match_price,
price  feed_price,
const uint16_t  maintenance_collateral_ratio 
) const

Calculate maximum quantity of debt to cover to satisfy target_collateral_ratio.

Definition at line 57 of file market_object.cpp.

Member Data Documentation

◆ borrower

account_id_type graphene::chain::call_order_object::borrower

Definition at line 125 of file market_object.hpp.

◆ call_price

price graphene::chain::call_order_object::call_price

Collateral / Debt.

Definition at line 128 of file market_object.hpp.

◆ collateral

share_type graphene::chain::call_order_object::collateral

call_price.base.asset_id, access via get_collateral

Definition at line 126 of file market_object.hpp.

◆ debt

share_type graphene::chain::call_order_object::debt

call_price.quote.asset_id, access via get_debt

Definition at line 127 of file market_object.hpp.

◆ space_id

const uint8_t graphene::chain::call_order_object::space_id = protocol_ids
static

Definition at line 115 of file market_object.hpp.

◆ target_collateral_ratio

optional<uint16_t> graphene::chain::call_order_object::target_collateral_ratio

maximum CR to maintain when selling collateral on margin call

Definition at line 130 of file market_object.hpp.

◆ type_id

const uint8_t graphene::chain::call_order_object::type_id = call_order_object_type
static

Definition at line 116 of file market_object.hpp.


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