Bitcoin
BTC$66 761.99

0.55%

Ethereum
ETH$3 256.83

2.60%

Tether
USDT$1.000016

-0.04%

Binance Coin
BNB$608.40

1.18%

Solana
SOL$158.26

2.58%

USD Coin
USDC$0.999969

0%

How do bitcoin transactions work?


July 2020

Today it’s hard to find a person who hasn’t heard of Bitcoin. However, the level of understanding of its principles and mechanisms varies greatly. Many people are satisfied with the knowledge that it’s enough to get a wallet, receive, send cryptocurrency to another person or sell it. For some users this information is sufficient. Nevertheless, for cryptocurrency investors a deeper understanding of Bitcoin’s nature is mandatory as it can resolve many questions and avoid problems with cryptocurrency usage.

Once we already overviewed what Bitcoin is, but did not go into details. In this article, we will try to describe how Bitcoin works in an accessible and detailed way.

Network


As many sources tell us, Bitcoin is a peer-to-peer payment system / network, the cryptocurrency of the same name is the settlement unit of operations in this network.

A peer-to-peer network is a computer network which principle is the equal rights of all participants. Each peer or node, as they are also called, performs the functions of both the client and the server. Such an organization allows you to maintain the network’s operability for any number and any combination of available nodes, the sum does not change from rearranging the places of the terms. Network participants are all peers, so the main feature of the system is complete decentralization: there is no central administrator or server. Instead of the term “peer-to-peer”, you can use such definitions as: a decentralized or p2p network.

Blockchain


The basis of bitcoin, and along the way, the “register” of transaction accounting is an ordered sequence (chain) of a data set (blocks), or simply a blockchain. Each block of the bitcoin network holds up to 1 MB of data, it’s formed on average 10 minutes, and it contains information about all transactions placed in it and information that connects it to the previous block.

Each block in the chain is cryptographically interconnected with the previous and the next. This relationship protects the network from replacing or modifying existing blocks in the future, making the blockchain immutable and transactions irreversible.

Principle of operation


For a clearer understanding of the basics of the Bitcoin network, imagine a hypothetical crypto enthusiast, let’s call him Tony, who has a bitcoin wallet with 2 BTC on balance.

Let’s assume that Tony wants to give 1 BTC to his friend Cindy, and for this he needs her unique bitcoin wallet address - an analogue of the account number in a traditional bank. Tony puts this address to the appropriate input field of his wallet, and in the other field he indicates the transfer amount - 1 BTC. Then Tony goes on to set the size of the transaction fee, and here we will dwell a little more.

Transactions and network load


As in any other payment system, transactions occur in bitcoin, that is, assets are transferred from one client to another. For bitcoin transactions, a commission is charged that is sent as a reward to the miners confirming these transactions. The higher the commission and the lower the network load, the faster transactions are confirmed.

Network load means the total number of participants sending their translation at the same time.

In essence, a transaction is a set of information that indicates to network participants what value the sender’s balance has decreased and what value the recipient’s balance has increased.

Miners


For a transaction to be successfully completed, miners must confirm, or validate, it. Nowadays, these are mostly specialized farms that use powerful computing equipment, ASICs, to verify transactions for “correctness”, they collect these transactions into blocks, and the blocks are sequentially connected to each other. The network algorithm takes 10 minutes to form 1 block, during which the miners perform the same type of computational work in search of one unique solution every second. This is not difficult, it is not a mathematical problem, but it is a very large amount of work, which is difficult to do with small computing power quickly and efficiently.

Miners receive a reward in the form of BTC for the work done. This reward consists of the commissions that users paid for transactions and new bitcoins that the network itself generated when a new block was finished and confirmed from the transactions. We will talk more about miners and generating new bitcoins in a separate article.

Commissions


Let's get back to our crypto enthusiast. Setting the size of the transaction fee, Tony is guided by the fact that for each byte of information he has to pay a certain amount of Satoshi - a fractional part of bitcoin. Since Tony does not know how much data his transaction will take, he decides to save and set the price at 1 Satoshi per byte.

For you, readers, we will tell how the weight and cost of a Tony transaction will be formed.

Those 2 BTC, which he has on the balance sheet, appeared in the wallet for a reason. Tony earned them - 1 BTC in 2017, 1 BTC in 2018. Now he wants to send half to his girlfriend. In his transaction, in addition to information about the number of coins, information on the addresses from which the coins came to him (they are called inputs) will be included, information about the addresses of the recipients (they are called outputs) and information about his own address will also be included.

We consider: 148*2 + 34*2 + 10 = 374 bytes. Now we know that our “greedy” Tony will pay 374 Satoshi for transaction.

Change


You ask, why do we multiply 34 (the weight of the address of the recipient) by 2, when the recipient is only one? The fact is that when you send part of your balance to someone, then not part, but the entire amount, leaves your balance, and after validation, i.e. inclusion of the transaction in the block, the balance minus the network commission is returned back to your wallet. Therefore, in addition to information about the address of the recipient, information about the address of the sender, that is, your address, is also included in the transaction. This return is called change.

Mempool


Having set a minuscule commission of 374 satoshi, Tony confirms the sending of 1 BTC and waits for the miners to confirm this transaction.

It's just that the miners are in no hurry to confirm it, the transaction falls into the mempool - the book of the queue for confirmation. Why? Because the miners want to earn money, and not just operate their equipment, because for the confirmation of Tony's transaction, they will receive only 374 satoshi. Especially for such very cheap transactions, there is a mempool with its sorting system.

First of all, miners “take” lighter transactions with a higher commission from the mempool, because confirming them is more profitable and much more is placed into their block.

By the way, if the sender uses SegWit technology, then his outgoing transactions weigh less than usual, which also attracts miners.

But you should not think that once in the mempool, the transaction is assigned some kind of sequence number. No. This queue is dynamic, every second a lot of transactions with different fees and weights enter it, so our Tony's transaction can wait a long time for confirmation. And, most importantly, while it is in mempool, Tony will not be able to dispose of the change.

In fact, in such a situation, the sender’s balances are “frozen”. It is this mechanism that protects the network from spam transactions - situations where a spammer creates a lot of cheap transactions, thereby overloading the network.

While Tony's transaction is in mempool, it is not considered confirmed and is not considered to be suspended. At the same time, it can be in the queue for a rather long time - until it is confirmed, or until it is removed by validating nodes from the mempool. According to statistics, the maximum waiting period of a queue is about 3 days, but at times of high network activity this period can be extended for a week or longer.

Agree that the speed of transfers in our time is one of the priority characteristics in the issue of using payment systems, and such queues are not very pleasant, to say the least.

There are many ways to push a transaction through the mempool. All of them are quite difficult to understand and implement for the average user, and some of them border on such a fraudulent way as "double-spending", or repeated spending. Nevertheless, there is one great feature that anyone can use, and we'll talk about it. It is called “Replacement Commission” (Replace-by-Fee or RBF).

Replace-by-fee (RBF)


Nowadays, not each bitcoin wallet has similar advanced functionality. RBF is editing an existing transaction that is in the mempool.

Editing means that the new inputs will use the same inputs as the old, but the commission will be changed. Such an edited transaction will not be considered double-spending, since using the Replace-by-Fee option will avoid this. The nodes of the bitcoin network perceive the edited transaction as old, and it is transferred in the queue of the mempool to more attractive positions for miners.

Thus, if the commission is too small, then increasing it is normal practice if you need to expedite the operation. Do not neglect the RBF function and enable it before making transactions, this will allow you to play it safe in case the transfer is delayed in the queue.

The confirmation


Tony realized in time that, due to his greed, Cindy might not receive a gift at all, so he timely used the RBF function and increased the commission. The transaction, as expected, became more attractive for miners, and they included it in the next block - the transaction received 1 confirmation. With each subsequent block found, this transaction will receive 1 additional confirmation. When there are 6 or more such confirmations, the transaction is considered confirmed.

Transaction rate


Speaking about the speed of transfers, it should be understood that there is no definite value. But let's calculate it based on Tony's transaction and the data we have.

Condition:

Decision:

Answer: Every second, miners confirm 5 transactions, similar to Tony's transaction.

Of course, all these are approximate values, since the processing speed changes every second and depends on many factors. The main thing is that your transaction is taken from the mempool as soon as possible, and if this happens, then your transfer will reach the recipient within 1-600 seconds.

In fact, after the transaction is included in the block, the recipient can not only see the funds on his balance sheet, but also, under a certain condition, manage it. Fast, right? Yes, but what about the 6 confirmations rule? 6 blocks, 10 minutes each, total - 1 hour…

Bitcoin clients


It's all about the software that cryptocurrency holders use. Classic Bitcoin wallets will display the transaction as “unconfirmed” until it receives 6 confirmations (blocks).

Services that accept BTC as payment can set their limits on the number of blocks needed for confirmation (7, 10, 45, 214).

BTC, which are generated by the network as a reward for finding a block, can be used only after 100 confirmations, but classic bitcoin wallets will not display coins received for finding a block until 120 confirmations are collected.

The number "6" was not chosen by chance. With each new block, the transaction becomes less vulnerable to spoofing or change. To do something with an already confirmed transaction in a block, you will need to “rewrite” all subsequent blocks, and this requires very huge computing power and millions of investments. And the more confirmations a transaction receives, the more secure it will be.

But in such a powerful and stable blockchain as Bitcoin, it is more likely the requirement of the recipient of the transaction, and not a rule of the protocol.

Therefore, our Cindy and Tony use not a classic, but a very advanced and functional Bitcoin wallet. Thanks to the function of using unconfirmed transactions activated in it, Tony's outgoing transaction, after being included in the block, will be immediately displayed on Cindy's wallet. In this case, Tony will be able to immediately dispose of the change, and Cindy can receive the gift.

The link “SegWit + RBF + use of unconfirmed transactions” allows you to squeeze the maximum speed out of the BTC blockchain, which is important for non-custodian services.

Conclusion


Bitcoin is very complex and very technologically advanced. In one article it is impossible to describe all the subtleties and nuances of its work, but we still told you about its basics. Now you know what difficult journeys your coins make within just one single transaction between two wallets and at what speed. How and in what way the network protects itself from hacking, spam attacks, fraud or rash actions of beginners.

The stable operation of bitcoin equally depends on both miners and ordinary users, and the more participants there are on the network, the more secure and decentralized it will become.

Author: Kate Solano for Сrypto-Rating.com

Top Cryptocurrencies with Price Predictions

# Crypto Prediction Accuracy CVIX Price 24h 7d Market Cap 7d price change
1 Bitcoin (BTC) BTC Bitcoin predictions 82.8% 26 $66 761.99 0.55% 4.45% $1 314 502 789 636 BTC 7 days price change
2 Ethereum (ETH) ETH Ethereum predictions 75.2% 49 $3 256.83 2.60% 5.26% $397 486 344 226 ETH 7 days price change
3 Tether (USDT) USDT Tether predictions 91.2% 1 $1.000016 -0.04% -0.03% $110 465 256 295 USDT 7 days price change
4 Binance Coin (BNB) BNB Binance Coin predictions 86.8% 18 $608.40 1.18% 11.69% $90 976 368 352 BNB 7 days price change
5 Solana (SOL) SOL Solana predictions 64.8% 67 $158.26 2.58% 12.81% $70 747 775 002 SOL 7 days price change
6 USD Coin (USDC) USDC USD Coin predictions 93.6% 2 $0.999969 0% -0.01% $33 662 308 377 USDC 7 days price change
7 XRP (XRP) XRP XRP predictions 71.6% 60 $0.548016 -0.40% 9.68% $30 211 672 294 XRP 7 days price change
8 Dogecoin (DOGE) DOGE Dogecoin predictions 73.2% 59 $0.161737 2.41% 3.61% $23 292 217 670 DOGE 7 days price change
9 Toncoin (TON) TON Toncoin predictions 66% 67 $5.92 6.95% -8.98% $20 560 006 242 TON 7 days price change
10 Cardano (ADA) ADA Cardano predictions 66.4% 63 $0.507813 -0.67% 11.04% $18 095 374 280 ADA 7 days price change
11 SHIBA INU (SHIB) SHIB SHIBA INU predictions 62.4% 82 $0.000027 1.78% 20.27% $16 003 104 571 SHIB 7 days price change
12 Avalanche (AVAX) AVAX Avalanche predictions 70.8% 63 $39.30 1.97% 12.71% $14 856 715 340 AVAX 7 days price change
13 Polkadot (DOT) DOT Polkadot predictions 68.8% 59 $7.43 0.44% 11.48% $10 679 472 181 DOT 7 days price change
14 Wrapped Bitcoin (WBTC) WBTC Wrapped Bitcoin predictions 82.8% 24 $66 794.05 0.52% 4.47% $10 378 708 956 WBTC 7 days price change
15 Lido stETH (STETH) STETH Lido stETH predictions 95.6% 1 $2 941.39 -0.40% -3.32% $10 258 752 564 STETH 7 days price change

Be the first to receive Cryptocurrency Price Predictions and Forecasts daily

Get cryptocurrency price predictions, forecasts with analysis and news right to your inbox.

© 2015-2024 Crypto-Rating.com

The usage of this website constitutes acceptance of the following legal information. Any contracts of financial instruments offered to conclude bear high risks and may result in the full loss of the deposited funds. Prior to making transactions one should get acquainted with the risks to which they relate. All the information featured on the website, including information about the cryptocurrencies and bitcoin is intended solely for informational purposes, is not a means of advertising them, and doesn't imply direct instructions for investing. Crypto Rating shall not be liable for any loss, including unlimited loss of funds, which may arise directly or indirectly from the usage of this information. The editorial staff of the website does not bear any responsibility whatsoever for the content of the comments or reviews made by the site users about cryptocurrencies. The entire responsibility for the contents rests with the authors. Reprint of the materials is available only with the permission of the editorial staff.