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

Defer MCR update to next maintenance interval #941

Closed
wants to merge 14 commits into from

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented May 22, 2018

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:

@pmconrad
Copy link
Contributor

Looks good so far.

@abitmore abitmore self-assigned this May 23, 2018
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 ) );
Copy link
Member Author

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.

@abitmore
Copy link
Member Author

abitmore commented May 24, 2018

@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.

@abitmore
Copy link
Member Author

MSSR change can lead to order matching or black swan, but I think the code has covered it. Need test cases.

@abitmore abitmore changed the title Call check_call_orders not only when settlement_price changed Defer MCR update to next maintenance interval May 25, 2018
@abitmore abitmore removed their assignment May 25, 2018
@abitmore
Copy link
Member Author

Postponing this one since it needs a new BSIP. Title and OP updated.

@abitmore abitmore modified the milestones: 201806 - Consensus Changing Release, Future Consensus-Changing Release May 25, 2018
@abitmore abitmore removed this from the Future Consensus-Changing Release milestone Sep 3, 2018
@abitmore
Copy link
Member Author

abitmore commented Sep 3, 2018

This approach is abandoned. I will create a new PR.

@abitmore abitmore closed this Sep 3, 2018
@abitmore abitmore deleted the 935-check-feed-change branch February 5, 2019 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants