>> (p.1)
    Author Topic: Trust-free crypto-currency exchange with time-conditional scripts  (Read 5590 times)
    hashcoin (OP)
    Full Member
    ***
    Offline Offline

    Activity: 372
    Merit: 114


    View Profile
    June 25, 2011, 10:35:03 PM
    Last edit: June 30, 2011, 02:58:52 AM by hashcoin
     #1


    edit note, this stuff can be done without time-conditional scripts using nlocktime as explained in later posts.  still leaving this post so you can see protocol for untrusted exchange
    Basically add an "if time < DEADLINE X else Y" condition to the transaction script format.  With this it will be possible to do untrusted transactions between other crypto-currenies as follows:

    A and B want to trade bitcoin for blahcoin.

    A and B pick keys, send them to each other, and also pick secrets secretA, secretB.   They send each other hashA = hash(secretA), hashB = hash(secretB)

    A writes the following TX:

    If time < DEADLINE1, spendable by providing:
       string sa s.t. hash(sa) = hashA
       string sb s.t. hash(sb) = hashB
       signature from pubkeyB

    else:
       signature from pubkeyA

    B writes the same TX to the blockchain for the other thing, with a deadline a few blocks later (so A has more time to spend it).

    Now A tells B his secretA.  B can now be nice and tell A his secretB or be a dick and keep secretB to himself.  Infact, let's just say standard protocol is for B to keep secretB to himself.  The point is, B must reveal secretB to spend the coin, thus revealing it to A and letting him spend the other coin.

    Once we get this, I can design all sorts of other untrusted trade schemes, but they all need a time condition.  (Unless I'm missing a way to do it now.. if you're smarter than me and see how to do it please let me know!)

Page 1
Viewing Page: 1