BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
27 namespace graphene {
namespace protocol {
132 void validate(
bool check_upper_bound =
false )
const;
135 price
operator / (
const asset& base,
const asset& quote );
138 bool operator < (
const price& a,
const price& b );
139 bool operator == (
const price& a,
const price& b );
146 asset
operator * (
const asset& a,
const price& b );
152 { p = p * r;
return p; }
154 { p = p / r;
return p; }
301 bool is_for( asset_id_type asset_id )
const;
313 (settlement_price)(maintenance_collateral_ratio)(maximum_short_squeeze_ratio)(core_exchange_rate) )
bool operator<(const price &a, const price &b)
friend bool operator<(const asset &a, const asset &b)
friend bool operator>(const asset &a, const asset &b)
#define GRAPHENE_DEFAULT_MAX_SHORT_SQUEEZE_RATIO
Stop calling when collateral only pays off 150% of the debt.
asset & operator-=(const asset &o)
price core_exchange_rate
Price at which automatically exchanging this asset for CORE from fee pool occurs (used for paying fee...
The price struct stores asset prices in the BitShares system.
static share_type scaled_precision(uint8_t precision)
bool margin_call_params_equal(const price_feed &b) const
friend asset operator+(const asset &a, const asset &b)
price maintenance_collateralization() const
price operator/(const asset &base, const asset "e)
bool operator<=(const price &a, const price &b)
friend bool operator!=(const asset &a, const asset &b)
asset(share_type a=0, asset_id_type id=asset_id_type())
price max_short_squeeze_price() const
static price unit_price(asset_id_type a=asset_id_type())
The unit price for an asset type A is defined to be a price such that for any asset m,...
friend bool operator<=(const asset &a, const asset &b)
friend bool operator>=(const asset &a, const asset &b)
static price call_price(const asset &debt, const asset &collateral, uint16_t collateral_ratio)
asset multiply_and_round_up(const price &p) const
Multiply and round up.
#define GRAPHENE_DEFAULT_MAINTENANCE_COLLATERAL_RATIO
Call when collateral only pays off 175% the debt.
uint16_t maximum_short_squeeze_ratio
price operator~(const price &p)
defines market parameters for margin positions
bool operator==(const price &a, const price &b)
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
bool operator>=(const price &a, const price &b)
asset & operator+=(const asset &o)
bool operator>(const price &a, const price &b)
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
void validate(bool check_upper_bound=false) const
Check if the object is valid.
uint16_t maintenance_collateral_ratio
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
ratio_type margin_call_pays_ratio(const fc::optional< uint16_t > &margin_call_fee_ratio) const
price max_short_squeeze_price_before_hf_1270() const
friend bool operator==(const asset &a, const asset &b)
price(const asset &_base=asset(), const asset &_quote=asset())
bool is_for(asset_id_type asset_id) const
price & operator*=(price &p, const ratio_type &r)
ratio_type margin_call_order_ratio(const fc::optional< uint16_t > &margin_call_fee_ratio) const
price & operator/=(price &p, const ratio_type &r)
boost::rational< int32_t > ratio_type
bool operator!=(const address &a, const address &b)
price margin_call_order_price(const fc::optional< uint16_t > &margin_call_fee_ratio) const
asset operator*(const asset &a, const price &b)
Multiply and round down.