joinmarket-webui/jam

Mining fees are incorrectly included in collaborative sweep transactions

Opened this issue · 3 comments

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

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

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?

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