<<  >> (p.5)
    Author Topic: Zerocoin: Anonymous Distributed E-Cash from Bitcoin  (Read 37889 times)
    Peter Todd
    Legendary
    *
    expert
    Offline Offline

    Activity: 1134
    Merit: 1210


    View Profile
    June 06, 2013, 03:12:41 PM
    Last edit: June 06, 2013, 03:25:56 PM by retep
     #81

    Here's a concrete example of how a more flexible Bitcoin scripting language would allow the creation of a system with properties between Zerocoin, and conventional chaum banking systems. Credit goes to Gregory Maxwell for the basic concept:

    First you deposit your funds with the chaum bank, and receive a chuam token back.

    The bank maintains a txout on the blockchain with funds >= all outstanding tokens, and with a scriptPubKey of the following form:

    Code:
    if scriptSig contains proof of a valid token
       and spending transaction contains a txout with the same restrictions:
            return True

    Now I can provide proof to the blockchain itself that I am entitled to receive the value of my token back, and I can do so without the co-operation of the bank.

    Totally off-chain transactions, IE chaum-for-chaum exchanges, can be handled as well by having the bank include all outstanding tokens in a merkle tree, and signing the tip of that tree along with an ever increasing serial number:

    Code:
    if signature of the tip of the tree is valid:
        let n = serial number in the signature
        let m = existing serial number
        if n > m
           and spending transaction contains a txout with similar conditions, but n as the serial number:
               return True
    else if block height > y:
        if spending transaction contains the redemption code (first example):
            return True

    Now I can "spend" the txout with ever increasing serial numbers. This allows multiple different users, each of whom may have a different idea of what the outstanding token set is, to converge to the last valid set of tokens. If they do so randomly that will happen in about log2(n) steps.

    After the timeout the txout goes into the state of allowing people to get their funds back, and again, without the co-operation of the service any token can be turned back into Bitcoins. Of course, some of the tokens may be of too small a value to economically redeem, but in that case we're just back to the "pure-punishment" case.

    I'm leaving out a lot of details of course, but in general what's nice is we get the anonymity of Zerocoin and off-chain microtransactions in one system. The trust in the central bank maintaining the ledgers is fairly minimal, and there can be as many of these banks as you want. The system can easily scale to extremely large transaction volumes without a corresponding increase of the blocksize. There may also be some clever way to remove the requirement for the bank and maintain the ledger via an alt-coin consensus system.

    We could implement this with a soft-fork to Bitcoin that extends the scripting language with new opcodes and merklized abstract syntax tree support. My very rough guess is that it's a year long project to get the new scripting code written and tested, and maybe another year to deploy on mainnet.

Page 4
Viewing Page: 5