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

Asset creation fee issue #433

Closed
abitmore opened this issue Oct 19, 2017 · 4 comments
Closed

Asset creation fee issue #433

abitmore opened this issue Oct 19, 2017 · 4 comments
Assignees

Comments

@abitmore
Copy link
Member

When creating an asset, if the fee is not paid in the CORE asset but in another asset, an amount of extra CORE asset will be created from nowhere unexpectedly.

The workflow is prepare_fee -> do_evaluate -> convert_fee -> pay_fee -> do_apply.

  • prepare_fee is in evaluator.cpp, core_fee_paid got initialized normally:
         core_fee_paid = fee_from_pool.amount;
   core_fee_paid -= core_fee_paid.value/2;
  • convert_fee is in evaluator.cpp, the halved core_fee_paid is deducted from the fee paying asset's fee pool (this is incorrect, instead, we should deduct full amount from the fee pool):
               d.fee_pool -= core_fee_paid;
  • pay_fee is in evaluator.cpp, the halved core_fee_paid is sent to referral program:
            s.pay_fee( core_fee_paid, d.get_global_properties().parameters.cashback_vesting_threshold );
  • do_appy is in asset_evaluator.cpp, the halved core_fee_paid got added to the new asset's fee pool**:
         a.fee_pool = core_fee_paid; //op.calculate_fee(db().current_fee_schedule()).value / 2;

A soft fork is proposed to prevent this issue from being exploited: #432.

@btsfav
Copy link

btsfav commented Oct 19, 2017

Is there an ETA? crypto-bridge is already complaining, since they rely on creating assets

@CryptoBridge
Copy link

Yes, an ETA would be good. This is already damaging to us as we have clients already asking us what's up and why their coins can't be added to the exchange. Thanks.

abitmore added a commit that referenced this issue Oct 19, 2017
Resolved conflicts:
	libraries/chain/asset_evaluator.cpp
@abitmore
Copy link
Member Author

@btsfav @CryptoBridge when majority of witnesses has applied the soft fork, the committee can reduce the fee. Hopefully will be done in 24 hours.

@abitmore
Copy link
Member Author

abitmore commented Nov 1, 2017

Should be fixed in release 2.0.171025. Closing.

@abitmore abitmore closed this as completed Nov 1, 2017
pmconrad added a commit that referenced this issue Jan 14, 2018
This reverts commit 41b2f31 (except the test case).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants