bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 648 forks source link

Borrowing MPAs ignores max_supply setting #1465

Closed pmconrad closed 5 years ago

pmconrad commented 5 years ago

Bug Description call_order_update_evaluator contains no check that an update won't increase the smartcoin's supply beyond the configured max_supply

Impacts Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

Steps To Reproduce

  1. Create a bitAsset with limited supply
  2. Publish feed price
  3. Use call_order_update to borrow more than max_supply

Expected Behavior The call_order_update should fail.

CORE TEAM TASK LIST

pmconrad commented 5 years ago

It may be debatable if this is actually a bug or meant as a feature. IMO it is a bug. If it is a feature, supply must at least be limited to GRAPHENE_MAX_SHARE_SUPPLY.

cogutvalera commented 5 years ago

IMHO it's a bug and users must be restricted to borrow more than max_supply (thus current_supply must be always less or equal to max_supply) as was adjusted per concrete asset, at the same time while creating new asset users cannot create max_supply more than GRAPHENE_MAX_SHARE_SUPPLY.

jmjatlanta commented 5 years ago

Fixed by #1498