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

Stealth confidential wallet "transfer_from_blind" adds fee twice... #547

Closed
jcalfee opened this issue Feb 1, 2016 · 2 comments
Closed
Assignees
Milestone

Comments

@jcalfee
Copy link

jcalfee commented Feb 1, 2016

The fee code surrounding wallet_api::blind_transfer_help (calls to and internally) is confusing. I believe in one case the user pays double fees.

double fee case

wallet_api::transfer_from_blind adds the fee to the amount

auto blind_in = asset_obj->amount_to_string( from_blind.fee + amount )

and passes this to wallet_api::blind_transfer_help where later the change amount is found by getting the fee subtracted out twice (so they appear to be paying a double-fee). The first is the "amount" that contains the fee and the second is the fee itself:

auto change = total_amount - amount - blind_tr.fee

Note, there is another call to blind_transfer_help which is not subtracting fees first.

Related #452

@theoreticalbts theoreticalbts added this to the next2 milestone Feb 1, 2016
@bytemaster
Copy link
Contributor

James was going to produce a pull request with the suggested fix.

@theoreticalbts theoreticalbts assigned jcalfee and unassigned bytemaster Feb 16, 2016
@jcalfee
Copy link
Author

jcalfee commented Feb 16, 2016

Not an issue..

@jcalfee jcalfee closed this as completed Feb 16, 2016
pmconrad pushed a commit to pmconrad/graphene that referenced this issue Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants