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

BSQ balance after swap doesn't reconcile properly #6355

Closed
pmartincalvo opened this issue Sep 10, 2022 · 5 comments
Closed

BSQ balance after swap doesn't reconcile properly #6355

pmartincalvo opened this issue Sep 10, 2022 · 5 comments

Comments

@pmartincalvo
Copy link

pmartincalvo commented Sep 10, 2022

Description

After executing a BSQ Swap (I buy BSQ, sell BTC) on a daemon with a clean transaction history, the BSQ balance doesn't add up to the purchased BSQ.

Version

1.9.4 daemon + cli

Steps to reproduce


Note

bisq_cli is an alias for java -jar cli.jar --password=mypassword.


I checked available offers with bisq_cli getoffers --direction=BUY --currency-code=BSQ. I decided to pick the following one:

Buy/Sell            Price in BTC for 1 BSQ           BTC(min - max)    BSQ(min - max)  Payment Method  Creation Date (UTC)   ID
Sell BSQ (Buy BTC)              0.00004680               0.00060000             12.82  BSQ Swap        2022-07-20T20:49:31Z  PJNjEX-0461e540-c6ed-49f7-b1f7-8584f8aefb69-192  

Took it successfully. I'm paying the trade fee with BTC since I have no BSQ:

bisq_cli takeoffer --offer-id=PJNjEX-0461e540-c6ed-49f7-b1f7-8584f8aefb69-192 --fee-currency=BTC

trade PJNjEX-0461e540-c6ed-49f7-b1f7-8584f8aefb69-192 successfully taken

After the trade is finished, I go and check my BSQ balance

bisq_cli getbalance --currency-code=bsq

Available Confirmed Balance  Unverified Balance  Unconfirmed Change Balance  Locked For Voting Balance  Lockup Bonds Balance  Unlocking Bonds Balance
                      12.74                0.00                        0.00                       0.00                  0.00                     0.00

And here is the surprise. If I took a trade to buy 12.82, why do I only have 12.74?

Note that this is the only trade this wallet has executed.

Expected behaviour

Obtaining 12.82 BSQ after the trade.

Actual behaviour

Obtaining 12.74 BSQ after the trade.

Screenshots

NA

Device or machine

Debian 11 on a VPS.

Additional info

NA

@ghost
Copy link

ghost commented Sep 10, 2022

Trading fees are paid from the BSQ purchase.
Current taker fees are 126.02 BSQ per BTC traded.
0.0006 * 126.02 = 0.08 BSQ

In the GUI the fee is shown before committing to the trade.

@pmartincalvo
Copy link
Author

Thanks for your comment. I still don't fully understand how this works:

  • I had 0 BSQ when I took the offer. Who can the trading fee of a BSQ swap be paid with BSQ that is still not in my possession?
  • I specified --fee-currency=BTC in the takeoffer method. Isn't this supposed to specify that I want to pay the trading fee with BTC?

ghubstan added a commit to ghubstan/bisq that referenced this issue Sep 11, 2022
API clients looking at their BSQ swap trades -- BSQ buyers
specifically -- were seeing a 0.00 BSQ trade fee, due to an
incorrect assumption BSQ sellers paid the entire BSQ trade
fee for both sides.  BSQ Swap execution via API has been
working just like the GUI (same code-base), but the reported
trade fee for the BSQ buy side was wrong.
This change shows the correct BSQ trade fee.

Partially addresses issue bisq-network#6355
@ghubstan
Copy link
Contributor

What @jmacxx said is right. Your BSQ balance is correct. 0.08 BSQ was deducted from your BSQ payout for the trade fee.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions
Copy link

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
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

2 participants