Can I schedule a Bitcoin transaction and cancel it before it's sent?

6 replies 380 views
Posts: 6 · Reputation: 144
#1Jan 27, 2021, 07:26 AM
Hey everyone, I’m looking to figure out if it’s possible to plan a Bitcoin transaction for a future date and still have the option to cancel it before it goes out. I get that wallet software lets you choose a specific block, which is cool, but how can I narrow it down even more? Also, can anyone recommend the best software for this? Blocks can really vary if you’re scheduling something far off. From what I understand, reversing a transaction isn’t an option after it’s sent, but can I arrange things so that I can cancel it as long as it hasn't been fully executed yet? Thanks for any advice!
4 Reply Quote Share
paul2017Senior Member
Posts: 218 · Reputation: 1426
#2Jan 27, 2021, 09:35 AM
You can specify an actual time in the locktime field. To cancel the transaction, you spend the input UTXO before the transaction becomes valid.
2 Reply Quote Share
Posts: 6 · Reputation: 144
#3Jan 27, 2021, 02:12 PM
In Electrum in the drop down ok, I can choose date and then specify it, but do I broadcast it then? I thought if I broadcast it, spending the input before the scheduled transactions becomes valid is not possible. Since it is if I get you right here, is there a way to set it up that the transaction will be executed at a future date without the possibility to stop it by spending the input before the specified date?
2 Reply Quote Share
paul2017Senior Member
Posts: 218 · Reputation: 1426
#4Jan 27, 2021, 07:11 PM
A transaction in the block chain invalidates all other transactions spending any of its input UTXOs. Nodes have rules about what to do with transactions using the same UTXOs, but I doubt any would not accept a transaction spending a UTXO already seen in a locked transaction. Edit: This is not accurate. As pointed out below by @hosemary, nodes reject a transaction whose lock time has not yet passed. A transaction does not invalidate any other transactions until it is included in the block chain.
3 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#5Jan 28, 2021, 12:57 AM
You may want to read my topic Using Locktime for inheritance planning, backups or gifts.
3 Reply Quote Share
Posts: 6 · Reputation: 144
#6Jan 28, 2021, 02:37 AM
Thank you odolvlobo, I will have a closer look at LoyceV's link tomorrow and then see what questions I might still have. Kind regards! Chris
1 Reply Quote Share
w0lf404Hero Member
Posts: 801 · Reputation: 2381
#7Jan 28, 2021, 08:06 AM
Any transaction with a locktime into the future will be rejected by the nodes and you have to broadcast your transaction after the locktime. If the current time (or the current block height) is earlier than the locktime, the transaction hasn't been broadcasted, nodes don't have that in their mempool and there's nothing to be canceled at all. As I said nodes reject any transaction with a locktime into the futrue. Therefore, they don't keep such transactions in their mempool at all even if they have seen it.
3 Reply Quote Share

Related topics