Scalability and the cost-effectiveness of small transactions (micropayments) have always been the topic of discussion in the digital currency community. One of the innovative solutions to solve the scalability problem is to transfer transactions from the main network to the second layer. The Lightning Network was created to implement this solution in the Bitcoin blockchain. Thousands of people from all over the world have set up Lightning nodes to provide sufficient infrastructure for the operation of this network; But this network is facing problems like channel jamming.
Currently, the Lightning Network is the most popular Bitcoin scaling solution; But there are shortcomings and problems that must be addressed if Bitcoin is to be widely used for daily payments. One of these shortcomings is an issue that paves the way for an attack known as “channel jamming” and threatens the security of this network.
In this article, we are going to explain this type of attacks in simple language so that those who use the Lightning network will be more familiar with this issue. At the same time, the reasons for its importance and the ways to prevent such attacks are the topics that we will mention in the following. We invite you to stay with us until the end of this article.
What is a channel jamming attack and what are its types?
One of the attacks that may happen in the Lightning network is that an attacker sends a large number of transactions to his address and thus blocks the payment channel. This is called channel closing attack. To understand what a channel blocking attack is, we first need to understand how the Lightning Network works.
The Lightning Network is a second layer built on top of the main Bitcoin blockchain, making transactions faster and much cheaper by creating channels for micro-payments outside of the main network. As you know, to perform any transaction, two parties are needed, which we call “sender” and “receiver” here.
In the Lightning network, the sender and receiver first create a two-way payment channel by creating a multi-signature address and sending some bitcoins to it. This channel is actually created by registering an open transaction in the form of a locked balance in the main Bitcoin blockchain. Users can send locked Bitcoin to the other side of the channel in as many transactions as they want on the Lightning network.
After completing the transactions, the sender and receiver close the channel and settle. When the channel is closed, the settlement transaction is sent to the main blockchain, making the transaction that was originally made on the main Bitcoin blockchain final and closed.
Now that you have an overview of how the Lightning Network works, let’s explain the channel closing attack. This attack happens when a malicious user sends a transaction or several transactions to himself through a third party channel; But don’t send the secret string of transactions. In such a situation, the transaction or transactions sent by this user will be suspended in the payment channel. This will complete the capacity of the channel and lock the liquidity or the accumulation of unfinished transactions in that channel. A channel blocking attack is similar to a denial of service or DDoS attack.
Channel jamming can be done in two ways:
1. Amount Jamming: In this method, the attacker locks a large part of the target channel capacity. It should be noted that each channel created in the Lightning network can transfer a certain amount of Bitcoin, which we call channel capacity. In this attack, the attacker sends an incomplete transaction with the maximum processable capacity in the channel, causing the capacity to be filled and locked.
2. Slot Jamming: Each channel has a limit on the number of uncompleted transactions in addition to the limit on the amount of bitcoins sent. In multiblocking, the attacker sends a large number of unfinished transactions to fill the limit of pending payments. Each channel can only have 483 pending transactions in each direction, which is technically due to Bitcoin’s limit on the number of transactions. When the number of pending transactions reaches the maximum, that channel is no longer able to process more transactions.
Both types of channel jamming attacks close the target channel; But the process Number blocking It usually costs less than capacitive blocking. The attacker needs a balance of bitcoins for both types of attacks; But a large number of low-volume transactions are cheaper for him than a transaction with dimensions equal to the capacity of the entire channel.
The reasonLWhat is channel jamming?
Attackers can have different reasons to perform channel blocking attack. One of these reasons is the attack on the Bitcoin network itself. An attacker with such motivation can block all the network channels with this type of attack and cause a large part of the network to be disabled. Such a massive attack requires a lot of capital; But considering that the Bitcoin network is growing and becoming an alternative to government financial systems, it should not be underestimated as a possibility.
Another motivation to carry out a channel blocking attack can be formed among competing stores. The Lightning Network is one of the most used payment tools in stores, and many stores around the world are using it now. One of the stores may organize channel jamming against it to eliminate its competitor. This can cause a heavy fee for that store, and by blocking the payment channel, it can direct its customers to a rival store.
Lightning network node operators may also be from Jamming channel use against each other. One of the node operators may target the competitor with channel jamming in order to block the communication channels of the rival node with similar connections in order to damage its credibility. By doing so, the connections of that node forward their transactions to the attacker node.
Why is channel blocking attack so important for Lightning network?
Possibility Number blocking attack It depends on the Lightning network channels and some technical limitations of the network; Therefore, it can be said that one of the solutions to remove the risk of jamming attack is to remove the technical problems of the protocol and the existing limitations.
By making changes to the Lightning network protocol, the limit of pending transactions can be increased. To do this, the structure of the Lightning Network’s on-chain transactions can be modified to accommodate more transactions, or the Bitcoin blockchain itself can be modified to support more entries for transactions related to the Lightning Network.
The possibility of channel jamming is a wake-up call for Bitcoin fans. Many expect Bitcoin to crash or at least cause short-term damage to it, and this could be done through vulnerabilities in the Lightning network. Of course, we should not forget that this network still has room for improvement and more trial and error. As our knowledge of security and scalability issues increases, the Lightning protocol continues to mature and become more robust.
How to prevent channel blocking attacks?
One of the factors that reduce the motivation to attack is the financial cost and opportunity cost related to external factors. Every attack has a cost and the attacker attacks if the benefit is greater than the cost. The most obvious cost of the channel closing attack for the attacker is that he has to have some bitcoins and pay two transaction fees (the channel opening transaction and the channel closing transaction) on the Bitcoin blockchain.
The issue of cost in the process of blocking a number is not very important; Because 483 transactions can be done with the minimum bitcoin required for each transaction. For example, if we consider each transaction to be 10 satoshis, the total cost would be 48,300 satoshis (0.000483 bitcoins), which is a small amount. However, to block the capacity in which the entire capacity of one channel or in the case of expansion, the capacity of several channels must be blocked, a significant cost is required, and this itself can reduce the motivation of the attack. Of course, if the attacker has a serious motive, the issue of cost will not matter much.
In order to prevent channel blocking attacks, there are solutions that require changes in the Lightning network protocol or the Bitcoin blockchain. One solution is to increase the maximum number of pending transactions per channel. In this case, the cost of channel jamming attack for the attacker increases; Because it has to send more transactions. However, this solution does not eliminate the possibility of an attack; Rather, it makes it less.
Another proposed solution is to consider two types of limits for the number of pending transactions: one for very small transactions and one for larger transactions. It is important to remember that very small amounts of Bitcoin are not transferable in this blockchain. The transfer amount must be more than the network transaction fee to be able to deduct the fee from it. The smallest transferable amount of Bitcoin is called Dust.
The limit of 483 transactions has no meaning for transactions less than dust; Because this amount of bitcoin is not transferable at all in the main network. Consequently, it seems reasonable to consider this limit only for transactions larger than dust. If such a double restriction is applied, it is no longer possible to track heavy transactions with Number blocking process and blocked through a multitude of insignificant transactions; That is, the attacker must produce at least 483 transactions with a large amount to block large transactions. Such limitation increases the cost of channel closing attack. However, this solution does not significantly affect the capacity blocking process.
Antoine Riard and Gleb Naumenko have also suggested that transaction fees be charged based on the time it takes for the transaction to be completed. In other words, time units for the interval between sending and completing the transaction are defined and a fee is determined for each time unit. Thus, the longer the transaction is suspended, the more fees are charged to the sender of the transaction. This makes pending transactions costly for the user.
Another solution to prevent attacks is to close the extension channel intended for nodes. Nodes, by installing this extension on their software, limit the number of passing transactions and prevent a massive influx of transactions. These plugins also allow nodes to increase the number of transactions for their trusted nodes.
Lightning network is one of the important solutions for Bitcoin scalability, which is placed as a second layer on this blockchain. Lightning faces risks, one of which is the possibility of channel jamming attacks. In this article, we examined this type of attack and explained how it is done and its types. Also, we reviewed the suggested solutions to prevent it.
As we said, there are two types of solutions to prevent the channel closing attack, one of which is related to the modification of the Lightning protocol and the other to the modification of the main Bitcoin blockchain protocol. Although these solutions are an obstacle in the way of attackers who intend to attack jamming and make it difficult to carry out this attack, it is impossible to completely eliminate the risk of this attack while maintaining the permissionless nature of the Lightning network.
It should be noted that the solutions to prevent channel jamming are limited; But these few methods can be used on the protocol of this network and nodes. Of course, more basic solutions require more research and broader issues. It should be seen how the Bitcoin community and the Lightning network will try to solve this problem so that this digital currency will continue to grow and expand.