0

I am trying to achieve a more complex task, as an use-case where a company holds a very popular bitcoin address that has many hundreds of inputs (UTXOs) in related to stocks it issued.

Now, the intention is to build a transaction that all the stock owners can broadcast if and when they decide to. But they should not be able to spend more than their rightful amount. Can SIGHASH_SINGLE be used in this case?

Example: input0, input1, input2, input3, input4 total = 5.001 btc output0 = 4 btc, output1 = 1 btc, fee = 0.001 btc

where output0 is the entire amount going back to the same address fee is the fee and output1 is the address of the holder that is entitled to withdraw no more than 1 btc.

The goal is to have a transaction that someone can use to withdraw no more than a certain amount and be valid for any inputs of a given address. Also, if different people have the same transaction but with different output1 and output1 amount, would there be any conflicts?

0

1 Answer 1

0

if different people have the same transaction but with different output1 and output1 amount, would there be any conflicts?

Those transactions would all have the same inputs.

A transaction always consumes and destroys all its inputs.

Therefore the first transaction to be broadcast and confirmed would invalidate all the others.

2
  • Thank you so much for your answer. It makes sense, I know, but if SIGHASH_SINGLE is signed this doesn't mean that the signature is valid for ANY input, and just a certain output? I mean, regardless a previous transaction consumes and destroys certain inputs, if the address has more unspent inputs the transaction can be used for those?
    – skydanc3r
    Commented Mar 19 at 10:35
  • Transactions don't reference addresses. Specifically, inputs and outputs never contain addresses as such. They reference specific UTXOs. Therefore any reasoning involving addresses can't apply to the processing of transaction inputs. Commented Mar 19 at 12:41

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.