0

I am currently learning about bitcoin transactions and I found out about the scriptPubKey which locks every output until it is spent by using the unlocking script.

My question is who owns the bitcoins before they are spent and unlocked?

For example, I came across a reddit post that mentions transaction outputs with a hash collision bounty as their locking script: OP_2DUP OP_EQUAL OP_NOT OP_VERIFY OP_SHA1 OP_SWAP OP_SHA1 OP_EQUAL

Am I right to deduce that unless someone finds a collisoin to the specified hash functions these bitcoins are just unspendable and thus belong to nobody?

2 Answers 2

2

They are owned (or at least, controlled; ownership is more of a legal/social term than a technical one) by the script.

For simple scripts, which just require a signature by a single public key in one way or form, there is an easy correspondence between keys and scripts, and for those you can just as well say the coins are controlled by that key, or equivalently, by the person/entity who has access to its corresponding private key.

However, there is no requirement for scripts to correspond to just a single key, or even a multiple of keys. As your example shows, the script can reasonably not contain any keys at all.

Note that the example given is actually insecure. If someone were to find a viable SHA1 collision that could unlock the script, the coins can be stolen by miners. There is no signature, and thus nothing that prevents the reported collision from being used in any other transaction than the finders' one.

1
  • Can you check if my answer is correct please?
    – SickGuy
    Dec 12, 2021 at 15:10
0

It seems my understanding that all bitcoins need to belong to some address was wrong:

There are no accounts or balances in bitcoin; there are only unspent transaction outputs (UTXO) scattered in the blockchain.

source.

So the answer is that the Unspent Transaction Outputs created by the transaction are indeed unspendable unless someone can unlock them.

And they do not "belong" to anyone as there are no accounts or balances in bitcoin.

1
  • 1
    You're right that they don't belong to "anyone", but this is unrelated to the fact that Bitcoin has no accounts or balances. One could imagine a hypothetical account/balance based system where scripts also control access to funds (there are good reasons not to do that, but it's certainly feasible). Dec 12, 2021 at 15:23

Your Answer

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

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