-
Notifications
You must be signed in to change notification settings - Fork 649
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
Defer MCR update to next maintenance interval #941
Conversation
Looks good so far. |
tests/tests/bitasset_tests.cpp
Outdated
BOOST_CHECK( usd_id(db).bitasset_data(db).current_feed.settlement_price == current_feed.settlement_price ); | ||
BOOST_CHECK_EQUAL( usd_id(db).bitasset_data(db).current_feed.maintenance_collateral_ratio, 3500 ); | ||
// the limit order is still there, because `check_call_order` is skipped | ||
BOOST_CHECK( !db.find<limit_order_object>( sell_id ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing. Because MCR change won't trigger call_price
change, thus won't trigger execution of margin calls.
@pmconrad please review again. I feel that we need a BSIP for the "defer MCR update" feature. It does significantly impact user experience, specifically, it delays MCR of the first valid median feed to be set if the MCR is not default value. For better experience, perhaps we can update it immediately when there is no supply? Update: updated code to not defer MCR update when supply is zero. |
MSSR change can lead to order matching or black swan, but I think the code has covered it. Need test cases. |
Resolved conflicts: * tests/tests/bitasset_tests.cpp
Postponing this one since it needs a new BSIP. Title and OP updated. |
This approach is abandoned. I will create a new PR. |
This was PR for #935 "Call check_call_orders not only when settlement_price changed".
However, lately more commits added to it for new feature "Defer MCR update to next maintenance interval", which is described in this post: https://bitsharestalk.org/index.php?topic=26496.0 .
Need an approved BSIP to apply the change.
Things to be done: