[bisq-network/proposals] Fixed term BTC loans against BSQ collateral (#176)

Steven Barclay notifications at github.com
Tue Apr 21 04:21:21 UTC 2020


Thinking about this further, there is a serious issue that the initial loan/deposit tx would be malleable without using Segwit. So either Alice or Bob (or even a third party) could replace it with an equivalent one with a different ID, invalidating both the prepared repayment and confiscation transactions. Reading about all the various sources of malleability in non-Segwit transactions, I think it would be very difficult to prevent it without completing the upgrade of BitcoinJ to enable the publishing of Segwit transactions from within Bisq. All the loan tx inputs (but not the outputs) would need to have Segwit addresses to prevent malleability, I believe. Luckily, the _ANYONECANPAY_ and _SINGLE_ sighash types still work almost exactly the same way in Segwit scripts, according to BIP-0143, so the protocol should carry over unaltered. Also, I'm fairly sure Segwit BSQ transactions would validate fine in old Bisq clients.

One possible way to mitigate the issue without upgrading BitcoinJ would be to introduce an arbitrator key and make the BSQ collateral UXTO 2-out-of-3 instead of 2-out-of-2. Better I think would be to use a more complicated script which makes the UXTO spendable with either Alice+Bob's signature at any time or Alice/Bob + Arbitator's signature a day or two after the loan expires. That way if the protocol is followed correctly, the loan/deposit tx will have the correct output and the arbitrator will have no control over the funds (even in collusion with Alice or Bob). The abritrator's key would only be used (later) in the event that loan tx was replaced and confirmed with the wrong ID, preventing closure of the loan.

-- 
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/proposals/issues/176#issuecomment-616942709
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200420/9d04504d/attachment-0001.html>


More information about the bisq-github mailing list