From 8a061503381592edddd4cdccd9cb97d08238235c Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 23 Feb 2018 18:56:36 +0000 Subject: [PATCH] bsip35: handle settling after globally settled --- bsip-0035.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bsip-0035.md b/bsip-0035.md index aec36d8..c4104bc 100644 --- a/bsip-0035.md +++ b/bsip-0035.md @@ -204,6 +204,8 @@ may be paying something for nothing in current system): * when matching a limit order with a call order, process the limit order * when matching a force settle order with a call order, process the settle order * when globally settling, process the settlement fund +* when force settling after an asset has been globally settled, paying the force + settle order from global settlement fund, process the settle order ## The Improved Solution (This BSIP) @@ -236,6 +238,10 @@ The detailed rules proposes in this BSIP (new rules highlighted): collateral amount * **when the asset is not a prediction market, if a call order would pay nothing, let it pay 1 Satoshi (round up).** + * when paying a settle order from global settlement fund, in favor of global + settlement fund, round down receiving collateral amount + * **when the asset is not a prediction market, if the settle order would + receive nothing, raise an exception (aka let the operation fail).** Take the example mentioned in the 4th comment of [bitshares-core issue #132](https://github.com/bitshares/bitshares-core/issues/132): @@ -310,6 +316,12 @@ need to check the label, if found it's completed, process next asset. In `global_settle_asset(...)` function of `database` class, check each `pays`, once it's zero, and the asset is not a prediction market, let it be `1`. +## When Paying A Settle Order From Global Settlement Fund + +In `do_apply(...)` function of `asset_settle_evaluator` class, +after calculated `settled_amount`, check if it is zero. If the answer is `true`, +and the asset is not a prediction maket, throw a `fc::exception`. + # Discussion There is an argument suggests when matching call orders, we should always