i wasn't meaning to say this was THE template to accomplish what you want to do. it was more that this lockbox is constructed through email techniques and apparently is working right now on mainnet. so that's one point. the other point is that it seems to me that perhaps a similar sequence of building a lockbox, funding it, and then spending from it COULD be used to accomplish what you want to do. like maybe constructing a 3 of 3 p2sh multisig lockbox, then funding it with 1 BTC each from Alice and Bob, who also then sign their portions of the lockbox,
Yes, the model where Alice and Bob communicate directly with one another, share public keys, and use knowledge of both public keys to build a transaction (be it a multi-sig lock box or conditional transaction) works perfectly fine for building the output side. However these models require Alice and Bob to communicate directly with one another, which requires them to both be online, communicate directly, etc.
If Alice and Bob do not have to communicate with each other at all, that opens up some very interesting new use cases, which I think could be killer apps. The output side might be solved by relying on the Oracle to help complete payments between the two, but that has downsides in adding trust on the Oracle and there are new legal implications if the Oracle is directly involved in Alice's and Bob's transaction.
However the real problem is how do Alice and Bob independently
fund the same conditional transaction with their own inputs without relying on a 3rd party.
The original Bitcoin had multiple signature types, including SIGHASH_ANYONECANPAY, this mode only signed the current input and the specified outputs, which effectively meant different parties could independently fund the same transaction without having to trust anyone else. It was not used since there was no practical usage for it with standard transactions, but the signature mode was still there.
The combination of conditional transactions plus ANYONECANPAY creates some new interesting use cases. However it looks that Bitcoin Cash as part of the BUIP-HF replay protection might have depricated ANYONECANPAY as a useful signature mode. Below are the relevant links and what I think they mean.
Does anyone from BU know if this is correct or if my interpretation is wrong and standard ANYONECANPAY is still available. Thanks!
Original Bitcoin
https://bitcoin.org/en/developer-guide#signature-hash-types
SIGHASH_ALL|SIGHASH_ANYONECANPAY signs all of the outputs but only this one input, and it also allows anyone to add or remove other inputs, so anyone can contribute additional satoshis but they cannot change how many satoshis are sent nor where they go.
https://en.bitcoin.it/wiki/OP_CHECKSIG#Procedure_for_Hashtype_SIGHASH_ANYONECANPAY
Think of this as "Let other people add inputs to this transaction, I don't care where the rest of the bitcoins come from."
SegWit Coin
However it looks that BIP 143 altered the behavior of SIGHASH_ANYONECANPAY as part of the SegWit changes, and instead made it so none of the inputs were protected by the signature. Effectively using this signature mode for segwit, which is a hard fork but the HF was possible because the signature mode was not used currently.
https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki
hashPrevouts:
If the ANYONECANPAY flag is not set, hashPrevouts is the double SHA256 of the serialization of all input outpoints;
Otherwise, hashPrevouts is a uint256 of 0x0000......0000.
Bitcoin Cash
Unfortunately, it looks that Bitcoin Cash, as part of the BUIP-HF replay protection changes, also used the new BIP 143 signature digest method and in the process lost the use of ANYONECANPAY for Bitcoin Cash.
https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/doc/abc/replay-protected-sighash.md
hashPrevouts
If the ANYONECANPAY flag is not set, hashPrevouts is the double SHA256 of the serialization of all input outpoints;
Otherwise, hashPrevouts is a uint256 of 0x0000......0000.
Is my understanding above accurate? Or am I reading too much into this and ANYONECANPAY is still functional in Bitcoin Cash?