Skip to content

Black swan detection checks short position with lowest call_price but not lowest collateral ratio #649

@abitmore

Description

@abitmore

In database:check_for_blackswan() in db_update.cpp:

    auto call_min = price::min( bitasset.options.short_backing_asset, mia.id );
    auto call_max = price::max( bitasset.options.short_backing_asset, mia.id );
    auto call_itr = call_price_index.lower_bound( call_min );
    auto call_end = call_price_index.upper_bound( call_max );

   ...

    auto least_collateral = call_itr->collateralization();

Due to possibility of being partially called, the position with lowest call_price can have higher collateral ratio than others.

Perhaps can see this as a duplicate of #343 .

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions