public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Matthew Roberts <matthew@roberts.pm>
To: Tier Nolan <tier.nolan@gmail.com>,
	 Bitcoin Protocol Discussion
	<bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] BIP clearing house addresses
Date: Thu, 4 Aug 2016 12:07:06 +1000	[thread overview]
Message-ID: <CAAEDBiF=xzOodTZ++WrRhESFqyvE+p0hVCx657WgocRtY5yG3g@mail.gmail.com> (raw)
In-Reply-To: <CAE-z3OU+9hB7xFqYsn1-enuonxHB8E415P_Mf3b93p9MpYugjQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]

This would honestly work. It forces the attacker to go through with the
clearing phase which simultaneously makes it possible to "cancel" the TX
through another logic branch before the timeout occurs. I'd say that would
meet the needs of a clearing mechanism / fraud prevention system for an
exchange perfectly while requiring minimal changes to the software.

Very, very smart idea. A++, would read again.

On Thu, Aug 4, 2016 at 9:55 AM, Tier Nolan via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> On Wed, Aug 3, 2016 at 7:16 PM, Matthew Roberts via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
>
>> The reason why I bring this up is existing OP codes and TX types don't
>> seem suitable for a secure clearing mechanism;
>>
>
> I think reversing transactions is not likely to be acceptable.  You could
> add an opcode that requires that an output be set to something.
>
> [target script] SPENDTO
>
> This would require that [target script] is the script for the
> corresponding output.  This is a purely local check.
>
> For example, if SPENDTO executes as part of the script for input 3, then
> it checks that output 3 uses the given script as its scriptPubKey.  The
> value of input 3 and output 3 would have to be the same too.
>
> This allows check sequence verify to be used to lock the spending script
> for a while.  This doesn't allow reversal, but would give a 24 hour window
> where the spenders can reverse the transaction.
>
> [IF <1 day> CSV DROP <live public key> CHECKSIG ELSE <offline protected
> key> CHECKSIG] SPENDTO <live public key2> CHECKSIG
>
> Someone with the live public key can create a transaction that spends the
> funds to the script in the square brackets.
>
> Once that transaction hits the blockchain, then someone with the <offline
> protected key> has 24 hours to spend the output before the person with the
> live keys can send the funds onward.
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>

[-- Attachment #2: Type: text/html, Size: 3120 bytes --]

  reply	other threads:[~2016-08-04  2:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 18:16 [bitcoin-dev] BIP clearing house addresses Matthew Roberts
2016-08-03 21:13 ` Troy Benjegerdes
2016-08-03 23:55 ` Tier Nolan
2016-08-04  2:07   ` Matthew Roberts [this message]
2016-08-04  3:27 ` Luke Dashjr
2016-08-04  3:49   ` Andrew Johnson
2016-08-04  4:53     ` Matthew Roberts
2016-08-04 12:43       ` Erik Aronesty
2016-08-06 10:39 ` s7r
2016-08-06 11:13   ` Tier Nolan
2016-08-07  5:35     ` Matthew Roberts
2016-08-07 22:59       ` Erik Aronesty
2016-08-08  0:48         ` Matthew Roberts
2016-08-08  9:56           ` Tier Nolan
2016-08-08 10:09           ` Erik Aronesty
2016-08-08 11:01             ` Tier Nolan

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='CAAEDBiF=xzOodTZ++WrRhESFqyvE+p0hVCx657WgocRtY5yG3g@mail.gmail.com' \
    --to=matthew@roberts.pm \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=tier.nolan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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