public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: ZmnSCPxj <ZmnSCPxj@protonmail•com>
To: Thomas Hartman <thomashartman1@gmail•com>
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] reviving op_difficulty
Date: Mon, 17 Aug 2020 23:14:00 +0000	[thread overview]
Message-ID: <bc0SG26C9FUzZO4l9cGDtbBGb0lrhsxrcvDoJXpJGUbyKEUq3eE3vLwTu_WufWOsN6DK3lPcKttNdEa9h7_tqixk12sBVErMi0YYF_HNBGo=@protonmail.com> (raw)
In-Reply-To: <C7C0864D-5635-43B8-88B6-E53A14C3066C@gmail.com>

Good morning Thomas,

> Tier, AJ, ZmnSCPxj, thanks! 
>
> > On Aug 17, 2020, at 1:04 AM, ZmnSCPxj via bitcoin-dev <bitcoin-dev@lists•linuxfoundation.org> wrote:
> >
> > Taproot MAST to the rescue.
>
> OK. So, using the tick scheme described by Tier a difficulty futures instrument is possible with current script + op_diff; and with taproot + op_diff (ZmnSCPxj) it may even be economical. (I will set aside covenants for now.)
>
> To do it all on-chain, we need a mechanism for selling such an instrument in a trustless way.
>
> That is to say (using ZmnSCPxj's construction), we have now a future where Bob pays Alice a pico-difficulty at next adjustment. 
>
> But how does Alice pay Bob his 17.4 sat?
>
> I am trying to figure out a way to do this naively using the base layer. (I really want this with lightning, and eventually hft, but first things first.)
>
> My thinking so far is, Alice and Bob collaborate to create partial versions of
>
> ** the difficulty future funded by Bob, spendable by Alice in 1000 blocks
> ** and a 17.4 sat payment from Alice to Bob, spendable by Bob immediately
>
> When Bob completes and broadcasts the payment from Alice, it should enable Alice to complete and broadcast the difficulty future funded by Bob. 
>
> I am thinking a hash lock on the payment, with a preimage secret generated by Bob, could be used to accomplish this. When Bob unlocks and broadcasts the payment, this reveals the preimage, and with the preimage Alice can unlock and broadcast the difficulty future funded by Bob. 
>
> Am I correct in thinking something like this could work?

Bitcoin transactions on the blockchain layer are atomic, so it would be far simpler to make the purchase output and the options output in the same transaction, in a sort of PayJoin-like cooperatively-signed transaction.

That said, the construction you are imagining is indeed going to work.
The only requirement is that the hash-branch needs two signatures in order to ensure that it pays out to a transaction with a very specific contract.
Xref.  how Lightning *really* creates its HTLCs.

Regards,
ZmnSCPxj



  reply	other threads:[~2020-08-17 23:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 15:41 Thomas Hartman
2020-08-16 18:59 ` Tier Nolan
2020-08-17  5:04   ` ZmnSCPxj
2020-08-17 19:48     ` Thomas Hartman
2020-08-17 23:14       ` ZmnSCPxj [this message]
2020-09-01 20:07         ` Thomas Hartman
2020-09-02 14:40           ` Thomas Hartman
2020-08-17 21:55     ` Tier Nolan
2020-08-19 21:15   ` Thomas Hartman
2020-08-19 23:32     ` Thomas Hartman
2020-08-16 22:29 ` Anthony Towns
2020-08-22 16:46 ` David A. Harding
2020-09-02 18:27   ` Jeremy

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='bc0SG26C9FUzZO4l9cGDtbBGb0lrhsxrcvDoJXpJGUbyKEUq3eE3vLwTu_WufWOsN6DK3lPcKttNdEa9h7_tqixk12sBVErMi0YYF_HNBGo=@protonmail.com' \
    --to=zmnscpxj@protonmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=thomashartman1@gmail$(echo .)com \
    /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