When an unconfirmed transaction occurs during the Bitcoin mixing, you can't do much as the Bitcoin mixer needs to handle the unconfirmed or stuck transaction alone.
However, to better understand how Bitcoin transactions work, we will explain what unconfirmed Bitcoin transactions are and how unconfirmed Bitcoin transactions can be dealt with. Let's get started.
Unconfirmed Bitcoin transactions
Bitcoin is a cryptocurrency based on the Proof-of-Work (PoW) algorithm. All Bitcoin transactions are handled with the help of cryptocurrency mining.
When you send Bitcoins to another address, the transaction gets verified in the first place. During this phase, the transaction validity is checked by every computer holding a copy of the Bitcoin blockchain. The computers, also known as nodes, are reviewing the Bitcoin's history to make sure that you have enough Bitcoins in your account balance.
As soon as the transaction is valid, it goes into the Memory pool or a Mempool. Mempool is a place where the validated transaction waits for a miner to pick it up and add it to a block of transactions. At this point, the transaction is still considered an "unconfirmed transaction" or a "zero-confirmation transaction."
Once a miner chooses the transaction and adds it in a successfully mined block, the transaction is confirmed and recorded in the Bitcoin blockchain. The process of sending Bitcoins is complete.
Calculating Bitcoin transaction fee
Bitcoin fee is the amount Bitcoin owners pay to Bitcoin miners whenever they send funds to another Bitcoin address.
When the Bitcoin's network is crowded, and many transactions are waiting to be confirmed, the miner will prioritize transactions based on their fee. Simply said, the fee indicates to the miner how urgent your transaction is. If you want your transaction to get confirmed faster, you'll attach a larger fee. If your transaction is not so urgent, you can choose a smaller transaction fee.
So, how do you calculate the Bitcoin transaction fee? It isn't as simple as it may seem. Let's explain.
Bitcoin transaction size
Every Bitcoin transaction has its size. To maximize profit, miners naturally prioritize transactions that have a hefty fee-to-size ratio, or Feerate.
The fee-to-size ratio can be compared to shopping for a new apartment. The price of the home is calculated in terms of cost per square foot. Feerate is Bitcoin's cost per square foot.
Feerate is measured in Satoshis per byte. Satoshi is the smallest unit in Bitcoin. The Feerate varies, depending on how much the Bitcoin network is crowded with transactions. Just like the cost of an apartment varies depending on the demand for living space in the desired area.
A transaction size depends on several different factors. The most significant ones are:
- number of inputs
- number of outputs
- script complexity
Number of inputs
Each Bitcoin you own is just a reference to past transactions that were sent to you. These references are transaction inputs. When sending Bitcoins to someone, you use different inputs sent to you in the past and forward them to the recipient as outputs. The more inputs your transaction has the bigger its size.
Number of outputs
Outputs are the number of Bitcoin addresses you're sending the payment to. If you're only paying to one address, you'll likely generate two outputs. One for the Bitcoin address you're sending to, and another address to pay yourself back the change from your initial payment.
The third significant factor in determining your transaction size is the script complexity. Some transactions use advanced features, such as Multisig, that make the script more complicated and eventually increase the transaction size.
For an average user, it can be quite challenging to calculate the transaction size. Luckily, Bitcoin wallets will suggest the fee based on the average Feerate at the moment of the transaction.
Cutting transaction fees
Now that you know more about transaction fees let's examine ways for paying less.
Avoid busy times
First of all, avoid sending transactions when the Bitcoin network is occupied. When the network is crowded, for example, when many people are looking to buy Bitcoin, users will bid up their fees to prioritize their transactions. This can cause transaction fees to become ridiculously expensive. If you can wait until the network is less crowded, you may be able to save a lot of money on network fees.
Use SegWit wallet
Another option to save on transaction fees is to use a Bitcoin wallet that supports the SegWit protocol. SegWit, or Segregated Witness, is a Bitcoin protocol upgrade, which configures the transaction's data to create a file that is smaller in size. Many Bitcoin wallets already support the SegWit feature, and it can cut costs considerably.
Consolidate your inputs
A more advanced method for optimizing fees is grouping your inputs. You can consolidate your inputs by sending many small inputs to an address you own, at a time when fees are low. This way, you will reduce your future fees, since you will only have one input.
Group multiple payments
Additionally, you can also group several payments, or outputs, to one transaction. Not all Bitcoin wallets support this feature. However, if your wallet allows this, you will be able to send payments to several addresses in one transaction, which will reduce the transaction fee.
Don't stick with wallet's recommendations
Bitcoin wallets recommend a reasonable fee, based on the activity of the Bitcoin network. Unfortunately, some Bitcoin wallets manage fees poorly and overbid fees, which drives up the prices for everyone else as well. Therefore, it is not always reasonable to accept the fee that is automatically suggested by your Bitcoin wallet. Instead, you should check the estimated Feerate using web sites mentioned above, and change the fees in your Bitcoin wallet.
If your wallet lets you view the transaction size, then you can use determine how much you need to pay to be included in the next block.
For example, if your transaction size is 10,000 bytes and the current feerate is 10 Satoshis/byte, then you will need to pay 100,000 Satoshis as a transaction fee, for a good chance to be added in the next block.
Dealing with unconfirmed Bitcoin transactions
If your transaction is stuck for a more extended period, it's very likely due to one of these reasons:
- you are sending coins from a transaction you received that hasn't been confirmed yet,
- you have just made the transfer, and it hasn't been verified or included in a block,
- you did not pay a high enough fee, so miners prioritized other transactions over your own,
- the network is overloaded, and due to its limited capacity, the network cannot process transactions fast enough.
Wait for the transaction to clear
In any case, you should wait. If your transaction isn't urgent, forget about it for at least 72 hours. Sooner or later, there will be free capacity in the network. In such periods, even the low-fee transactions will be processed.
If the transaction isn't processed for 72 hours, it will likely be erased from the Mempool, and your funds will be returned to your Bitcoin wallet.
Use the Replace-by-fee (RBF) feature
Another option is to use the Replace-by-fee feature or RBF. RBF lets the wallet to rebroadcast the transaction with a higher fee. Unfortunately, not all wallets support RBF. If your wallet does, then it can save you a lot of fee-related headaches.
Since the RBF protocol allows an unconfirmed transaction to be reverted, using the RBF-flag can be a little risky to use when dealing with someone you don't trust. Satoshi, alone, who came up with the idea of RBF, later decided to suspend the feature. Subsequently, RBF made a comeback with an updated Bitcoin Core.
Use transaction accelerators
You can also try transaction accelerators. There are different transaction accelerators, which are operated by mining pools. They will add your transaction to the next block they mine, provided they have the capacity to do so.
Some transaction accelerators are free, while others are free below certain size limits. One of the popular transaction accelerators is ViaBTC.com.
Sorting out stuck transactions
If a transaction is not confirmed for an extended period, it will eventually be erased from a node's Mempool, and the funds will be returned to your wallet. The default period for deletion is 72 hours, but nodes may set their duration.
It's possible that a particular node will never erase your transaction, and may even occasionally rebroadcast it to other nodes. In that case, your transaction can be stuck forever unless you use some of the methods mentioned earlier.
You should keep in mind that Bitcoin transactions are irreversible, and thus, it is impossible to cancel a Bitcoin transaction. Therefore, you should check the transaction information carefully before submitting the transaction.
As Bitcoin is becoming more popular, and more people are using it, the network needs to find solutions to handle the demand. One such solution is the Lightning network, which promises nearly instant, free transactions to all Bitcoiners.
Hopefully, by now, you understand the topic of Bitcoin fees and how they act as a method of prioritizing Bitcoin transactions and the cause of unconfirmed Bitcoin transactions.
Even though you cannot use this knowledge with Bitcoin tumblers, as they have their fees, transaction priorities, and mechanisms to avoid unconfirmed or stuck transactions, we hope you will find this information useful for your future Bitcoin use.