<p></p>
<p><b>@sqrrm</b> requested changes on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4094#discussion_r400078977">core/src/main/java/bisq/core/btc/wallet/TradeWalletService.java</a>:</p>
<pre style='color:#555'>> @@ -257,6 +260,7 @@ public Transaction completeBsqTradingFeeTx(Transaction preparedBsqTx,
         checkNotNull(wallet, "Wallet must not be null");
         wallet.completeTx(sendRequest);
         Transaction resultTx = sendRequest.tx;
+        removeDust(resultTx);
</pre>
<p>I think this will cause BSQ change that lower than dust to be used as extra fee. That could be a non trivial amount (5.46 BSQ > USD3). While that's not a huge amount it's still too big to be an acceptable loss for users. If BSQ prices rise it will become even less so.</p>
<p>I think we'll have to fail transactions that try to pay the fee using BSQ if the change is less than dust. Best would be to show something at the time the fee is selected that it's likely to result in a dust change output and thus not be possible to continue. I think that should be doable, the fees are known at the time of setting up the trade so we can calculate the BSQ dust. One thing we need to do is make sure that if there is enough BSQ but split over 2 or more outputs, it's aggregated to avoid dust outputs. Example, counting satoshis:</p>
<p>Fee: 1000<br>
BSQ wallet outputs:</p>
<ol>
<li>1200</li>
<li>900</li>
</ol>
<p>I think the tx might be constructed using only outputs 1. leaving a change output of 200, but it would be possible to construct the tx to take both 1. and 2. to pay the 1000 in fee and get the change 1100.</p>

<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/4094#pullrequestreview-383714027">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXSLJRXDVWPTQKJIHLRKBWPRANCNFSM4LS2HZMQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVVYJTEFQFWTJUWG3LRKBWPRA5CNFSM4LS2HZM2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOC3PQF2Y.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/4094#pullrequestreview-383714027",
"url": "https://github.com/bisq-network/bisq/pull/4094#pullrequestreview-383714027",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>