<blockquote>
<p>If VendorN signed, the amount being transacted cannot exceed AmountN.</p>
<p>Is this possible?</p>
</blockquote>
<p>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.</p>
<blockquote>
<p>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?</p>
</blockquote>
<p>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.</p>

CC BY-SA 4.0
2023-03-30T22:40:32.253Z
"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
CC BY-SA 4.0
2023-03-31T05:33:14.913Z
@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.
Michael Folkson
CC BY-SA 4.0
2023-03-31T06:05:12.143Z
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
CC BY-SA 4.0
2023-03-31T06:48:26.750Z
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.
Pieter Wuille
CC BY-SA 4.0
2023-03-30T15:58:58.913Z
2023-03-30T15:58:58.913Z
Michael Folkson
<p>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.</p>
<p>Therefore in my Taproot Script, I’ll have to add a condition like the following:</p>
<p>If VendorN signed, the amount being transacted cannot exceed AmountN.</p>
<p>Is this possible?</p>
<p>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?</p>

<multi-signature><taproot>
Can Taproot Script condition over the amount from a particular output being spent
Meglio
# Can Taproot Script condition over the amount from a particular output being spent

(Asked by: username_0 on 2023-03-30)

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?

**Tags:** multi-signature, taproot


---

## 1 answers

### Answer by username_1 on 2023-03-30. Score: 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.

> **Comments:**
> **username_0**: "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.  
> **username_1**: @username_0: 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.  
> **username_0**: 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?  
> **username_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.  

---

