Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: cunicula on October 31, 2012, 01:34:58 PM



Title: Options in the Blockchain
Post by: cunicula on October 31, 2012, 01:34:58 PM
[this is a repeat from another thread. I thought it deserved more attention]

This is a scheme to offer options in the blockchain. It supposes that third party USD dollar-denominated debt is available in the form of colored coins. Say MtGox colored usd.

It involves an option seller (A), and option buyer (B), and a third party broker [the broker can be an automated program, "oracle"]. The option seller and buyer do not need to trust each other at all. A Zero-trust broker can be accomodated as well, but this requires repeated txns which will cost more in terms of txn fees.

Here is how it works:

0) A and B announce agreement to do steps (1)-(4) to broker. A and B send valuable deposits and a nominal fee to broker.

1) A and B create 2 of 2 multisig address using one of A's addresses and one of B's addresses. Call the multisig address C. They tell broker about this address.

2) A signs 2 of 2 atomic txn moving 10 USDcoin from A->C and 0.1 BTC from B->A. A sends info to broker. Otherwise, broker confiscates A's deposit and returns deposit to B.

Note: 0.1 BTC is the price of the option. Option buyer will be entitled to purchase 10 USDcoin for 1 BTC until option contract ends at block t.

3) B signs 2 of 2 atomic txn moving 10 USDcoin from A->C and 0.1 BTC from B->A. B sends info to borker. Otherwise, broker confiscates B's deposit and returns deposit to A. Txn is broadcast and goes into block.

4) A signs 2 of 2 atomic txn moving 10 USDcoin from C->B and 1 BTC from B->A. A sends info to broker. Broker checks and sends info to B. Otherwise, broker confiscates A's deposit and returns deposit to B.

5) B signs 2 of 2 atomic txn moving 10 USDcoin from C->A. Txn has nLockTime component and can enter blocks after block t. B sends info to broker. Broker checks and sends info to A. Otherwise, broker confiscates B's deposit and returns deposit to A.

6) Now the broker returns deposits and leaves the picture. If B wants to exercise the option before time t, then he signs and broadcasts the txn described in (4). This executes the option. If the option has not been exercised by time t, then A signs and broadcasts the txn described in (5), causing the option to expire.

Note: currently A can broadcast this txn early and it will stick around in the memory pool, preventing B from executing the option. However, B can still execute the option by inserting the txn in a block himself. Txn replacement is necessary for B's option execution to supercede A's expiration order before block t, and vica versa for A's expiration order to supersede B's execution order after block t.