i wish to see a video demonstration of this. This is very very interesting. very smart trick.
It's very easy to do if your wallet can create
signed raw transactions that can skip broadcast and has
coin-control feature.
Electrum for example.
The easiest way is to create a signed raw "
send-to-own" transaction before sending the "
send-to-the-target" transaction.
That way, you won't be needing extra steps of removing the already-broadcast transaction from your wallet's history.
Will a posted guide with images suffice?
A. Create a back-to-wallet signed raw transaction.1. Open Electrum and go to "
coins" tab (
View->Show coins), right-click and click "
spend" to select a UTXO(s) that's enough to pay the target.
It will be highlighted in green when selected.
2. Get an address from your own wallet and go to "
send" tab, paste your address to the "
pay to" box and input any amount or max.
Click "
send" but do not click the next "
send" on the next window, click "
Advance" instead.
In the advanced window, increase the fee to an insanely huge amount and make sure "
replace-by-fee" is ticked, click "
finalize".
A new window will open, here you need to click "
sign" (
this is a must!):
3. In the same Window, click "
Export->Copy to clipboard":
4.Save it to a text file:
5. Then close the window and disregard the warning that it wont be saved by clicking "
yes":
B. Send the coins to the "target"1. If you have closed the wallet or the coin selection was reset, just repeat the step one above and select (
one of) the coin that you've previously selected.
2. Send it like a normal transaction but use 1sat/vB fee and you should be able to see it on blockexplorers as well as the other party.
Transaction:
642bf8e3d46591485c5b0d9aef2349123a21378e784c3fac1014e907ac11bb36 (
now marked as invalid).
C. Invalidating the transaction by broadcasting the replacement1. After deciding to replace the transaction, all you have to do is to broadcast the previously created "
signed raw transaction" using either the "
console" tab (
View->Show console) or online push/broadcast transaction service.
For electrum tab, enter:
broadcast("02000000000101c47926bed38d8c77ea6990aca56fab............................")
That includes the quotation marks, the 020000... is the raw transaction that you've saved in a note or text file.
After that it will replace the previous transaction as long as the previous is still unconfirmed, has a higher fee that's enough for additional 1sat/B fee and replace-by-fee was enabled:
Transaction:
d5d5300996c661de9ffb4588ae0ac6a0be3ffdccc63d92e37c159f77ec97cbf0