[bisq-network/bisq] reduce BSQ fee estimation constant for segwit (#5450)

jmacxx notifications at github.com
Thu Apr 29 22:06:27 CEST 2021


Fee estimation for Maker/Taker tx is done using the BTC wallet.  If BSQ is being burnt, a constant is added to represent the size of adding a BSQ input (2 inputs, 3 outputs tx).

- For legacy BSQ this was 150 vBytes which would result typically in a 325 vByte tx.
- For segwit BSQ we can reduce the constant to 65 which will result typically in a 240 vByte tx.

The number 65 was calculated by figuring the vsize of an offer tx both pre and post Segwit BSQ wallet functionality.
It was verified by checking the estimated vsize and the resultant transaction's vsize after applying the code change.

One caveat with this solution is that Make/Take offer using legacy BSQ UTXO will be estimated 25% low because the fee estimation code is not aware of BSQ wallet details.

I leave it up to the maintainers whether they think this approach is acceptable or not.
If it is too risky, perhaps scaling-in the reduction could be a compromise?  (Possibly based on the block height)
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5450

-- Commit Summary --

  * reduce BSQ fee estimation constant for segwit

-- File Changes --

    M core/src/main/java/bisq/core/btc/TxFeeEstimationService.java (2)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5450.patch
https://github.com/bisq-network/bisq/pull/5450.diff

-- 
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/pull/5450
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210429/eb9869da/attachment.htm>


More information about the bisq-github mailing list