익명 04:11

Presign transaction with unconfirmed outputs

Presign transaction with unconfirmed outputs

I am wondering whether the following scenario is possible. Any help is very appreciated.

Alice and Bob are creating a (taproot) 2-of-2 multisig together. They do not trust each other. They intend to fund the multisig address with 1 BTC each but before they send their Bitcoin to the multisig address, they presign a transaction (the redeem transaction) that spends 1 BTC back from the multisig to each of them. Only when both of them have a copy of this unbroadcasted transaction, will they proceed to fund the multisig.

Is this possible? In order to presign the redeem transaction they would need to know the TXID of the outputs they intend to send to the multisig, correct? So they would need to create their separate funding transactions that go into the multisig and share the TXID with each other (but do not broadcast it yet). Then they construct and sign the redeem transaction. Then they broadcast the funding transactions. Is this possible or am I thinking too complicated?

Also, what if the fee environment changes during this process and one of the funding transactions does not get confirmed? Then the presigned redeem transaction is worthless since using RBF on the funding transaction would change the TXID and thus invalidate the presigned redeem transaction? Is there a way to circumvent that?

Thanks a lot!

EDIT: Here is an example of a situation that describes what I want to achieve. Alice and Bob want to create a venture fund. They do not know in which startup to invest just yet. Of course, they will only invest in a startup if both agree that it is a good investment. So they create a 2-of-2 multisig for this purpose. Before funding it, however, they think about what would happen if the other party disappears or if they will not come to an agreement about where to invest. They could block the others funds indefinitely. Therefore they want to have to option to exit the multisig unliterally to predefined addresses.



Top Answer/Comment:

Yes it is possible. It is in fact a technique at the core of most trustless protocols on top of Bitcoin. Including the most used one, the Lightning Network.

Regarding the funding transaction confirmation, any secure protocol would wait for it to be sufficiently buried before treating the contract as active. For instance in the case of a payment channel, both parties would wait for confirmations before making payments to each other through the channel.

Indeed bumping the fees of the funding transaction would change its txid. But if both parties cooperate they can just pre-sign another chain of transactions from the new, bumped, funding transaction. If they don't, each party can just RBF ("double spend") their funding transaction. That is, spending any of the coins spent by their unconfirmed funding transaction in another transaction with a higher fee which sends the coins back to themselves (or otherwise makes a payment).

상단 광고의 [X] 버튼을 누르면 내용이 보입니다