It has been told that anyone can create UTXOs at any script address without restrictions since the validator does not run for transaction that do not consume UTXOs. The question is, why so?

I think it would have been convenient if there was mechanism to assign (if needed) some validation logic to the creation of UTXOs at a script address. It would have enabled developers to define boundaries on what can possibly sit at their script addresses and that can simplify subsequent operations with those UTXOs.

It's hard to imagine that the absence of such a mechanism was not a conscious decision or that its technically not feasible. I am curious to know the reasoning behind it.

Update: While it is possible to filter out utxos in consuming tx, by looking at the datum associated with them, it also feels like a side effect of not being able to restrict the creation in the first place. That is the motivation for this question.

2 Answers 2


Because the purpose of a script is to determine the conditions a UTxO can be spent.

If you want to deter people from creating arbitrary UTxOs at your script address, you can write the script in a way that makes those UTxOs unspendable, e.g. require the UTxO to include a specific NFT.

Other than that, you can't stop someone from sending their tokens to an unreachable address. Adding some validation on every UTxO being created at the address would only serve to protect people from accidentally burning their tokens--that's not really your job as the script writer. It would also increase the cost of transactions.

  • Would it not increase the cost of transactions for having to pick the utxos linked to the specific NFT?
    – lambda
    Nov 10, 2021 at 5:47
  • Sure. It would. But only on the relevant transactions. If you put a script that validated all incoming Txs, it would have to be run on every Tx. Nov 10, 2021 at 17:32

It is simply not feasible. The only way would be to require that the transaction includes the script that hashes to the output-address. But in the general case this script is publicly available on the blockchain in a previous transaction where a UTxO with this same script address was consumed. So you could just extract it and include it in your transaction to circumvent this restriction. The only case where this mechanism would prevent UTxOs sitting at arbitrary script addresses is the one of secret one-way scripts, and I don't see this to be meaningful use case.

Edit: Actually requiring to include the script that hashes to the output-address exposes the script. So this mechanism does not work either.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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