From 69ac9dc0676ab0ef496ac26cb321aa8d14277a0b Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 16 Feb 2018 09:51:51 +0000 Subject: [PATCH 1/5] Add BSIP 30 --- README.md | 1 + bsip-0030.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 bsip-0030.md diff --git a/README.md b/README.md index f6de885..ebbe8bf 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,4 @@ Number | Title | [27](bsip-0027.md) | Asset Issuer Reclaim Fee Pool Funds | Abit More | Protocol | Accepted [28](bsip-0028.md) | Worker Proposal Improvements | Bill Butler | Protocol | Draft [29](bsip-0029.md) | Asset issue change to require owner authority | Fabian Schuh | Protocol | Draft +[30](bsip-0030.md) | Always Allow Increasing Collateral Ratio If Debt Not Increased | Abit More | Protocol | Draft diff --git a/bsip-0030.md b/bsip-0030.md new file mode 100644 index 0000000..da2ae43 --- /dev/null +++ b/bsip-0030.md @@ -0,0 +1,71 @@ + BSIP: 0030 + Title: Always Allow Increasing Collateral Ratio If Debt Not Increased + Author: Abit More + Status: Draft + Type: Protocol + Created: 2018-02-16 + Discussion: https://github.com/bitshares/bitshares-core/issues/583, + https://github.com/bitshares/bitshares-core/issues/672 + Replaces: - + Worker: To be done + +# Abstract + +Currently, when a short position's collateral ratio is below MCR (a parameter +in price feed: `maintenance_collateral_ratio`) but is not completely filled +immediately due to a lack of enough volume on the opposite side of the market, +it will hang in the market and be waiting for being margin called. + +The owner then can adjust the order's collateral ratio **only if** +* to close the position, or +* the new collateral ratio is above MCR, or +* the call order get completely filled (margin called) immediately. + +While this prevents shorters from maliciously reducing collateral ratio (to +increase possibility of black swan event), it also prevents shorters from +slightly increasing collateral ratio (to decrease possibility of black swan +event). + +This BSIP proposes a mechanism to improve this situation. + +# Motivation + +Make the exchange system more user-friendly. + +# Rational + +The ecosystem would get benefit if shorters are allowed to reduce risks to +themselves while reducing risks to the system at same time. + +Current rules are a bit too strict, which can be loosed to: + +A shorter can adjust the position's collateral ratio **only if** +* to close the position, or +* the new collateral ratio is above MCR, or +* the call order get completely filled (margin called) immediately, or +* **the new ratio is higher than old ratio and debt is not increased** + +# Specifications + +In `do_apply()` function of `call_order_update_evaluator` class, if +finally found the call order still in margin call territory, +* don't throw an exception if `call_obj->collateralization()` is reduced, and +* require `delta_debt` of `call_order_update_operation` to be non-positive. + +# Discussion + +[to be added if any] + +# Summary for Shareholders + +[to be added if any] + +# Copyright + +This document is placed in the public domain. + +# See Also + +* https://github.com/bitshares/bitshares-core/issues/583 +* https://github.com/bitshares/bitshares-core/issues/672 +* https://bitsharestalk.org/index.php?topic=25926.0 From a38836001cb551304f8cf566b37dcf173445463d Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 16 Feb 2018 22:01:13 +0000 Subject: [PATCH 2/5] Add BSIP 31 --- bsip-0031.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 bsip-0031.md diff --git a/bsip-0031.md b/bsip-0031.md new file mode 100644 index 0000000..55a5b70 --- /dev/null +++ b/bsip-0031.md @@ -0,0 +1,65 @@ + BSIP: 0031 + Title: Update Short Position's Margin Call Price After Partially Called Or Settled + Author: Abit More + Status: Draft + Type: Protocol + Created: 2018-02-16 + Discussion: https://github.com/bitshares/bitshares-core/issues/343, + https://github.com/bitshares/bitshares-core/issues/649 + Replaces: - + Worker: To be done + +# Abstract + +Currently, when a short position get partially called or settled, the call +price won't change, that said, even if its actual collateral ratio is higher +than others, higher than minimum required, it will still be selling collateral +at a low price, taking precedence over other short positions. + +This behavior is causing several issues: +* it's somehow unfair, thus brought bad experience to shorters, and +* it prevents black swan event from being triggered in time when needed, + because the collateral ratio of the 2nd even overall short positions may + be too low but not being checked, thus risks the pegging system. + +This BSIP proposes a mechanism to improve this situation. + +# Motivation + +Make the exchange system more user-friendly. + +# Rational + +To attract more users, the system should be fair, should be well balanced. + +It's common sense that short positions with least collateral ratio should +get margin called first. This can be achieved if always update the margin +call price after every fill. + +# Specifications + +In `fill_order( const call_order_object& ...)` function of `database` class, +update `call_price` field of `call_order_object` after debt or collateral +changed to a non-zero value. + +In addtion, after `call_price` get updated, the iterators initialized with +`by_price` index may be invalidated, so need to review / revise involved code, +E.G. `check_call_orders(...)` function of `database` class. + +# Discussion + +[to be added if any] + +# Summary for Shareholders + +[to be added if any] + +# Copyright + +This document is placed in the public domain. + +# See Also + +* https://github.com/bitshares/bitshares-core/issues/343 +* https://github.com/bitshares/bitshares-core/issues/649 +* https://bitsharestalk.org/index.php?topic=25926.0 From 2255360034ad7e04f976604bc576413688444df5 Mon Sep 17 00:00:00 2001 From: abitmore Date: Sun, 18 Feb 2018 13:22:19 +0000 Subject: [PATCH 3/5] bsip30: fix typo --- bsip-0030.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsip-0030.md b/bsip-0030.md index da2ae43..11340d0 100644 --- a/bsip-0030.md +++ b/bsip-0030.md @@ -32,7 +32,7 @@ This BSIP proposes a mechanism to improve this situation. Make the exchange system more user-friendly. -# Rational +# Rationale The ecosystem would get benefit if shorters are allowed to reduce risks to themselves while reducing risks to the system at same time. From f350d86af9ce7c4c078301a7342ed4ec768c081f Mon Sep 17 00:00:00 2001 From: abitmore Date: Sun, 18 Feb 2018 13:23:02 +0000 Subject: [PATCH 4/5] bsip31: fix typo --- bsip-0031.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsip-0031.md b/bsip-0031.md index 55a5b70..e4fe09a 100644 --- a/bsip-0031.md +++ b/bsip-0031.md @@ -28,7 +28,7 @@ This BSIP proposes a mechanism to improve this situation. Make the exchange system more user-friendly. -# Rational +# Rationale To attract more users, the system should be fair, should be well balanced. From 219b3089b469610d69b06b23f347a828a89b1e18 Mon Sep 17 00:00:00 2001 From: abitmore Date: Sun, 18 Feb 2018 19:28:56 +0000 Subject: [PATCH 5/5] Update readme for BSIP 31 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ebbe8bf..4d10615 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,4 @@ Number | Title | [28](bsip-0028.md) | Worker Proposal Improvements | Bill Butler | Protocol | Draft [29](bsip-0029.md) | Asset issue change to require owner authority | Fabian Schuh | Protocol | Draft [30](bsip-0030.md) | Always Allow Increasing Collateral Ratio If Debt Not Increased | Abit More | Protocol | Draft +[31](bsip-0031.md) | Update Short Position's Margin Call Price After Partially Called Or Settled | Abit More | Protocol | Draft