How Do Bitcoin Transactions Work?

How Do Bitcoin Transactions Work?

Blockchain: A New Method of Storing Transactions

The basis of any electronic payment system is the ability to store transaction data. This is where the blockchain comes in: it can store information about transactions in data blocks, where the next one is inserted on top of the previous one.

In Bitcoin, each block stores a list of recent transactions and a block header (the latter one — in the form of a hash that needs to be decrypted). Together all blocks contain data on all transactions that have ever been made with Bitcoin. If you have enough time, you can trace the path of each coin, from its creation to the wallet in which it’s now located.

The entire blockchain can be stored on the computer of each user, and they can independently contribute to adding subsequent blocks. This makes Bitcoin completely decentralized.

All information is public, and stored in millions of databases, which must have a consensus on everything with each other. No one has the opportunity to change the data retrogradely. Even if some powerful organization wanted to damage the network, the data of all other users would deny them this attempt and keep blockchain immutable. There are even separate websites — for example, Blockchain Explorer — where you can see any information about blocks and ongoing transactions in real time. This level of transparency cannot be achieved by any financial company in the world, neither by Visa, nor by PayPal, nor by MasterCard.

New blocks (whose hash was computed by miners) are added to the blockchain every 10 minutes. This is necessary because these blocks store new transactions that have been made during this period. The system automatically adapts to the total power connected to it, complicating or simplifying the complexity of block generation in order not to deviate from this ten minute value.

How Are Transactions Implemented in Bitcoin

When people transfer money from their wallet to some other address, it is all recorded on the blockchain, like a ledger. Each such entry indicates where the money was taken from and where it was transferred. This whole system is built on the fact that money cannot be taken from nowhere, and the path of any coin can be traced in the end.

The process works like this:

  1. A user makes a request for a new transaction, wanting to send their money.
  2. This information is sent over the Internet to everyone else — especially to those users who are busy generating the next block (miners).
  3. They add this information to their block and keep trying to calculate its hash.
  4. At some point, one of them succeeds. Then this block is sealed, distributed over the network, and automatically checked by other participants for validity, including the validity of all transactions contained within it.
  5. If consensus is reached and the participants agree that there is no problem, this new block is added to the blockchain. The data that all these transactions went through appears on the network. And the miner who calculated it gets his BTC reward.

After this, the entire process is repeated again with other transactions that have accumulated over the previous 10 minutes.

Of course, everything is a little more complicated. For example, as an extra precaution, a transaction is considered approved only after six or more confirmations. That is, it is necessary that six blocks are calculated on the network, each of them saying that such a transaction was in fact carried out.

This automatically means that Bitcoin transactions must take at least one hour to complete. But it may take even more time — say, if the miners specifically do not want to accept your transaction into their block (for example, because you set very low gas fees). Luckily, your money won’t get stuck in limbo. In this case, the system also has a solution. Unconfirmed Bitcoin transactions can be changed or canceled if the blockchain consensus does not approve them within 24 hours.

Generating Bitcoins Through Transactions: How Does It Work?

The total number of coins at the beginning of a transaction is always equal to the number of coins at the end (excluding gas fees, which are paid to miners for their work). This is the rule on which the Bitcoin blockchain technology is built. So where does the new money in the system come from?

The fact is that in each new block, the first transaction differs from all the others. It reports the creation of a certain number of coins for the wallet that was responsible for calculating this block. This is how new tokens gradually enter the system.

This award is constantly decreasing — twice every four years. Back in 2009, when Bitcoin first launched, the miner received 50 BTC for computing each block, and now the average is only 6.25 BTC. But due to the rising price of Bitcoin and regular gas fees, the system still remains profitable for participants. And the amount of BTC in the network is increasing every year, albeit not by much.

By the way, the design of the system also means that in the year ~2140 the production of new bitcoins will stop. In total, 21 million coins will be mined. After that, a new BTC will enter the network, and miners will receive their money only from gas fees, as payments for conducting transactions.

Transaction Fees in Bitcoin

A feature of Bitcoin is the absence of any intermediaries, due to which the commission for a transaction here can be much lower than through traditional banking. But when Satoshi Nakamoto created the first blockchain, he introduced a fee so that people could not spam transactions and thus slow down the network.

The commission that you are willing to pay in the Bitcoin network, the same as in Ethereum, and many other crypto projects, is set by the user himself. Naturally, it is more profitable for miners to conduct those transactions that have higher fees attached to them, and this is how they set up their software. Therefore, if the network is currently busy and you need to complete the transaction as quickly as possible, you need to set a higher commission rate, even up to ten dollars.

However, if you don’t mind waiting, paying just 2-6 Satoshi/vByte will usually get your operation confirmed within 24 hours. Even at the peak of the BTC market, this is less than $3 per transaction.

You can see the current cost of transactions in the Bitcoin network here.

Why Transactions With Proof of Work Are So Valuable

Proof of work is a result that is difficult to achieve, but easy to verify. Such is the nature of hash functions. And the entire Bitcoin blockchain is built on this principle. You can check the trueness of the result of the work of the miners in a split second. But in order to actually solve the hash, you need many tens of hours of work of powerful machines. Indeed, it is very similar to gold: it takes a lot of work and time to mine it. But you can understand that its gold is in front of you almost immediately.

This is why the comparison of Bitcoin with digital gold has come up in recent years. And while other currencies are increasingly moving towards more environmentally friendly and less expensive proof of stake, mining gold, the backbone of the entire economy, will always stay difficult and costly.

Polkapad is a launchpad for crypto projects. It helps investors find promising startups that can offer significant returns, and helps founders connect to the community. Join us if you want to start or participate in a successful crowdsale.

You may be interested

Learn basics in our free Wiki section!