Subject: [bitcoin-dev] Use of OP_CTV in p2p exchanges that use 2of3 multisig

From: alicexbt <[email-masked]>
Date: Tue, 13 Dec 2022 22:12:13 +0000

Hi Bitcoin Developers,

Problem: In p2p exchanges that use 2of3 multisig (example: hodlhodl[0]), there is a possibility of buyer and seller settling the trade without involving exchange. Lets consider Alice (buyer), Bob (seller) and Carol (exchange). Once bitcoin is locked in multisig, Alice and Bob could create and sign a transaction which does not include trading fees output that goes to exchange.

Solution: I was wondering if OP_CTV fixes this because we could use a template that specifies the release transaction must have two outputs: one output that sends small amount to the exchange for fees, and another output that sends bitcoin to the buyer.

I am not good at writing bitcoin script with opcodes so did not test this however I wanted to confirm with others if this makes sense and can there be other advantages of using OP_CTV for a p2p exchange.

If this setup is considered a vault maybe [simple vault[1] which uses 2of2 multisig can be modified for proof of concept or a [normal poc][2] if there are RPC commands available to test OP_CTV in bitcoin-inquistion.

[0]: https://gitlab.com/hodlhodl-public/public_docs/blob/master/multisig_spec.md
[1]: https://github.com/jamesob/simple-ctv-vault
[2]: https://github.com/1440000bytes/p2p

/dev/fd0

Sent with Proton Mail secure email.