From 6a51733b33696e62111b7460e4b8631a75d61f9c Mon Sep 17 00:00:00 2001 From: John Jones Date: Tue, 17 Sep 2019 15:18:41 -0500 Subject: [PATCH 01/11] switch flag name to enable --- bsip-0048.md | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index c93660f..5ff7366 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -11,44 +11,40 @@ # Abstract The possibility of creating assets on the BitShares Blockchain is a core feature -of our platform. In the case of an ico, the ico-holders can create an asset with +of our platform. In the case of an ICO, the ICO holders can create an asset with a fixed maximum supply. However this maximum supply can be changed by the -asset creator (issuer) anytime. This exposes participators ico to the risk, -of loosing value of their bought asset. +asset creator (issuer) anytime. This exposes participants in the ICO to the risk +of losing value of their purchased asset. With this BSIP a flag will be introduced which forbids the modification of the maximum supply of an issuer created asset. # Motivation -The implementation of a flag, to disable the modification of the maximum supply for -issuer created asset, has effects for both sides. On the one side the security for the -participators or non-issuer users increases, because the value of their assets (tokens) -can't be manipulated by exposing the market to more created tokens. And on the other side -it is good marketing for the ico-hoders, because they can advertise with their fixed -maximum supply. +The implementation of a flag to disable the modification of the maximum supply for +issuer created asset, has benefits bor both the participants and the ICO holder. Participants int the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. # Rational -The `disable_modify_max_supply` is a new created flag in the `asset_issuer_permissions`. +The `allow_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`). -Once the flag is activated, it can't be deactivated. +Once the flag is activated, it can only be deactivated if `current_supply` is zero. # Specifications -This BSIP comes with a change to the protocol, which requires a propotocol upgrade. +This BSIP comes with a change to the protocol, hence requires a propotocol upgrade. However the changes to the code are minor. -1. Add the `disable_modify_max_supply` flag to the issuer permissions -2. Add a `can_modify_max_supply()` the `asset_object` -3. Change the `asset_update_evaluator::evaluate` method to assert false for - 1. the deactivation of the `disable_modify_max_supply` flag - 2. the modification of the `max_supply` when the `disable_modify_max_supply` is set +1. Add the `allow_modify_max_supply` flag to the issuer permissions +2. Set `allow_modify_max_supply` to true for existing assets at hardfork time +3. Add a `can_modify_max_supply()` the `asset_object` +4. Change the `asset_update_evaluator::evaluate` method to assert false for + 1. the activation of the `allow_modify_max_supply` flag if `current_supply` is not zero or + 2. the modification of the `max_supply` when the `enable_modify_max_supply` is false # Summary for Shareholders -This BSIP proposes a way to improve the user security in the context of issuer created -assets. +This BSIP proposes a way to improve the financial security of users against the dilution of issuer created assets. # Copyright From 03d5a933fe016ee3267ccb8dfe4320ef78071574 Mon Sep 17 00:00:00 2001 From: John Jones Date: Wed, 18 Sep 2019 07:44:48 -0500 Subject: [PATCH 02/11] fix typos, revert flag name --- bsip-0048.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index 5ff7366..423e875 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -21,26 +21,26 @@ supply of an issuer created asset. # Motivation -The implementation of a flag to disable the modification of the maximum supply for -issuer created asset, has benefits bor both the participants and the ICO holder. Participants int the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. +A flag to disable the modification of the maximum supply for +issuer created asset will be implemented. This has benefits for both the participants and the ICO holder. Participants in the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. # Rational -The `allow_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. +The `disable_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`). -Once the flag is activated, it can only be deactivated if `current_supply` is zero. +Once the flag is set to `true`, it can only be set to `false` if `current_supply` is zero. # Specifications This BSIP comes with a change to the protocol, hence requires a propotocol upgrade. However the changes to the code are minor. -1. Add the `allow_modify_max_supply` flag to the issuer permissions -2. Set `allow_modify_max_supply` to true for existing assets at hardfork time +1. Add the `disable_modify_max_supply` flag to the issuer permissions +2. Set `disable_modify_max_supply` to false for existing assets at hardfork time 3. Add a `can_modify_max_supply()` the `asset_object` 4. Change the `asset_update_evaluator::evaluate` method to assert false for - 1. the activation of the `allow_modify_max_supply` flag if `current_supply` is not zero or - 2. the modification of the `max_supply` when the `enable_modify_max_supply` is false + 1. the setting of the `disable_modify_max_supply` flag to `false` if `current_supply` is not zero or + 2. the modification of the `max_supply` when the `disable_modify_max_supply` is `true` # Summary for Shareholders From b93d08115c88a10c509230ebb0a064c13da25adc Mon Sep 17 00:00:00 2001 From: John Jones Date: Wed, 18 Sep 2019 08:46:33 -0500 Subject: [PATCH 03/11] Add disable_issue flag --- bsip-0048.md | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index 423e875..ee99ed4 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -10,37 +10,44 @@ # Abstract -The possibility of creating assets on the BitShares Blockchain is a core feature -of our platform. In the case of an ICO, the ICO holders can create an asset with -a fixed maximum supply. However this maximum supply can be changed by the -asset creator (issuer) anytime. This exposes participants in the ICO to the risk -of losing value of their purchased asset. +The possibility of creating assets on the BitShares Blockchain is a core feature of our platform. In the case of an ICO, the ICO holders can create an asset with a maximum supply. However this maximum supply can be changed by the asset creator (issuer) anytime. This exposes participants in the ICO to the risk of losing value of their purchased asset. -With this BSIP a flag will be introduced which forbids the modification of the maximum -supply of an issuer created asset. +With this BSIP a flag will be introduced which forbids the modification of the maximum supply of an issuer created asset. + +In addition, another new flag will be introduced that prevents any more tokens from being issued in the future. # Motivation -A flag to disable the modification of the maximum supply for -issuer created asset will be implemented. This has benefits for both the participants and the ICO holder. Participants in the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. +A flag to disable the modification of the maximum supply for issuer created asset will be implemented. This has benefits for both the participants and the ICO holder. Participants in the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. + +A flag to disable issuing allows token holders to be assured that the current supply will remain fixed, even if there are unissued tokens. # Rational -The `disable_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. -The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`). -Once the flag is set to `true`, it can only be set to `false` if `current_supply` is zero. +The `disable_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`). Once the flag is set to `true`, it can only be set to `false` if `current_supply` is zero. + +The `disable_issue` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid issuance of additional tokens. Once the flag is set to `true`, it can not be changed. # Specifications -This BSIP comes with a change to the protocol, hence requires a propotocol upgrade. -However the changes to the code are minor. +This BSIP comes with changes to the protocol, hence requires a propotocol upgrade. However the changes to the code are minor. + +For `disable_modify_max_supply`: 1. Add the `disable_modify_max_supply` flag to the issuer permissions 2. Set `disable_modify_max_supply` to false for existing assets at hardfork time -3. Add a `can_modify_max_supply()` the `asset_object` -4. Change the `asset_update_evaluator::evaluate` method to assert false for +3. Add a `can_modify_max_supply()` to the `asset_object` +4. Change the `asset_update_evaluator::do_evaluate` method to assert false for 1. the setting of the `disable_modify_max_supply` flag to `false` if `current_supply` is not zero or 2. the modification of the `max_supply` when the `disable_modify_max_supply` is `true` + +For `disable_issue`: + +1. Add the `disable_issue` flag to the issuer permissions +2. Set the `disable_issue` flag to `false` for existing assets at hardfork time +3. Add a `can_issue()` to the `asset_object` +4. Change the `asset_update_evaluator::do_evaluate` method to assert false for the setting of the `disable_issue` flag to `false` if it is currently `true` +5. Change the `asset_issue_evaluator::do_evaluate` method to assert false if `can_modify_max_supply()` returns false # Summary for Shareholders From 0d8e38d35367dd19a5b40f3ed865dd71a56e7b0b Mon Sep 17 00:00:00 2001 From: John Jones Date: Wed, 18 Sep 2019 11:26:33 -0500 Subject: [PATCH 04/11] Add changing precision --- bsip-0048.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index ee99ed4..442b679 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -10,24 +10,32 @@ # Abstract -The possibility of creating assets on the BitShares Blockchain is a core feature of our platform. In the case of an ICO, the ICO holders can create an asset with a maximum supply. However this maximum supply can be changed by the asset creator (issuer) anytime. This exposes participants in the ICO to the risk of losing value of their purchased asset. +The possibility of creating assets on the BitShares Blockchain is a core feature of our platform. However some things are too maleable when they should not be. Other things are inflexible when they should be. + +In the case of an ICO, the ICO holders can create an asset with a maximum supply. However this maximum supply can be changed by the asset creator (issuer) anytime. This exposes participants in the ICO to the risk of losing value of their purchased asset. With this BSIP a flag will be introduced which forbids the modification of the maximum supply of an issuer created asset. In addition, another new flag will be introduced that prevents any more tokens from being issued in the future. +And finally, the ability to change the precision of an asset will now be available as long as current supply is zero. + # Motivation A flag to disable the modification of the maximum supply for issuer created asset will be implemented. This has benefits for both the participants and the ICO holder. Participants in the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. A flag to disable issuing allows token holders to be assured that the current supply will remain fixed, even if there are unissued tokens. +The ability to change the precision of a created asset adds flexibility in the asset creation process. + # Rational The `disable_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`). Once the flag is set to `true`, it can only be set to `false` if `current_supply` is zero. The `disable_issue` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid issuance of additional tokens. Once the flag is set to `true`, it can not be changed. +Changing the precision of an asset should be easily accomplished with an `asset_update_operation`. This causes no harm while the asset is not issued. + # Specifications This BSIP comes with changes to the protocol, hence requires a propotocol upgrade. However the changes to the code are minor. @@ -48,10 +56,15 @@ For `disable_issue`: 3. Add a `can_issue()` to the `asset_object` 4. Change the `asset_update_evaluator::do_evaluate` method to assert false for the setting of the `disable_issue` flag to `false` if it is currently `true` 5. Change the `asset_issue_evaluator::do_evaluate` method to assert false if `can_modify_max_supply()` returns false + +To change the precision: + +1. Add the `fc::optional new_precision` to the `asset_update_operation` struct. +2. Change the `asset_update_evaluator::do_evaluate` method to assert false if `new_precision` exists and is not equal to `asset_object.precision` and `current_supply` is not zero. # Summary for Shareholders -This BSIP proposes a way to improve the financial security of users against the dilution of issuer created assets. +This BSIP proposes a way to improve the financial security of users against the dilution of issuer created assets. It also provides a mechanism for asset creators to modify the precision of their asset. # Copyright From 0c8b60b94f0b61a4e5ac9008504632cf06d5fe96 Mon Sep 17 00:00:00 2001 From: John Jones Date: Thu, 19 Sep 2019 09:34:36 -0500 Subject: [PATCH 05/11] Fix typos, add some clarity --- bsip-0048.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index 442b679..6c453da 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -10,9 +10,9 @@ # Abstract -The possibility of creating assets on the BitShares Blockchain is a core feature of our platform. However some things are too maleable when they should not be. Other things are inflexible when they should be. +The possibility of creating assets on the BitShares Blockchain is a core feature of our platform. However some things are too malleable when they should not be. Other things are not flexible when they should be. -In the case of an ICO, the ICO holders can create an asset with a maximum supply. However this maximum supply can be changed by the asset creator (issuer) anytime. This exposes participants in the ICO to the risk of losing value of their purchased asset. +Asset creators can create an asset with a maximum supply. However this maximum supply can be changed by the asset creator (issuer) anytime. This exposes token holders to the risk of their purchased asset losing value. With this BSIP a flag will be introduced which forbids the modification of the maximum supply of an issuer created asset. @@ -22,9 +22,9 @@ And finally, the ability to change the precision of an asset will now be availab # Motivation -A flag to disable the modification of the maximum supply for issuer created asset will be implemented. This has benefits for both the participants and the ICO holder. Participants in the ICO are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. ICO holders are able to market the fact that the maximum supply is fixed. +A flag to disable the modification of the maximum supply for issuer created asset will be implemented. This has benefits for both the participants and the asset creator. Asset holders are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. Asset creators are able to market the fact that the maximum supply is fixed. -A flag to disable issuing allows token holders to be assured that the current supply will remain fixed, even if there are unissued tokens. +A flag to disable issuing allows asset holders to be assured that the current supply will remain fixed, even if there are unissued tokens. The ability to change the precision of a created asset adds flexibility in the asset creation process. @@ -61,10 +61,14 @@ To change the precision: 1. Add the `fc::optional new_precision` to the `asset_update_operation` struct. 2. Change the `asset_update_evaluator::do_evaluate` method to assert false if `new_precision` exists and is not equal to `asset_object.precision` and `current_supply` is not zero. - + +# Discussion + +Using `disable_` as names for boolean values is not advisable and can lead to confusion. However, these names were chosen for compatibility reasons. See the comments [of a similar situation here](https://github.com/bitshares/bitshares-core/pull/1375#pullrequestreview-164580457). + # Summary for Shareholders -This BSIP proposes a way to improve the financial security of users against the dilution of issuer created assets. It also provides a mechanism for asset creators to modify the precision of their asset. +This BSIP proposes a way to improve the financial security of users against the dilution of a held asset. It also provides a mechanism for asset creators to modify the precision of their asset. # Copyright From 79e4f19ff9ecdcc48580a3c3b9380f426ab63cde Mon Sep 17 00:00:00 2001 From: John Jones Date: Thu, 19 Sep 2019 09:50:09 -0500 Subject: [PATCH 06/11] Addition to specifications, risks sections --- bsip-0048.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bsip-0048.md b/bsip-0048.md index 6c453da..5d5ef8f 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -60,7 +60,17 @@ For `disable_issue`: To change the precision: 1. Add the `fc::optional new_precision` to the `asset_update_operation` struct. -2. Change the `asset_update_evaluator::do_evaluate` method to assert false if `new_precision` exists and is not equal to `asset_object.precision` and `current_supply` is not zero. +2. Change the `asset_update_evaluator::do_evaluate` method to assert false if + 1. `new_precision` exists and is not equal to `asset_object.precision` and `current_supply` is not zero + 2. `new_precision` causes `max_supply` to be an invalid number + +# Risks + +It is believed that the addition of `disable_modify_max_supply` and `disable_issue` will add security for asset holders. + +The modification of the precision value carries no techincal risk, as asset creators will be unable to modify the precision once tokens have been issued. + +There is the risk to parties interested in acquiring the asset if the precision is changed after due diligence and before issuance. # Discussion From b136220713e58fa9df86d7887d96dfc40c50ee53 Mon Sep 17 00:00:00 2001 From: John Jones Date: Thu, 19 Sep 2019 12:38:40 -0500 Subject: [PATCH 07/11] Add new_precision to extension --- bsip-0048.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsip-0048.md b/bsip-0048.md index 5d5ef8f..6d77131 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -59,7 +59,7 @@ For `disable_issue`: To change the precision: -1. Add the `fc::optional new_precision` to the `asset_update_operation` struct. +1. Add the `fc::optional new_precision` to a new `asset_update_operation.extensions` struct. 2. Change the `asset_update_evaluator::do_evaluate` method to assert false if 1. `new_precision` exists and is not equal to `asset_object.precision` and `current_supply` is not zero 2. `new_precision` causes `max_supply` to be an invalid number From 2a821169c0ce9ab50748a21b4c868aa693c8d0eb Mon Sep 17 00:00:00 2001 From: John Jones Date: Fri, 27 Sep 2019 09:02:40 -0500 Subject: [PATCH 08/11] Clarifications and fixes --- bsip-0048.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index 6d77131..4de3ce0 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -22,9 +22,9 @@ And finally, the ability to change the precision of an asset will now be availab # Motivation -A flag to disable the modification of the maximum supply for issuer created asset will be implemented. This has benefits for both the participants and the asset creator. Asset holders are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. Asset creators are able to market the fact that the maximum supply is fixed. +A flag to disable the modification of the maximum supply for an asset will be implemented. This has benefits for both the participants and the asset creator. Asset holders are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. Asset creators are able to market the fact that the maximum supply is fixed. -A flag to disable issuing allows asset holders to be assured that the current supply will remain fixed, even if there are unissued tokens. +A flag to disable issuing allows asset holders to be assured that the current supply will not increase, even if there are unissued tokens. The ability to change the precision of a created asset adds flexibility in the asset creation process. @@ -55,7 +55,8 @@ For `disable_issue`: 2. Set the `disable_issue` flag to `false` for existing assets at hardfork time 3. Add a `can_issue()` to the `asset_object` 4. Change the `asset_update_evaluator::do_evaluate` method to assert false for the setting of the `disable_issue` flag to `false` if it is currently `true` -5. Change the `asset_issue_evaluator::do_evaluate` method to assert false if `can_modify_max_supply()` returns false +5. Change the `asset_issue_evaluator::do_evaluate` method to assert false if `can_issue()` returns false +6. Change the `call_order_update_evalutator::do_evaluate` method to assert false if `can_issue()` returns false To change the precision: @@ -68,8 +69,6 @@ To change the precision: It is believed that the addition of `disable_modify_max_supply` and `disable_issue` will add security for asset holders. -The modification of the precision value carries no techincal risk, as asset creators will be unable to modify the precision once tokens have been issued. - There is the risk to parties interested in acquiring the asset if the precision is changed after due diligence and before issuance. # Discussion From a6feb613eb7078654c27ea5cf4ea0e345e5bdba1 Mon Sep 17 00:00:00 2001 From: John Jones Date: Mon, 30 Sep 2019 07:05:20 -0500 Subject: [PATCH 09/11] Added paragraph about ICO use case --- bsip-0048.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsip-0048.md b/bsip-0048.md index 4de3ce0..0586092 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -24,6 +24,8 @@ And finally, the ability to change the precision of an asset will now be availab A flag to disable the modification of the maximum supply for an asset will be implemented. This has benefits for both the participants and the asset creator. Asset holders are assured the value of their assets (tokens) will not be diluted by issuers creating more tokens. Asset creators are able to market the fact that the maximum supply is fixed. +This can be very important in the case of Initial Coin Offerings (ICOs). Investors are assured by the network that their investment will not be diluted by new supply of that coin. + A flag to disable issuing allows asset holders to be assured that the current supply will not increase, even if there are unissued tokens. The ability to change the precision of a created asset adds flexibility in the asset creation process. From 0fdb3b051e9d3a6bb69679e58d844c90d9c40aaf Mon Sep 17 00:00:00 2001 From: John Jones Date: Thu, 3 Oct 2019 16:56:56 -0500 Subject: [PATCH 10/11] Clarify permissions and flags --- bsip-0048.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index 0586092..de049db 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -32,9 +32,9 @@ The ability to change the precision of a created asset adds flexibility in the a # Rational -The `disable_modify_max_supply` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`). Once the flag is set to `true`, it can only be set to `false` if `current_supply` is zero. +`disable_modify_max_supply` will be added to `asset_issuer_permissions`. The permission can be activated to forbid the modification of the `max_supply` (`asset_object.options`). The related flag can only be set to `false` if `current_supply` is zero. -The `disable_issue` is a newly created flag in the `asset_issuer_permissions`. The flag can be activated to forbid issuance of additional tokens. Once the flag is set to `true`, it can not be changed. +`disable_issue` will be added to `asset_issuer_permissions`. The permission can be activated to forbid issuance of additional tokens. Once the related flag is set to `true`, it can not be changed. Changing the precision of an asset should be easily accomplished with an `asset_update_operation`. This causes no harm while the asset is not issued. @@ -44,7 +44,7 @@ This BSIP comes with changes to the protocol, hence requires a propotocol upgrad For `disable_modify_max_supply`: -1. Add the `disable_modify_max_supply` flag to the issuer permissions +1. Add `disable_modify_max_supply` to the issuer permissions 2. Set `disable_modify_max_supply` to false for existing assets at hardfork time 3. Add a `can_modify_max_supply()` to the `asset_object` 4. Change the `asset_update_evaluator::do_evaluate` method to assert false for @@ -53,8 +53,8 @@ For `disable_modify_max_supply`: For `disable_issue`: -1. Add the `disable_issue` flag to the issuer permissions -2. Set the `disable_issue` flag to `false` for existing assets at hardfork time +1. Add `disable_issue` to the issuer permissions +2. Set `disable_issue` to `false` for existing assets at hardfork time 3. Add a `can_issue()` to the `asset_object` 4. Change the `asset_update_evaluator::do_evaluate` method to assert false for the setting of the `disable_issue` flag to `false` if it is currently `true` 5. Change the `asset_issue_evaluator::do_evaluate` method to assert false if `can_issue()` returns false From 858b7ee5dc39a6b2acdb6d0ccfd8c5fd6083a0d3 Mon Sep 17 00:00:00 2001 From: John Jones Date: Tue, 8 Oct 2019 06:24:30 -0500 Subject: [PATCH 11/11] Fix flags/permissions, positive logic --- bsip-0048.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bsip-0048.md b/bsip-0048.md index de049db..2e1eddd 100644 --- a/bsip-0048.md +++ b/bsip-0048.md @@ -32,9 +32,9 @@ The ability to change the precision of a created asset adds flexibility in the a # Rational -`disable_modify_max_supply` will be added to `asset_issuer_permissions`. The permission can be activated to forbid the modification of the `max_supply` (`asset_object.options`). The related flag can only be set to `false` if `current_supply` is zero. +`enable_modify_max_supply` will be added to `asset_issuer_permissions`. The permission can be activated to permit the modification of the `max_supply` (`asset_object.options`). -`disable_issue` will be added to `asset_issuer_permissions`. The permission can be activated to forbid issuance of additional tokens. Once the related flag is set to `true`, it can not be changed. +`enable_issue` will be added to `asset_issuer_permissions`. The permission can be set to `false` to permit the related flag to be set to `false`, which will not permit issuance of tokens. Once the flag is set to `false`, it can not be changed. Changing the precision of an asset should be easily accomplished with an `asset_update_operation`. This causes no harm while the asset is not issued. @@ -42,21 +42,21 @@ Changing the precision of an asset should be easily accomplished with an `asset_ This BSIP comes with changes to the protocol, hence requires a propotocol upgrade. However the changes to the code are minor. -For `disable_modify_max_supply`: +For `enable_modify_max_supply`: -1. Add `disable_modify_max_supply` to the issuer permissions -2. Set `disable_modify_max_supply` to false for existing assets at hardfork time +1. Add `enable_modify_max_supply` to the issuer permissions +2. Set `enable_modify_max_supply` to `true` for existing assets at hardfork time 3. Add a `can_modify_max_supply()` to the `asset_object` -4. Change the `asset_update_evaluator::do_evaluate` method to assert false for - 1. the setting of the `disable_modify_max_supply` flag to `false` if `current_supply` is not zero or - 2. the modification of the `max_supply` when the `disable_modify_max_supply` is `true` +4. Change the `asset_update_evaluator::do_evaluate` method to assert false when + 1. the setting of the `enable_modify_max_supply` flag to `true` if `current_supply` is not zero or + 2. the modification of the `max_supply` when the `enable_modify_max_supply` is `false` -For `disable_issue`: +For `enable_issue`: -1. Add `disable_issue` to the issuer permissions -2. Set `disable_issue` to `false` for existing assets at hardfork time +1. Add `enable_issue` to the issuer permissions +2. Set `enable_issue` to `true` for existing assets at hardfork time 3. Add a `can_issue()` to the `asset_object` -4. Change the `asset_update_evaluator::do_evaluate` method to assert false for the setting of the `disable_issue` flag to `false` if it is currently `true` +4. Change the `asset_update_evaluator::do_evaluate` method to assert false for the setting of the `enable_issue` flag to `true` if it is currently `false` 5. Change the `asset_issue_evaluator::do_evaluate` method to assert false if `can_issue()` returns false 6. Change the `call_order_update_evalutator::do_evaluate` method to assert false if `can_issue()` returns false @@ -69,13 +69,13 @@ To change the precision: # Risks -It is believed that the addition of `disable_modify_max_supply` and `disable_issue` will add security for asset holders. +It is believed that the addition of `enable_modify_max_supply` and `enable_issue` will add security for asset holders. There is the risk to parties interested in acquiring the asset if the precision is changed after due diligence and before issuance. # Discussion -Using `disable_` as names for boolean values is not advisable and can lead to confusion. However, these names were chosen for compatibility reasons. See the comments [of a similar situation here](https://github.com/bitshares/bitshares-core/pull/1375#pullrequestreview-164580457). +Using `disable_` as names for boolean values is not advisable and can lead to confusion. See the comments [of a similar situation here](https://github.com/bitshares/bitshares-core/pull/1375#pullrequestreview-164580457). Rather than continue the legacy behavior, this BSIP will take a different tack and use positive logic. While it may be confusing for a time, future permissions and flags will use positive logic, and previous negative logic permissions will be changed to use positive logic (not part of this BSIP). # Summary for Shareholders