Wednesday, May 3, 2017

How To Minimize Bitcoin Transaction Confirmation Delays Via Adjusting Miners’ Fees

A few days ago, I wanted to sell some bitcoins for USD on my debit card. I decided to use Paxful, as I have a well trusted buyer there, whom I have been dealing with for quite a while. So, I transferred my bitcoins to my wallet on Paxful. Surprisingly enough, the transaction was confirmed exactly 30.25 hours after initiating it, which was extremely inconvenient to me and my trading partner. Interestingly, it happened that I sent a couple of transactions after initiating the Paxful transaction, and they were both confirmed much earlier than the Paxful transaction, so why are some transactions confirmed before the others? and why do some transactions take a long time to get confirmed?

Fees versus Confirmation Delays:

Obviously, when traffic across the bitcoin network increases, confirmation delays can be expected. This usually happens during times of bullish rallies. Bitcoin price had just crossed the $1,200 mark, when I had to wait for more than 30 hours for my transaction to get confirmed. With high bitcoin traffic, miners will prioritize transactions with higher fees.

Miners evaluate the fees of transactions with correlation to its number of bytes, or fee per byte, which is the total fee divided by a transaction’s size in terms of bytes, such as 50 satoshis/byte or 0.0005 bitcoin/kilobyte. The is the most essential consideration for bitcoin miners. This is because they use this to determine whether or not to include a transaction in the block they are working on to generate, as only 1 million bytes worth of transactions can be included in a single block. Accordingly, they prefer to include transactions with higher fees per byte. It is important to point out that the magnitude of a transaction does not influence the process of fee calculation. For instance, if your transaction’s size is 250 bytes, you will pay the same amount of fees whether its amount is equal to 0.0001 or even 1000 bitcoins.

Bitcoinfees.21.co is a service that aids in the calculation of bitcoin fees. According to the service’s website, currently, the cheapest and fastest fee is 180 satoshis/byte. With a median transaction size of 226 bytes, the fee would be equal to 40,680 satoshis. To determine the ideal fee-per-byte for your bitcoin transaction, you have to identify your transaction’s size in bytes. Unluckily, many wallet services won’t show you the size of a transaction before you initiate it, yet bitcoinfees.21.co offers a useful statistic; “the median byte transaction size” which represents the most common transactions’ byte size throughout the last few blocks.

The below chart, from bitcoinfees.21.co, plots the amount of fees (in satoshis per byte) against the estimated delay, of transaction confirmation, in minutes and also in terms of blocks, i.e. how many blocks will be generated before the transaction is confirmed successfully.

How To Choose the Confirmation Time of a Transaction by Adjusting Fees?

Each input within a simple “Adam pays Judy” transaction contributes around 180 bytes, provided that you are using uncompressed public keys, and around 148 bytes if you choose to use compressed public keys. As such, to predict the size of a bitcoin transaction in bytes, you have to know the total number of coins that will be spent and if the public key is compressed or not. Unluckily, “user friendly’ wallets, such as the blockchain.info wallet, will not usually show you your coins, so you will have to use advanced tools that can support “coin control” to be able to do that. Armory and Bitcoin Core, on the other hand, support “coin control”.

After identifying the size of your transaction, you will have to refer to the above chart to determine the amount of fees and the predicted confirmation delay for the chosen amount. For example, if the size of my transaction is 230 byte, and I choose to pay a fee of 120 satoshi per byte, then I will pay totally 230 x 120 = 27,600 satoshis. According to the chart, the expected confirmation time of this transaction can be anywhere between 15 and 600 minutes, which is the time needed to generate 3 to 55 blocks.

0 komentar: