What is a mempool? And what to do if the transaction fails?
All transactions which take place on blockchains must receive confirmations from miners. After confirmation, the transaction is recorded in the block and remains in the blockchain forever. As a result, it should take about 10 minutes to conduct one transaction.
Thus, everything worked a few years ago, when the cryptocurrency wasn’t as popular as it is today. To date, transactions can wait for their confirmation from several minutes to several days.
The number of people who use cryptocurrency is only growing every day, which leads to an overload of the blockchain network.
Initially, the bandwidth of the bitcoin blockchain was limited to 1 MB, today it is 2 MB. If the volume of all new transactions created in 10 minutes exceeds the allowed block size, then the remaining transactions have to wait for the next block. But during the waiting time, more and more new transactions are added, which slows down the speed of conducting and confirming transactions.
Due to the fact that the system doesn’t have enough speed to confirm all transactions in the allotted amount of time, a kind of “queue” of transactions is formed, which is called a mempool.
A memorypool (or mempool) is one of the stages of a cryptocurrency transfer. The coins are waiting for confirmation of the transfer there.
The mechanism of the whole process is quite simple:
The user decides to transfer any amount of coins to another one. The transaction is created when sending coins to another wallet.
This transaction is instantly sent to the meme pool. There it waits for the miner to select her for confirmation and conclusion in the block.
After being enclosed in a block, the transaction is automatically deleted from the mempool.
The mempool was created to protect the crypto currency from hacker attacks. The system gives limits on transactions, which reduces the likelihood of overload of the network. It’s on the principle of overflow of this system that most fraudulent network hacks are built.
With a standard network load, transactions take place in a few minutes and there are practically no queues. But with high user activity, the pools fill up and the network becomes overloaded, which leads to an increase in the cost of transactions and their slowdown. Accordingly, when the network is unloaded, the queues become smaller and the cost of operations also decreases.
One of the features of the bitcoin blockchain is the transaction fee (reward for the miner). The user must necessarily set it, but its size is determined by the user himself.
The fee can even be one Satoshi (0.00000001 BTC).
Naturally, this is beneficial to users, because there is no need to give a lot of money for a commission. It is a great way to save money. But for miners, this arrangement isn’t particularly profitable. Because of this, transactions with an increased commission are processed first.
This option of "unloading the network” isn’t a panacea and has its disadvantages:
A constant increase in the size of transactions
In order for the transaction to be prioritized and executed in the first place, the user will need to set the commission significantly higher than other users. In the future, this will lead to an increase in commissions and disadvantage for users.
Overcrowding of mempools
Despite the fact that transactions with a high commission will be carried out in the first place, transactions with minimal and low rewards will also continue to be added to the mempool. Therefore, the network will not be unloaded.
Spam attacks
It isn’t uncommon for hackers to arrange spam attacks on the blockchain. Usually they set a minimum fee for transactions to slow down the work of the system.
Then, Is there a way to speed up your transaction and to increase the chances that miners will notice your transfer in the first place?
According to experts, you shouldn’t neglect the size of the commission, the priority and speed of the transaction directly depends on it.
You can also determine the network load and the place of your transaction in the confirmation queue. This will help you to know approximately how long the operation will take to be processed. Having estimated the load on the mempool, you can refuse to perform the operation for a while. After a few hours, when the load decreases, you will be able to make a transaction.