How to Clear a Stuck Bitcoin Transaction
Why do bitcoin transactions often take a while to confirm? What options are there to speed up your bitcoin transaction?
Why Do Bitcoin Transactions Sometimes Take So Long?
Bitcoin transactions may take a while to become confirmed if the fee rate is too low. The fee to send a Bitcoin transaction depends on the size of the transaction in vbytes. Miners will confirm transfers that have the highest fee and gradually work their way down to those with the lowest fees.
Miners generate more profit this way and they’d like to submit a block with the transactions carrying the highest fees to maximise their potential block reward. Miners receive a block subsidy if they sucessfully submit a block and it is accepted on top of the sum of the transaction fees for that block.
With the Bitcoin blockchain, blocks are produced sequentially one at a time and there are many miners around the world competing to submit the next block, therefore we see competitive behaviour between miners to build the next block in the chain.
When demand to use Bitcoin is high, the network eventually hits a ceiling of somewhere between three to five on-chain transactions per second. The limit on the rate of transactions occurs because transactions themselves comprise data which must be added to the blockchain and given that block space is limited, each block can only handle a certain number of transactions.
Then the fact that Bitcoin blocks are produced on average every 10 minutes means that if you don't get into the next block, you could be waiting 20 minutes or several hours depending on the fee used and the rate at which new blocks are produced. To keep blocks coming every 10 minutes on average, there's a difficulty adjustment mechanism which adjusts the mining difficulty after a 2,016 block interval.
When more hash power is directed towards Bitcoin mining, blocks will be produced faster until the next difficulty adjustment, which will then make it more difficult to find a block and return the block interval to the expected value of 10 minutes. So when demand is high, queues form and waiting times increase, especially if there's no new hash power being added to the network. However, when there's a sudden loss of hash power, blocks will be produced at a slower rate, until the next difficulty adjustment which will bring the average block time closer to 10 minutes once again.
We recommend Rollbit players to use LTC for deposits, as it has a faster block time of 2.5 minutes (on average) and currently has the lowest average fees relative to BTC and ETH.
What is the Mempool?
Once you submit a transaction, Bitcoin nodes will add it to the mempool. The memory pool (or mempool) is a group of transactions that have not been confirmed by a miner but have been validated by nodes. It's also important to note that nodes will automatically reject transactions if the fee is too low.
Transactions take up space on the Bitcoin blockchain, so the fees you pay are not determined by the amount of coins you want to send, rather it is the size of the transaction (a transaction with more inputs will be larger in size). Therefore, the standard unit of measurement for bitcoin transaction fees is satoshis per vbyte (where satoshis are the smallest unit of Bitcoin). The mempool is limited to 300 MB and if this limit is reached, lower fee transactions will be dropped out.
When demand for block space is high (which means the demand to transact using bitcoin is high), then fees will rise as users outbid each other to get to the front of the queue and have their transaction confirmed quickly. If demand for block space is low (which means the bitcoin network is relatively quiet and there are fewer transactions), then fees fall.
The best way to avoid getting your bitcoin transaction stuck is to assess the fee market before transferring any funds. There are various websites you can use to see the state of Bitcoin’s fee market and the mempool to help you decide an appropriate fee to get into the next block (or within the next few blocks).
How Can I Estimate an Appropriate Fee for my Bitcoin Transactions?
Here are some websites you can use to visualise the demand for block space and help you set an appropriate fee:
1. Mempool.space
Mempool.space shows the range of fees and median fee to get into the next block. For instance, in the image below, we see that the orange block to the left of the dotted line the median fee is ~74 satoshis per vbyte and the range of fees used in that block is between 65 to 731 satoshis per vbyte. For the next block after that, the fees are a bit lower between 62 and 65 satoshis per vbyte.
The website also shows the different fee levels for blocks further out in case you want to pay a lower transaction fee and don’t urgently need to get into the next block.
The visualisation also shows the fee rate for previous blocks (purple/blue cubes), as well as the fee rates for low, medium and high priority. Mempool.space also shows the mempool statistics, with the unconfirmed transactions, minimum fee and memory usage.
2. TxStreet.com
TxStreet.com is another cool visualisation that you can use to help you set an appropriate fee to get your transaction confirmed as quickly as possible. Each person represents a transaction, and each bus is a block on the blockchain.
The fee to get in the block is displayed on the bus, while it shows the median fee over the past 5 minutes under ‘Stats’ on the bottom left-hand side:
3. Johoe's Bitcoin Mempool Statistics
Johoe’s Bitcoin Mempool Statistics shows the pending transaction fee in BTC, the number of unconfirmed transactions and the weight. These statistics can help you set the right fee for your transaction to get it confirmed quickly. Here we see that most people were paying 25+ sat vbyte. But we saw a large spike in the pending transaction fee around 14:00:
It also worth noting that these three websites are not exclusive to Bitcoin. You can use these resources to help you set an appropriate fee for Ethereum transactions too.
How Can I Speed Up My Transaction if it has Already Been Sent?
If the fee you set is too low, you may wait a long time for confirmation. If Bitcoin’s mempool reaches full capacity, your transaction is returned to you and your funds become accessible as nodes include higher fee transactions in place of lower fee transactions when the memory limit of 300MB is reached.
To overcome these sorts of situations, there are two ways you can speed up your bitcoin transaction if it's already been sent: 1) Replace-by-Fee, and 2) Child Pays For Parent, both of which are incorporated a number of wallets.
What is Replace-by-Fee?
You can use Opt-In Replace-by-Fee (or RBF for short) to speed up a bitcoin transaction.
Transaction replacement was initially included in Bitcoin’s original 0.1.0 release. However, there was no rate limiting mechanism in place to prevent Denial-of-Service or spam attacks and miners were not incentivised to replace the transaction.
By the time of Bitcoin’s 0.3.12 release, transaction replacement was disabled. This feature didn't return to Bitcoin until February 2016 with Peter Todd’s BIP 125, known as ‘Opt-in Full Replace-by-Fee Signaling’. BIP 125 was merged into Bitcoin Core 0.12.0 and fixed the prior version of transaction replacement by requiring a higher fee for each replacement.
How do RBF Transactions Work?
Suppose you send a transaction, but it is taking too long to confirm since most other transactions have used a higher fee. You can replace the original transaction with the same parameters but with a higher fee.
By using RBF-enabled wallet, users can flag their transaction to tell full nodes they may replace it until the point that it gets confirmed in a new block. Once the user processes a replacement transaction with a higher fee, nodes discard the original transaction and miners work on confirming the newer transaction with the higher fee.
Some of the most popular wallets that have RBF functionality include:
What is "Child Pays For Parent"?
Another type of transaction that can speed up your bitcoin transaction is Child Pays For Parent (or CPFP for short).
While Replace-by-Fee invalidates a prior transaction in favour of a newer one with a higher fee for faster confirmation, Child Pays for Parent speeds up a prior transaction by sending a new transaction with a higher fee to get miners to confirm both transactions.
How Do Child Pays for Parent Transactions Work?
You can think of CPFP as speeding up an initial transaction (known as a Parent) by bundling it with another transaction (the Child), bumping the overall fee of a single transaction to get faster confirmation.
According to Bitcoin consensus rules a transaction which creates an output is required to appear earlier in the blockchain than the transaction which spends that output. Therefore, the parent transaction appears earlier in the same block than the child transaction if both are included in the same block. As a result, any unconfirmed transaction with a high fee can incentivise miners to confirm any of its ancestor transactions that are unconfirmed.
Two wallets that include Child Pays For Parent functionality are:
Transaction Acceleration Services
If you do a Google search, you can find transaction acceleration services where you can pay miners directly to speed up your Bitcoin transaction. However, not all mining pools offer this service.
These types of payments are known as out-of-band payments, as they are not on-chain transactions to miners as a fee and operate outside of the Bitcoin protocol itself. With an accelerator payment, you send funds to a mining pool and they attempt to get the transaction confirmed quicker.
Accelerator services are seen by some as controversial since the demand for block space then does not represent the true state of Bitcoin’s fee market, making it less efficient. Also, a mining pool's ability to speed up a transaction is limited by their share of Bitcoin’s total hash rate. For example, a pool with 5% of the hash rate may mine one block every 200 minutes on average.
Some accelerators guarantee they will confirm your transaction after a certain amount of time or offer a refund, so it’s only recommended if it is a really urgent payment, your wallet has no CPFP or RBF functionality and you have no other option.
-The Rollbit Team