public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: alicexbt <alicexbt@protonmail•com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists•linuxfoundation.org>
Subject: [bitcoin-dev] Use of OP_CTV in p2p exchanges that use 2of3 multisig
Date: Tue, 13 Dec 2022 22:12:13 +0000	[thread overview]
Message-ID: <zirM919DIUgsO6be08Jd-vxmhEHthIKV44O6V7FigBAjC-L2-j6JPadpexSoxoCL9TPnEoKTMSPMun2hZk36vqbQ7jzMb1JPABl_vUUi63s=@protonmail.com> (raw)

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.


                 reply	other threads:[~2022-12-13 22:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='zirM919DIUgsO6be08Jd-vxmhEHthIKV44O6V7FigBAjC-L2-j6JPadpexSoxoCL9TPnEoKTMSPMun2hZk36vqbQ7jzMb1JPABl_vUUi63s=@protonmail.com' \
    --to=alicexbt@protonmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox