Bitcoin is considered the most secure cryptocurrency in the world. In almost12 years of its existence nobody has managed to successfully attack the network and to disrupt or manipulate even a single transaction. Therefore, the trust is extremely high, which is also very important, because in a decentralized network there is no central institution that could be held liable for errors.
Anyone who has already tried Bitcoin and made their first small transactions has already noticed that the cryptocurrency can be sent very quickly, extremely conveniently and very easily. Many users do not even know however, how a transaction actually work and what Bitcoin transactions represent in Bitcoin decentralized ledger.
In this article we want to get to the bottom of the matter and discuss how transactions in the Bitcoin network work and what significance they have.
The Bitcoin Blockchain as Distributed Ledger
Many beginners are subject to the misunderstanding that they send and receive Bitcoin. This is of course the case, but nobody actually has his Bitcoin in his wallet. Instead, each wallet is connected to a copy of the Bitcoin blockchain. This blockchain is a special database whose properties guarantee that it cannot be manipulated by anyone.
Bitcoin is therefore not sent as a physical or digital good, but entries are changed in the blockchain that determine who owns which sum. The sending and receiving addresses are known as public keys. To each public key belongs a private key, which allows to control its counterpart. So, if you transfer Bitcoin, you basically change an entry in the database, and in order to be able to do so, you need a cryptographic key to sign the transaction and make it happen.
In this sense, there are no Bitcoins at all, only corresponding entries. The special feature is that these entries are not stored on the Bitcoin addresses. If one wants to know how many Bitcoins have been transferred to an address, the account balance of an address results from the transfers made on the blockchain.
What are the components of a Bitcoin transaction?
Such a transfer on the blockchain consists of three main components. First, the transaction starts with the input. It is this sum, which shall be transferred and which is defined by who transferred it to a certain addressor received it as an output before.
The second aspect is the quantity, because even if an address received 1 BTC before, it can output only a fraction of it. Thus, the quantity is clearly limited to the total balance, but can be reduced to fractions of a Bitcoin.
The third and last step is the so-called output. This is simply the address of the receiver, which shall get a certain quantity of a previous input credited.
UTXO as a special concept
In principle, the Bitcoin that you receive and store is the output of a previous transaction that you have not yet spent. This concept is called UTXO or "Unspent Transaction Output". It is essentially different from other cryptocurrencies or classic transactions with banks because they are based on an account balance.
You collect in your wallet all transaction outputs that you have not yet spent. The wallet software adds up the amounts and gives an account balance in BTC. This is done simply because users get a better overview and the idea of having an account is simply more intuitive.
Assumed a Wallet has altogether 3 Bitcoin, which come from 8 different outputs, and one wants to dispatch2 BTC in a new transaction, then the Wallet feeds the new transaction in the background automatically from the 8 received transactions and/or outputs and forms thereby the input for the new transaction.
This is a very complex system and scales comparatively poorly. Why Satoshi Nakamoto decided to use this system at that time cannot be clearly proven.
Transaction fees in the Bitcoin network
Of course, there are also transaction fees, which can be set at different levels. In principle you pay a price for the fact that the miners have an incentive to confirm the transaction faster than everyone else’s transaction in the network. Once the miners have confirmed the transaction, the corresponding entries on the blockchain are bindingly and irrevocably changed.
This means that users of the network are in competition for the miners' attention. Transactions that pay a high fee are preferred over those with lower fees. But there is no point in paying too much.
Instead, based on the actual bids for the transaction fees, a threshold value results that must be exceeded to achieve a certain speed. To explain it in an example: Suppose you want to drive from one part of town to the next and compare two means of transport with different speeds. There is the bus, it is slow because it goes to many stations and it costs 3€ for the trip. Alternatively, you can choose the cab, which goes directly to your destination and is therefore much faster. But the cab costs 15€. You could offer the cab driver 30€ and he will gratefully accept the amount, but you will not get there faster. The same applies to the bus. While with cabs and buses the prices are transparent, the transaction fees must be determined with Bitcoin.
Many Wallets determine the necessary threshold value automatically and give the user not only the price for the transaction but also an estimated confirmation time for the transaction. In this way one offers -to remain within the example -always the suitable sum to its cab driver, in order to get the highest speed at the lowest price.
Alternatively, you can set the amount of the fee yourself and research which fee is best for you. Most of the time, however, you cannot achieve a better ratio if you do not follow the recommendations of the software.
What to do with your change?
The UTXO model, which we have now got to know, has another peculiarity. In order to form the input of a transaction, the available amount must be completely consumed. So, if you received 2 BTC at one address and now want to send only 1.5 BTC, then 0.5 BTC of change are needed.
This change is automatically sent to a new address, over which the sender has control. The wallet automatically keeps a record of these change addresses in the background. Users don't even notice that they have these change addresses at all.
Nevertheless, it is important to know that these addresses are created. This is because this circumstance plays a role especially in Bitcoin's self-custody. If you save individual private keys, you can make fatal errors when restoring individual addresses. Therefore, instead of saving individual private keys, you should always save the wallet file or the so-called seed. This restores all keys, also those of change addresses.
TIP: Alternatively, you can also use the LiteBit Wallet directly. This way your BTC gets professional protection and you don't have to worry about anything anymore.
How long does a Bitcoin transaction take?
If you want to evaluate the speed of a Bitcoin transaction, you have to distinguish between two things. In principle, the transaction is immediately visible on the network. It is located in the mempool immediately after sending and waits for confirmation. In this sense, Bitcoin transactions are immediately valid.
The problem is that one can only be sure of validity when one has at least received a confirmation from the network. A transaction is considered absolutely secure if it has 6 confirmations.
To receive a confirmation, a new block must be added to the blockchain. The creation of a new block takes about 10 minutes, but can also vary minimally. Therefore, it takes at least these 10 minutes to confirm the transaction. Thus, the transactions are immediate, but can be used by the recipient only after 10 minutes at the earliest.
If the recipient attaches particular importance to security, then more than one confirmation by the network will be required until he considers the transaction valid. This is particularly often the case when using Bitcoin for payment because merchants want to be absolutely certain.
How can I verify transactions?
A Bitcoin transaction can be checked as sender or recipient directly in your own wallet. If one wants to check the transactions of other participants, the simplest means is a so-called block explorer.
These are often web pages that allow to check on transactions from Bitcoin addresses or the so-called TXID via a simple input field. The TXID is a unique identifier that is assigned to each transaction and reveals the details. In this way, every Bitcoin transaction can be checked at any time.
This transparency is a feature of Bitcoin. It enables the participants to control all facts relating to the transactions made in the network. This is intended to ensure that all participants can rely on the network protocol because they cannot only rely on the nodes and miners, but in case of doubt everything is and remains verifiable. This transparency, however, again raises privacy concerns, because the participants are not anonymous and the blockchain is public.