Is there any way to add an opcode to a UTXO that prevents how the coins are spent?

For example, in order to to spend the output, a person must send X number of bitcoin to Y address within the accompanying transaction.

1 Answer 1


There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is held by a rule engine that will only sign the tx if your requirements are met.

  • Is that what, "Incentivized finding of hash collisions" is ?en.bitcoin.it/wiki/Script Commented Mar 30, 2019 at 0:22
  • No, that is a bounty people can claim if they are able to produce two values that hash to the same hash for some hash function in the script. For example, the bounty for sha1 was claimed after Google released a collision attack Commented Mar 30, 2019 at 0:28
  • 1
    The coins can still be sent anywhere, there is no restriction on the destination Commented Mar 30, 2019 at 0:28
  • Thanks. I have found the best explanation: learnmeabitcoin.com/glossary/script Commented Mar 30, 2019 at 1:42
  • 3
    @UgamKamat That would on the condition that the final transaction incorporates that exact signed input. It does not allow you to set the condition from within a Bitcoin Script itself, and it does not prevent someone who has the key for that utxo M from sending it to any other address by simply signing a new tx input. Commented Mar 30, 2019 at 8:26

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.