How Bitcoin Transactions Work
24.11.2021 • Просмотров:

How Bitcoin Transactions Work

By Decimal

Today, many people use cryptocurrencies for various purposes. According to the data provided by Coinmarketrate.com, Bitcoin has made a rollback, and is trading at around $ 57,000, which made it possible to buy a failure. This led to an increase in transactions of the BTC.

Users often wonder why they need to wait for bitcoin transactions to be processed, and why this process is not accelerating. Let’s figure out together how bitcoin transactions work, who processes them, and how the whole process works in general.

How to avoid a long wait for confirmation

If you are not interested in the details of the functioning of the entire process, the only thing you need to know is that miners stack transactions in blocks that have limited capacity relative to demand. In order for your transactions to be confirmed as soon as possible, you need to pay miners a fairly high transaction fee.

Most wallets automatically calculate the required commission depending on how long you are willing to wait for confirmation. However, a high commission does not guarantee a quick confirmation of your transaction, so we recommend that users who are in a hurry or do not want to wait, use ETH, DEL or some other cryptocurrencies in which transactions usually take place quickly.

Bitcoin and its clones are simply not designed to be fast. Speed has lost priority due to more important functions such as security and decentralization. When speed is paramount, Bitcoin is not exactly a good choice. Below we will explain how Bitcoin transaction processing works from start to finish.

Blockchain

Bitcoin is the first cryptocurrency that has successfully implemented blockchain technology, and launched a revolutionary innovation that allows you to transfer values without intermediaries. As the name implies, the blockchain consists of several blocks connected in a continuous chain.

Each block contains a certain number of transactions due to its limited size. Bitcoin blocks have a limit of about 1 MB or about 2 MB with the Segwit update.

Given the still relatively low popularity of the Segwit update, the size of most Bitcoin blocks is about 1.2 MB. Now that we know the size of the blocks, we can calculate how many transactions fit in one block, compare with the number of unconfirmed transactions and find out the current state of the network.

But it’s not that simple, because the transactions of the BTC do not have a fixed size. There are also several different types of bitcoin transactions. To understand how the size of a particular transaction is formed, we must first understand how Bitcoin wallets or bitcoin registries work.

UTXO format

Withdrawal of Unspent Transactions (UTXO) is an account balance model invented by Satoshi Nakamoto, and implemented in Bitcoin. Interestingly, this model is not mentioned in the Bitcoin whitepaper.

This way of organizing transactions is significantly different from the standard one that we are used to using traditional bank accounts used by Ethereum (ETH).

Standard accounts have an account balance that changes after each transaction and is not split into smaller amounts. It can be considered as one large banknote of variable amount. On the other hand, the UTXO model is easiest to imagine as a wallet in which we have several different banknotes. Each UTXO is identical to one banknote.

Let’s take, for example, that we want to buy something worth 500 rubles, and in our wallet there are three banknotes of 200 rubles. We will give all three bills to the seller, and he will return the rest, that is, a bill of 100 rubles. BTC transactions work the same way.

Your bitcoin wallet shows the total value, that is, the amount of BTC you own, but in fact this amount is divided into several different UTXOs (banknotes) depending on the dynamics of your transactions. In other words, wallets show the cumulative value of all your UTXOs. Depending on the schedule and the number of individual UTXOs, you will need to use one or more UTXOs for a successful transaction.

Now that we know how bitcoin wallets work, we can calculate the size of an individual bitcoin transaction, as well as the average size. Thus, the size of a bitcoin transaction does not depend on the number of Bitcoins that you send, but on the number of UTXOs that need to be processed to send an arbitrary number of BTC.

Every UTXO that you have in your wallet increases the transaction size, and as the size increases, the transaction price increases. Statistics show that the average bitcoin transaction weighs about 450 bytes and that, given the variable size of bitcoin blocks, each block can contain an average of about 1800 transactions.

The next question is: how much should we pay for our transaction to be inserted into the first next block, and does it pay off for us taking into account the size of the transaction?

Bitcoin Nodes

Global distribution of Bitcoin nodes. Source: Bitnodes

Bitcoin nodes are computers running the software. They form a network consensus and participate in transaction processing. You can see the current number and distribution of nodes in the image above.

When your bitcoin wallet or the bitcoin node to which the wallet is connected broadcasts a transaction to other nodes in the network, the transaction ends with a mempole, that is, a pool containing unconfirmed transactions waiting to be included in the block to become part of an unbroken chain of blocks.

Typically, a mempole contains about 10,000 transactions at any given time. Transactions are processed according to the commission. Transactions with an adequate commission have priority.

Higher-quality bitcoin wallets automatically analyze the mempool and offer the optimal commission for payment to miners so that your transaction is confirmed as quickly as possible.

However, if you are in a hurry and are not sure whether the transaction will be included in the first next block, we recommend using calculators that determine the required commission.

Depending on the users on the Bitcoin network, transaction fees can be quite noticeable, so depending on the size and amount of the transaction, it is not worth paying the urgent commission required to enter the first next block.

It is more reasonable to pay a smaller commission and wait a few hours before the first confirmation. But when you buy something or use the services of an exchange office, the only reasonable option is to pay an urgent fee to avoid a long wait for payment.

New blocks are formed on average every 10 minutes. But this is only the average time, which in practice has significant deviations. It often happens that several blocks are formed one after the other, so we have to wait up to an hour.

Thus, it is obvious that even a fairly high transaction fee in some cases does not guarantee you a quick confirmation. Nevertheless, these are extremes that can be counted on, but with sufficient compensation, most transactions receive confirmation within 20 minutes.

Until the transaction is confirmed, it can be manipulated, and the recipient does not have access to the coins. To make sure that the transaction will not be canceled, you need to wait for the number of confirmations proportional to the transaction amount. For small amounts, one is enough, and for larger amounts, it is recommended to wait for 3 or more confirmations.

Remember that unconfirmed transactions are not final and are relatively easy to undo.

Bitcoin Miners

Bitcoin miners are specialized devices designed to create new bitcoin blocks. Miners scan the mempool in search of transactions with the highest commission, which will be included in the next block.

Many people think that miners solve complex mathematical problems, but in fact this is not a smart job, but a complex one. Miners randomly select large strings of numbers until they guess the correct solution of the next block.

The first miner who finds a solution receives a reward, currently amounting to 6.25 BTC, plus all transaction fees paid by users for including their transactions in the blockchain.

The pie chart shows the proportion of miners needed to mine Bitcoin. Source: Buy Bitcoin Worldwide

Given the exponential growth in the number of miners, individual mining devices or even device farms are not powerful enough to find a solution that unlocks the next block of Bitcoin. Therefore, miners are joining forces. A set of miners is called a mining pool.

When the mining pool finds a block of Bitcoins, the reward is divided proportionally to the number of miners who participated in the block search. This is also one of Bitcoin’s biggest drawbacks: several of the largest pools control most of the mining power, which theoretically makes Bitcoin mining relatively centralized and vulnerable to manipulation.

But in practice, everything works flawlessly, and there were no noticeable incidents, since compliance with the rules of the network meets the interests of all participants.