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

Mining fees are incorrectly included in collaborative sweep transactions #728

Open
AchimDN opened this issue Mar 15, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@AchimDN
Copy link

AchimDN commented Mar 15, 2024

When sending a collaborative sweep transaction it is possible to specify the mining fee as an absolute value in sats/vByte.
For example when selecting 12 sats/vByte in the send input screen it is expected that Jam uses this input and the same value (+/- the fee randomization) can be found in the final transaction.

However, this is not the case and the malfunction has been observed several times and is therefore proven.
It happened again even after reboot of my node.

In the case of the sweep TX shown below, the mining fee was set to 12 sats/vByte. Fee randomisation was set to 10% which resulted in an absolute mining fee range of 12-13.2 sats/vByte. This number was also shown in the payment confirmation.

Bildschirmfoto 2024-03-15 um 13 08 08

The final transaction however was sent to mempool with 19.5 sats/vByte.

Bildschirmfoto 2024-03-15 um 13 14 40
  • Version: v0.2.0
  • Platform: Umbrel 0.5.4
  • Browser: Safari 17.4
@AchimDN AchimDN added the bug Something isn't working label Mar 15, 2024
@AchimDN AchimDN changed the title Mining fees are incorrectly included in the transaction Mining fees are incorrectly included in collaborative transactions Mar 15, 2024
@AchimDN
Copy link
Author

AchimDN commented Mar 15, 2024

It seems that the malfunction only applies to collaborative transactions.
In my test with a "standard" TX, the fee was correctly set within the selected randomization range.

Bildschirmfoto 2024-03-15 um 13 51 26 Bildschirmfoto 2024-03-15 um 13 54 40

@AchimDN AchimDN changed the title Mining fees are incorrectly included in collaborative transactions Mining fees are incorrectly included in collaborative sweep transactions Mar 15, 2024
@theborakompanioni
Copy link
Collaborator

Hey Achim, thanks for the report!
That is indeed a problem that should be indicated in the UI. This is an issue with sweep transactions, as there is no chance output and the fee must be estimated based on the transaction size, which is not known beforehand. Your fee settings value is still the target fee, but it can evidently be far off.
@editwentyone - any idea how this can be displayed to the user?

@AchimDN
Copy link
Author

AchimDN commented Mar 16, 2024

Hi TBK,
in the meantime I have learned why mining fee must be estimated and can vary in the sweep collaborative transactions.
https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/784#issuecomment-761057922

Showing a note on the send input screen or the payment confirmation dialogue when the sweep toggle is activated would make the user aware that he cannot expect the exact miner fee value. Good approach. At least this would not raise concerns about a bug.

Thank you!
Achim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants