bitcoin-dev

Smart Contracts Unchained

Smart Contracts Unchained

Original Postby ZmnSCPxj

Posted on: April 4, 2019 07:07 UTC

A group of participants playing poker may face a situation where one participant loses all their funds and decides to present the escrow with an old contract state and a signed message following the contract rules without using a consensus mechanism like blockchain.

However, various channel mechanisms such as Poon-Dryja, Decker-Wattenhofer, and Decker-Russell-Osuntokun can invalidate or replace old states without necessarily requiring a blockchain to keep track of all the states. If the smart contract platform supports a covenant system, it is possible to require that the fund goes to a specific address template in the transaction that spends it, which can then be used to enforce creating an offchain sequence of transactions. The final transaction in this sequence completes the sequence and pays out according to the rules of poker. The smart contract platform signs blindly without caring whether the signature went on-chain or not, making it possible for the winner(s) to publish the sequence of transactions T1...Tn or present it to all participants. Additionally, part of the money allocated to fees for all the transactions T1...Tn can be given back in exchange for a single transaction that shortcuts all of that and spends to however Tn splits out. The Decker-Russell-Osuntokun mechanism uses a similar sequence of update transactions and optimizes the final transaction Tn to spend any transaction Ti where i < n.