Bitcoin transactions. Answers to frequently asked questions

Most crypto enthusiasts have faced the problem when their transaction gets stuck in the blockchain or simply does not get sent. We have compiled popular questions and answers regarding cryptocurrency transactions.

Why is my Bitcoin transaction not confirmed?

Most likely, the sender set an insufficient fee. It may have been enough for quick confirmation a month, a week, or even a day ago, but today it is not.

An unconfirmed transaction is merely an intention to transfer coins, not its execution.

The second possible reason is that the sender spent the output of an unconfirmed transaction: received bitcoins and, without waiting for confirmations, sent part of them further.

How to check a blockchain transaction

To track a blockchain transaction, you need to ensure that your transaction is indeed awaiting confirmation. To do this, copy your transaction ID and paste it into the search bar on blockchair.com (or blockchain.com, or bitaps.com). Then look for the line "no confirmations" ("unconfirmed"). Found it? That means the transaction is waiting for confirmation.

Transaction search service

There is only a recommended fee set by someone. This someone can be mistaken. Most wallets (including Bitcoin Core) sometimes provide erroneous recommendations.

Where will the cryptocurrency from stuck transactions go?

Sooner or later, the "stuck" cryptocurrency will reach the recipient or become available in the sender's wallet. It cannot be stuck forever or simply disappear.

How to find out the processing time of a transaction?

After entering your transaction data into the blockchair.com service, you will see a line like "Priority: 14498/22321" ("In queue: 14498/22321"). The first number is your current position in the queue, and the second is the total length of the queue. Typically, there are 2-3 thousand transactions in a block (approximately every 10 minutes). You can roughly estimate the waiting time in the queue.

Don't forget that your position in the queue may decrease since transactions with higher fees take priority.

Bitcoin transaction not confirmed, what to do and how to speed it up

There are situations when sending bitcoins and other cryptocurrencies causes the transaction to get stuck. To speed it up, there are several options:

  • Use replace-by-fee. This can only be done by the sender if the option was checked before sending; not all wallets support it; inexpensive, not difficult.
  • Use CPFP (child pays for parent). This can be done by the recipient and usually the sender as well, slightly more expensive, not very difficult.
  • Make a double spend. Only the sender can do this, access to private keys or HD seed (12/24 words) is needed, inexpensive, relatively difficult.
  • Use the free "transaction accelerator" from viabtc. Anyone can do this, free of charge, not difficult, but the service is often overloaded and there are limitations on the transaction (the fee must be at least 10 sat/byte). This service incurs direct losses for its creators and may stop operating at any moment. There is also a similar "transaction accelerator" from antpool (an account on antpool.com is required). Sometimes it doesn't work.
  • Use one of the paid transaction accelerators from pools viabtcbtc.com. Anyone can use it, but it's relatively expensive.
  • Use one of the free/paid accelerators in Telegram. Those that work reuse accelerators from pools. There are also fake accelerators like bitaccelerate.com. They don't accelerate anything, just broadcast your transaction. Generally, this makes no sense.

How to use replace-by-fee?

Simply click the button in your wallet. For Bitcoin Core: open the transactions tab, right-click on the problematic transaction, then select "Increase transaction fee".

How to use CPFP? What if I am the recipient of the transaction?

This method exists and is suitable for recipients; it will also work for the sender if your transaction had "change" (which is usually the case). This method is slightly more expensive. You can try to use the CPFP (child pays for parent) mechanism. To do this, you need to spend one of the outputs of the problematic transaction with a fee sufficient for both transactions at once - the new and the old.

Be careful. If one of the "parent" transactions is also unconfirmed, then the fee will need to be calculated for three (or more) transactions.

That is, you simply create a transaction with one input (this should be one of the outputs of the problematic transaction, for example - change) and send bitcoins to yourself. Set the fee so that it is sufficient for both at once: for this, sum their sizes, multiply by the number from the section "How to choose an adequate fee?", divide by the size of the new transaction in kilobytes, and enter it in the "custom transaction fee" field when sending the transaction. Example for Bitcoin Core wallet:

  • Let’s say you are the recipient and should receive 0.08500148 btc.
  • To use CPFP, in Bitcoin Core go to "Settings" -> "Options" -> "Wallet"; check "Enable coin control features" and "Spend unconfirmed change" if they are not checked (you can remove them later).
  • Now close the settings window and click "Send", then click the "Inputs..." button and check the box next to the amount 0.08500148; then "Ok", set your address as the recipient; enter 0.08500148 as the amount and check "subtract fee from amount"; set the fee to "custom", "per kilobyte" and write it based on 2 transactions using the formula ((size of old transaction)/(size of new transaction) + 1)*(adequate fee per kilobyte, better to make it higher). Send it.
  • That's it. Now wait.

How to make a double spend?

For Bitcoin Core wallet, follow this algorithm:

  • Close the wallet, start it with the parameter -zapwallettxes and wait for it to open. When the wallet starts, all unconfirmed transactions will disappear from it (but they still exist in the network!). For Bitcoin Core 0.14 and above, you will also need to delete (rename or move) the mempool.dat file before starting.
    Why not use the -salvagewallet parameter? -zapwallettxes will not affect your address names, while -salvagewallet will delete them. Additionally, Bitcoin Core may crash when started with -salvagewallet, which could corrupt your wallet.dat. However, a backup will be created next to it.
  • Now you can create a new transaction, remembering to set an adequate fee. But! Since your old transaction still exists in the network, it may unexpectedly confirm at some point. If this is unacceptable to you, then at least one of the inputs of the new transaction must match one of the inputs of the old one. To do this, look at your transaction page on blockchair.com or a similar site for the "inputs" section, note the exact size of the input in bitcoins. After that, when creating a transaction in the wallet, click the "inputs..." button, find the same exact amount in bitcoins in the list and select it (if there are several, choose the one with the same receiving address and time). Then select some other inputs so that the total amount exceeds the amount of the transaction plus future fee; it’s better to choose with a margin. Fill in all fields as usual (don’t forget about the fee!) and send it.
    Sometimes it is said that all this can be avoided by simply waiting 2-3 days for the old transaction to "fade away." You can read about how this can sometimes lead to problems here (in English).

How to cancel a Bitcoin transaction?

If the transaction has been confirmed (included in a block), it cannot be canceled or undone. To cancel an unconfirmed transaction, you need to create a competing transaction and ensure its inclusion in a block - see the answer to the question "How to make a double spend?". In any case, cancellation cannot be guaranteed here.

The unconfirmed transaction itself cannot be canceled - only its display in your wallet can change. Next, see the answer to the following question.

My transaction was unconfirmed for several days, then disappeared and the money returned. Is everything fine now and can I forget about it?

No! Your old transaction still exists in the network and may unexpectedly confirm. To avoid this, you need to ensure that there is a new transaction competing with the old one for inputs. If you have completely changed your mind about making that transfer, you can transfer the funds to yourself. The simplest, but sometimes more costly option is to simply send all bitcoins back to the same address.

How to avoid transaction stalls?

  1. Set an adequate fee.
  2. Enable the replace-by-fee mechanism in your wallet and mark all transactions as replaceable if your wallet supports it (Bitcoin Core and Electrum support it). This will allow you to easily increase the fee if a problem arises.

What fee will be optimal for a transaction?

To avoid mistakes in choosing a fee for a Bitcoin transaction, there are special services. I recommend btc.comjochen-hoenicke.de  and bitcoinfees.earn.com. If you find it hard to understand what is shown on the chart, simply open the first link and enter the recommendation at the top of the page in the "custom transaction fee" field when sending the transaction.

Note that the fee amount depends on the transaction size in bytes (more precisely, its weight), not on the number of bitcoins being transferred.

Be careful - many popular wallets sometimes miscalculate fees and may let you down. For urgent or important transactions, always check the fee based on the state of the mempool.

I have a very high fee, how can I save?

Firstif you need to make several transfers - combine them: create one transaction with multiple outputs. The size in bytes of such a transaction will be less than that of several ordinary transactions; thus, the total fee will be lower with the same pay-per-byte rate. In a typical case, savings for two transfers will be about 1.7 times; for ten - about 4 times.

Seconddo not rely on the fee recommended by your wallet: it can be either underestimated or overestimated. Assess it yourself through one of the services showing the state of the mempool (see the answer to the question "How to choose an adequate fee? Where to check the state of the mempool?"). Usually, savings range from 10% to 30% (1.5 times), although sometimes it can be up to 10 times.

Third, you can manually set a fee much lower than recommended, and the transaction will still go through if the mempool ("queue") is almost empty. With an empty mempool, transactions with fees starting from 1000 satoshis per kilobyte go through successfully, but you will have to wait several hours or even days, and there is a chance that the transaction will not go through. If you need to transfer money quickly, do not attempt to save this way.

Lastly, you can manually select inputs and the transaction size so that there is no change; savings can be up to 15%. Alternatively, you can consolidate inputs in advance at a lower rate per byte - when fees are lower or if you can wait.

Can I spend unconfirmed coins?

You can. But you must set the fee so that it is sufficient for both the parent transaction and all its unconfirmed ancestors.

How to calculate the size of a regular (non-segwit) transaction?

The approximate formula for regular (non-segwit, compressed keys) transactions and for most modern wallets (Bitcoin Core, Electrum, Ledger ...) is 10+148*(number of inputs)+34*(number of outputs). The actual value may differ by a few bytes in the lower direction depending on specific keys. The approximate formula for regular transactions with uncompressed keys (mostly used earlier, Armory wallet):  10+180*(number of inputs)+34*(number of outputs).

How to calculate the size of a SegWit transaction?

First, note that a segwit transaction has several sizes. To confuse everyone and artificially make segwit transactions cheaper, the concept of size was altered for them. To calculate the fee, we need to consider not the actual size of the segwit transaction on disk, but the payable (vsize, also known as weight/4).

The formula for segwit addresses starting with "3" (if all inputs and outputs are P2SH-P2WPKH): 11+91*(number of inputs)+32*(number of outputs).

The formula for segwit addresses starting with "bc1" (if all inputs and outputs are P2WPKH): 11+68*(number of inputs)+31*(number of outputs).

To calculate for a segwit transaction that has inputs and/or outputs of different types:
11+68*(number of P2WPKH inputs)+91*(number of P2SH-P2WPKH inputs)+148*(number of legacy inputs)+31*(number of P2WPKH outputs)+32*(number of P2SH-P2WPKH outputs)+34*(number of legacy outputs).

The actual value may differ by a few bytes in the lower direction depending on specific keys. Please do not ask how to calculate the size for a segwit-multisig transaction.