At the beginning of the way of studying the work of cryptocurrencies and blockchain networks, many of us do not understand how networks work, why bitcoin transactions are confirmed for a long time, and how network confirmations appear. You can read about some technical details and the approximate calculation of the transaction confirmation time in our other articlе. Now we want to talk about this in a simpler language, using the example that everyone understands — train traffic.
A brief example model:
- passengers — transactions
- trains — new blocks appearing on the network
- station — mempool network
- ticket price — miner fees
- controllers and engine drivers — miners
- the number of trains that left the station after the passenger boarded with the train — the number of transaction confirmations
Any blockchain network must be supported by miners; they mine new blocks. Imagine that blocks are trains that arrive at the station approximately every 10 minutes. But the time interval between trains is always different and no one knows when there will be a new train. It happens that trains run every 2 minutes, and it happens that for more than an hour there are no new block trains.
When you want to transfer cryptocurrency, a new transaction is created. Imagine a transaction as a passenger who wants to get on a train. While the passenger transaction is at the station, it is located in the network mempool, that is, it is not yet part of the blockchain.
For a ticket for a passenger transaction, you can pay any cost, even zero, but the miner controllers plant first of all those whose price per unit of weight will be higher. And everyone sees who has set what price. The transaction fee is the price for boarding the train block and it is set before boarding the train. The set price can only be changed by replacing the passenger transaction itself.
A block train is limited in the weight of passenger transactions that it can accept. Each new train comes with a different number of wagons and can accommodate a different number of passengers. For bitcoin, an average of 2500 passenger transactions can get into an incoming new train block. If the number of passengers is large, and new trains do not arrive, large lines are formed. In this situation, each of the network users may fall.
After the passenger-transaction left the mempool station, hitting the block train, it has its first network confirmation.
After the first confirmation of the transaction, the user who received it can immediately dispose of the funds received, if this is not prohibited at the protocol level of a particular blockchain network. Exchanges and exchangers can overestimate the required number of confirmations for their security.
Each new confirmation will appear only with new block trains that will pick up new passenger transactions from the station. That is, if you need 5 network confirmations, you need to wait for 4 more new blocks after the one in which the desired transaction fell.
Imagine that at a certain point in time the mempool station is quite empty and the ticket price was chosen high to get into the first train block. But an hour passes, and there is no new block train. The number of passenger transactions has already grown significantly and new arrivals set the price-commission already much higher than the initial one in order to get on the first train as well. As a result, a passenger-transaction can get into the train-block only after a few hours, and the sender or receiver will be very unhappy with this outcome.
Sometimes a transaction can be replaced, but it depends on the capabilities of the cryptocurrency wallet and available funds.