0

For an academic article I want to know if I can prevent a transaction from being spent at all?

I tried to send a transaction with only one output that contains only data (no output address provided) but it got rejected by the server (mempool) with error message TransactionError::MAX_FEE_EXCEEDED.

---UPDATE---

My intention was that I have an UTXO with OP_RETURN script that I want to be not spendable. I set it's value to be 0.00 BTC and therefore all the inputs values go to fee.

The issue with that that My transaction weight is very small (154 vBytes) and the sum of the input is much higher.

5
  • The title question is formulated somewhat incorrectly, you want the UTXO (the output of the transaction) to be not spendable, not the transaction.
    – OptOut
    Commented Jan 17, 2023 at 7:32
  • Can you elaborate on 'output that contains only data, no output address'. Is it an OP_RETURN script?
    – OptOut
    Commented Jan 17, 2023 at 7:35
  • Have you set the value on the output? If not, all input value goes to fee.
    – OptOut
    Commented Jan 17, 2023 at 7:37
  • It's not clear to me what you were exactly trying to achieve. Could you perhaps clarify your question now that RedGrittyBrick seems to have given a satisfactory answer?
    – Murch
    Commented Jan 17, 2023 at 14:59
  • I updated the question, thank you for your comments.
    – liorko
    Commented Jan 17, 2023 at 17:05

1 Answer 1

0

I want to know if I can prevent a transaction from being spent at all?

You can secretly burn money - send it to a randomly chosen address that has not been generated from a private-key.

You can also provably burn money by sending it to a burn address

In either case, the money can never be spent and can never be recovered.


TransactionError::MAX_FEE_EXCEEDED

Perhaps you spent an input but forgot to return change which would mean the whole input amount is given to the miner as a transaction fee. Wallets usually have fee limits to catch this kind of mistake.

But see also dust limit

2
  • Can I return all the money to the coinbase address that started the chain? The reason I got the MAX_FEE_EXCEEDED is because I didn't specify an address in order to make the transaction unspendable.
    – liorko
    Commented Jan 16, 2023 at 16:05
  • If the transaction was not mined (is unconfirmed), no money has been spent, there is nothing to return. If the transaction is mined (is confirmed), no money can be returned (other than by the recipient creating a new transaction). There is no functional distinction between coinbase addresses and non-coinbase addresses. Anyway addresses don't exist in the bitcoin network. Commented Jan 16, 2023 at 16:16

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.