1

Imagine a single multisig taproot address funded by a buyer. He bought from two vendors in a single order, but the resolution of each order/vendor pair is unknown ahead of time, and will happen at different timestamps.

Therefore in my Taproot Script, I’ll have to add a condition like the following:

If VendorN signed, the amount being transacted cannot exceed AmountN.

Is this possible?

A follow-up question: if it is my software that generates such a multisig address, how will the parties understand (and agree to) the script logic before funding this multisig address?

1 Answer 1

2

If VendorN signed, the amount being transacted cannot exceed AmountN.

Is this possible?

A transaction has inputs and outputs, all of which have a particular amount attached to them. So no you can't impose this condition. All signers and all public keys in a multisig are treated equally. You can create multiple competing transactions (only one can ultimately be included in the blockchain of course) where the outputs have different values in each transaction depending on the combinations of signers. But you can't create a single transaction which changes the amounts of the outputs depending on who has signed and who hasn't signed.

A follow-up question: if it is my software that generates such a multisig address, how will the parties understand (and agree to) the script logic before funding this multisig address?

To create the multisig address you need the public keys of all the potential signers and so these need to be provided in advance. The script and the public keys are not revealed publicly on the blockchain until Bitcoin is spent from this address. However, the script and the public keys can be shared between the potential signers at any point and the potential signers can verify that their public key was included in the multisig address. If nothing is shared with you in advance you can choose not to send any funds to the address.

4
  • "can't create a single transaction which changes the amounts of the outputs" -- not trying to do that, so the question might be confusing. Please let me know what made you think that the amounts of the outputs will change depending on something, so that I can alter the question.
    – Meglio
    Mar 30, 2023 at 22:40
  • @Meglio: To me "If VendorN signed, the amount being transacted cannot exceed AmountN." sounds like you want to impose a constraint on the amounts of specific output(s) that only applies if an individual signs. If the individual signs the total amount has a limit, if the individual doesn't sign this limit doesn't apply. That isn't possible. Mar 31, 2023 at 5:33
  • Since a single order is a sum of all goods from N vendors, the goal here, in simpler words, is to only allow each vendor to withdraw the amount attributed to them. Hence “signed by VendorN”. Additional special cases (execution branches?) would be: 1) full refund or refund of the amount attributed to VendorN only (hence signed by the market&buyer); 2) 9 more cases for resolutions 10-90%, 20-80% etc, per vendor (hence signed by both Vendor and Buyer as they resolve, but not by Market). Does it make any sense this way?
    – Meglio
    Mar 31, 2023 at 6:05
  • 2
    Bitcoin script simply cannot observe the input and/or output amounts in a transaction. If you need "branches" based on amounts, you may be able to express that through multiple non-broadcast pre-signed transactions, but it cannot be done through the script system. Mar 31, 2023 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.