<p>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).</p>
<ul>
<li>For legacy BSQ this was 150 vBytes which would result typically in a 325 vByte tx.</li>
<li>For segwit BSQ we can reduce the constant to 65 which will result typically in a 240 vByte tx.</li>
</ul>
<p>The number 65 was calculated by figuring the vsize of an offer tx both pre and post Segwit BSQ wallet functionality.<br>
It was verified by checking the estimated vsize and the resultant transaction's vsize after applying the code change.</p>
<p>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.</p>
<p>I leave it up to the maintainers whether they think this approach is acceptable or not.<br>
If it is too risky, perhaps scaling-in the reduction could be a compromise?  (Possibly based on the block height)</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/5450'>https://github.com/bisq-network/bisq/pull/5450</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>reduce BSQ fee estimation constant for segwit</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5450/files#diff-9070a38d8e2357c5ea9b08422de7e7609d68b9d40ade97e96013e3d359afad07">core/src/main/java/bisq/core/btc/TxFeeEstimationService.java</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/5450.patch'>https://github.com/bisq-network/bisq/pull/5450.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/5450.diff'>https://github.com/bisq-network/bisq/pull/5450.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5450">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXDRFNSQOOHJYP6ZDDTLG34HANCNFSM432TQ2TA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNX6EKIKM2VPCT5V233TLG34HA5CNFSM432TQ2TKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4M7RLIVA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5450",
"url": "https://github.com/bisq-network/bisq/pull/5450",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>