Alice wants Bob to transfer 10btc to Carol, and is willing to pay Bob 11btc for the transfer.
They both entrust Trent to mediate the transaction, and Alice is willing to pay Trent 1btc as commission.
What is the correct and most secure protocol for performing this contract?
Edit: does the following protocol make sense?
- Alice broadcasts a transaction (Tx1) with 2 outputs:
- 11btc with an output script specifying 2-of-3 multi-signature verification, specifying Alice, Bob and Trent as recipients
- 1btc to Trent (commission)
- Bob verifies Alice's transaction:
- Verified: Bob broadcasts a transaction (Tx2) sending Trent 10btc
- Rollback - Bob is unsatisfied or fails to transfer the funds to Trent: Trent broadcasts a transaction (Tx3) sending Alice her 11btc back, specifying Tx1's first output as an input and signs the input. When Alice wants to spend Tx3, adding her signature to the input satisfies the 2-of-3 requirement (and the process stops here)
- Trent broadcasts a transaction (Tx4) sending Bob the 11btc, specifying Tx1's first output as an input. When Bob wants to spend Tx4, adding his signature to the input satisfies the 2-of-3 requirement
- Trent broadcasts a transaction (Tx5) sending Carol 10btc, specifying Tx2 as an input