[bisq-network/bisq] SegWit withdrawals are overpaying fees (#4661)

Chris Beams notifications at github.com
Fri Oct 16 19:01:34 UTC 2020


I just did two transfers within my v1.4.0 (pre-release) Bisq wallet to test out SegWit transaction fee savings.

The first transfer was from a P2PKH address to a Bech32 address. I set my withdrawal transaction fee to the minimum value of 2 sat/byte. The result was a 188 byte / 188 vbyte transaction that paid 384 sats in fees, for an effective fee rate of 2 sat/vbyte (384 sats / 188 vbytes = 2.04 sat/vbyte):

<img width="695" alt="image" src="https://user-images.githubusercontent.com/301810/96296835-3757ca00-0ff0-11eb-9b3f-9b1ea0557fee.png">

All of this was as expected, given that the transaction was a "hybrid" P2PKH-to-Bech32 and not a "pure" SegWit transaction.

The second transfer was from the receiving Bech32 address of the first transaction to a newly generated Bech32 address, so I expected to get the fee reduction benefits of a pure SegWit transaction. The withdrawal transaction fee remained at 2 sat/byte. The result was a 188 byte / 110 vbyte transaction that still paid 390 sats in fees, for an effective fee rate of 2.0 sat/byte but 3.6 sat/vbyte, ending up in the same cost as the first transaction with no actual fee savings:

<img width="698" alt="image" src="https://user-images.githubusercontent.com/301810/96297450-28bde280-0ff1-11eb-8621-153f8e9c2e0f.png">

It appears that Bisq is calculating mining fees to be paid based on size in bytes (as it always has) and has not been updated to calculate mining fees based on vbytes when appropriate, i.e. when dealing with an actual Bech32-to-Bech32 SegWit transaction like the second one above.

Expected behavior is that I should have paid ~376 sats for the first transaction (188 vbytes * 2 sat/vbyte), and that I should have paid ~220 sats for the second transaction (110 vbytes * sat/vbyte) for a ~42% savings.

Actual behavior is that I paid the same ~380 sats for both transactions, realizing no actual savings.

Transaction IDs for the two transactions above are available on request. Ping me in Keybase if you need them.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/4661
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201016/08412162/attachment-0001.html>


More information about the bisq-github mailing list