Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
abitmore opened this issue Feb 6, 2018 · 1 comment

Comments

@abitmore
Copy link
Member

abitmore commented Feb 6, 2018

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 .

@abitmore
Copy link
Member Author

Done with #829.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants