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

Borrowing MPAs ignores max_supply setting #1465

Closed
pmconrad opened this issue Dec 9, 2018 · 3 comments

Comments

@pmconrad
Copy link
Contributor

commented Dec 9, 2018

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.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

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

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@pmconrad

This comment has been minimized.

Copy link
Contributor Author

commented Dec 9, 2018

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

This comment has been minimized.

Copy link
Member

commented Dec 9, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Jan 31, 2019

Fixed by #1498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.