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

BSIP 48 Add flag to prevent asset's max supply from being changed #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions bsip-0048.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
BSIP: <BSIP number>
Title: Add flag to prevent asset's max supply from being changed
Authors: Fabian Schuh <https://github.com/xeroc>
Dmitrij Vinokour <https://github.com/Dimfred>
Status: Draft
Type: Protocol
Created: 2018-10-14
Discussion: <url>
Worker: <Id of worker proposal> (optional)

# 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 participators ico to the risk,
of loosing value of their bought 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.

# Rational

The `disable_modify_max_supply` is a new created flag in the `asset_issuer_permissions`.
The flag can be activated to forbid the modification of the `max_supply` (`asset_object.options`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the flag is easier to understand if it is called allow_modify_max_supply, i. e. the meaning is inverted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion in bitshares/bitshares-core#1375 (review) suggests the opposite.

Once the flag is activated, it can't be deactivated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it can't be deactivated, why not set it as an issuer_permission?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: permissions can be modified when current_supply = 0. Makes sense also in this case IMO.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmconrad Indeed, I will add that behaviour.


# Specifications

This BSIP comes with a change to the protocol, which 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about existing assets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I would recommend the permission is enabled, as is the flag.
That way, behavior isn't changed.
The feature is supposed to be opt-out afterall.

What needs to be done to ensure that for existing assets?


# Summary for Shareholders

This BSIP proposes a way to improve the user security in the context of issuer created
assets.

# Copyright

This document is placed in the public domain.
You are viewing a condensed version of this merge commit. You can view the full changes here.