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

Incorrect wallet balance after compensation request issuance? #2623

Closed
devinbileck opened this issue Apr 3, 2019 · 3 comments
Closed

Incorrect wallet balance after compensation request issuance? #2623

devinbileck opened this issue Apr 3, 2019 · 3 comments

Comments

@devinbileck
Copy link
Member

Here's a brain teaser that I am struggling to explain at the moment. I need to review it tomorrow with a fresh mind, but creating an issue so as not to lose track of it (and maybe get another mind to review it).

I was testing a scenario where I had submitted a compensation request for 100 BSQ and had just enough BSQ to cover the fees, but not enough to vote (where I found #2622).

Here is the sequence of events (starting from a balance of 0 BSQ):

  • Receive 10 BSQ
  • Submit compensation request for 100 BSQ, minus 2 BSQ for fee
    [balance of 8 BSQ]
  • Send remaining 8 BSQ
    [balance of 0 BSQ]
  • Compensation request approved, BSQ issued
    [at this point I would expect to have a balance of 98 BSQ, but the wallet balance indicates 100]

Adding up the amounts shown below (10+98-8) gives us 100. But calculating it based on the sequence of events (10-2-8+98), gives us 98.

image

@sqrrm
Copy link
Member

sqrrm commented Apr 3, 2019

When making the compensation request you burn 2 BSQ as fee and issue 100 BSQ. I think the transaction list aggregates that to 98 BSQ. The sum makes sense, you have 10, burn 2, send 8 elsewhere, issue 100, ie 10 - 2 - 8 + 100 = 100.

@ManfredKarrer
Copy link
Contributor

Yes agree to @sqrrm. Seems all correct to me.
BSQ added: 10 + 100 = 110
BSQ removed: 2 + 8 = 10
Sum: 100

@devinbileck
Copy link
Member Author

Ah, that makes sense. Thanks!

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