<p><strong>There are proposals to introduce new <code>opcodes</code> which allow an parent output script to impose spending conditions onto the output(s) of the spending child transaction.</strong> </p>

<p>You could therefore "ensure" that the child transaction outputs would be "revocable", which is similar to what you are describing.</p>

<p>This output script could be a RSMC contract. If I wish to "cancel" the spending transactions outputs within a timeout period, I can sweep the output with the revocation key.</p>

<p>The proposed script opcode <code>OP_PUSHTXDATA</code> pushes transaction elements from the spending (child) transaction to the stack during verification, and this could include the output script data of the child transaction:</p>

<p><strong>Parent transaction:</strong></p>

<ul>
<li><strong>Output script:</strong> <code>OP_PUSHTXDATA</code> pushes spending child transaction output script elements onto stack, to verify that it is a revocable output.</li>
</ul>

<p><strong>Child transaction:</strong></p>

<ul>
<li><strong>Input:</strong> Spends parent transaction </li>
<li><strong>Output Script:</strong> Must be a revocable output with conditions enforced by parent transaction output script.</li>
</ul>

CC BY-SA 4.0
2019-01-29T12:42:41.597Z
2019-01-29T12:42:41.597Z
James C.
<p>One of the fundamental principals of cryptocurrency is to be able to operate without the need of a trusted central entity.
I can't see how a transaction can be cancelled or reversed without involving a trusted central entity to arbitrate the transaction.</p>

<p>However we also have cryptocurrency like <a href="https://ripple.com" rel="nofollow noreferrer">Ripple</a>. In my opinion Ripple is not a cryptocurrency because of the centralized nature, but well what do I know.</p>

<p>Maybe in the future some genius will discover a method to implement this without a central entity :)</p>

CC BY-SA 4.0
2019-01-03T01:06:57.220Z
As long as the transaction outputs haven't been spent, it's easy to undo a transaction without a central authority: add a transaction type of "undo" that reverses a prior transaction to your coin's definition, and undoing a transaction is simply a matter of having that transaction accepted into the blockchain.
Mark
CC BY-SA 4.0
2019-06-28T14:06:01.180Z
@Mark: doesn't that just force vendors/recipients to "spend" received amounts before dispatching the goods (or providing services etc)?
RedGrittyBrick
CC BY-SA 4.0
2019-06-28T20:52:44.060Z
@RedGrittyBrick, yes.  Adding a cancellation system without a central authority is quite possible.  Adding one that's "fair" isn't, because "fairness" is a human concept, not a mathematical one.
Mark
CC BY-SA 3.0
2017-12-11T11:48:48.650Z
2017-12-11T11:55:40.910Z
2017-12-11T11:55:40.910Z
Chak
<p>You surely could inplement the cancelling of an unconfirmed transaction by asking other clients to delete it from their memory. But I guess this could open door for transaction spam in your network (I mean people creating and then cancelling transactions at no cost).</p>

CC BY-SA 3.0
2017-12-11T19:12:35.120Z
2017-12-11T19:12:35.120Z
Kozuch
<p>I know it is currently not possible to cancel transactions in the Bitcoin. However, say someone wants to implement such mechanism in an altcoin. Is it theoretically possible without damaging the open nature of cryptocurrencies ? Do we have the required primitives for it ?</p>

CC BY-SA 3.0
2017-12-11T14:25:24.093Z
It could probably be implemented by altcoin developers, or even bitcoin developers, in such a manner that both parties agree to the cancellation of the transaction, therefore avoiding double the transaction fees. As long as the transaction that is being canceled is still unspent.
Monstrum
<transactions><altcoin>
Cancelling transactions
SpiderRico
# Cancelling transactions

(Asked by: username_0 on 2017-12-11)

I know it is currently not possible to cancel transactions in the Bitcoin. However, say someone wants to implement such mechanism in an altcoin. Is it theoretically possible without damaging the open nature of cryptocurrencies ? Do we have the required primitives for it ?

**Tags:** transactions, altcoin

> **Comments:**
> **username_1**: It could probably be implemented by altcoin developers, or even bitcoin developers, in such a manner that both parties agree to the cancellation of the transaction, therefore avoiding double the transaction fees. As long as the transaction that is being canceled is still unspent.  

---

## 3 answers

### Answer by username_2 on 2019-01-29. Score: 0 | Accepted answer

**There are proposals to introduce new `opcodes` which allow an parent output script to impose spending conditions onto the output(s) of the spending child transaction.**

You could therefore "ensure" that the child transaction outputs would be "revocable", which is similar to what you are describing.

This output script could be a RSMC contract. If I wish to "cancel" the spending transactions outputs within a timeout period, I can sweep the output with the revocation key.

The proposed script opcode `OP_PUSHTXDATA` pushes transaction elements from the spending (child) transaction to the stack during verification, and this could include the output script data of the child transaction:

**Parent transaction:**

* **Output script:** `OP_PUSHTXDATA` pushes spending child transaction output script elements onto stack, to verify that it is a revocable output.

**Child transaction:**

* **Input:** Spends parent transaction
* **Output Script:** Must be a revocable output with conditions enforced by parent transaction output script.


---

### Answer by username_3 on 2017-12-11. Score: 0

One of the fundamental principals of cryptocurrency is to be able to operate without the need of a trusted central entity.
I can't see how a transaction can be cancelled or reversed without involving a trusted central entity to arbitrate the transaction.

However we also have cryptocurrency like [Ripple](https://ripple.com). In my opinion Ripple is not a cryptocurrency because of the centralized nature, but well what do I know.

Maybe in the future some genius will discover a method to implement this without a central entity :)

> **Comments:**
> **username_4**: As long as the transaction outputs haven't been spent, it's easy to undo a transaction without a central authority: add a transaction type of "undo" that reverses a prior transaction to your coin's definition, and undoing a transaction is simply a matter of having that transaction accepted into the blockchain.  
> **username_5**: @username_4: doesn't that just force vendors/recipients to "spend" received amounts before dispatching the goods (or providing services etc)?  
> **username_4**: @username_5, yes.  Adding a cancellation system without a central authority is quite possible.  Adding one that's "fair" isn't, because "fairness" is a human concept, not a mathematical one.  

---

### Answer by username_6 on 2017-12-11. Score: 0

You surely could inplement the cancelling of an unconfirmed transaction by asking other clients to delete it from their memory. But I guess this could open door for transaction spam in your network (I mean people creating and then cancelling transactions at no cost).


---

