The Lightning Network, the second layer protocol constructed on top of BTC to circumvent the inherent limitations of the small block BTC network on the viability of the protocol being used as a cash or micropayments system, has numerous glaring flaws, according to new research by Jerry Chan.
Two significant attack vulnerabilities that are endemic to the system were revealed in a paper published by University of Illinois researchers. These vulnerabilities could be used to annoy users by preventing them from accessing their money or stealing money outright.
For some who were against simply reverting the protocol to its initial state of having an unbounded block size, the Lightning Network (LN) was created in 2016 as a potential alternate solution to Bitcoin scaling. This was a welcome alternative for those who felt that keeping the block size limited to a maximum of 1 MB was necessary to maintain the protocol's decentralized nature. As long as an initial setup of "coin lockup" transactions was done in advance, through what they call payment channels, LN offered a scaling solution that would instead shift 90% of the transactions off-chain, onto a Layer 2 protocol, which would not require the base ledger for transactions.
One must lock up their BTC into channels before using it on LN, much like how you must preload your debit card with bank transfers or charge up your Starbucks coffee card before using it to make a purchase. But LN is even a little bit more intricate than that, unlike your debit card or Starbucks card. This is because your channels are bidirectional, which means that you must first build a channel with a particular counterpart, business, or individual before you can deposit your locked cash into an account that can be used by everyone.
In our illustration, it would be similar to using Starbucks to charge your card, as opposed to using a debit card. Why? You can pay with your debit card, I suppose.
Only Starbucks products may be purchased with your Starbucks card. So, depending on who you choose to set up payment channels with, there will be a difference in the range of usage options available to you. Because LN enables the chaining of payment channels, a user named Alice who has channels open with Bob and Charlie will be able to pay Charlie through Bob without any issues. At least conceptually. But the theory rarely holds in practice.
Depending on who they have channels established with and the liquidity condition of their channels, Person A with $100 locked-in channels may be able to purchase a coffee at Starbucks through LN, but Person B with $100 locked-in channel may not (which is a fancy way of describing whether they are net debtors or creditors on their channels). Let's just say that LN is not a straightforward protocol, what with its many levels of complexity, fines for violating channel state, routing through channels, fees for routing, etc. All to circumvent the problem of settling a straightforward Bitcoin transaction on the main chain, which has an artificial block size limit that was self-imposed and restricts direct use of bitcoin to those who can afford to pay exorbitant fees.
The two ways that the Lightning Network can be exploited
An attack motivated by grief is the first type. Essentially, it's a type of cyber-vandalism.
The study demonstrates that the backup of unprocessed transactions on the main chain enables a purposeful denial-of-funds assault on LN known as a "zombie attack" due to the historical congestion characteristics of a block size-constrained BTC. Simply put, it suggests that attackers may launch many channels, wait for a period of intense network congestion, and then switch their LN nodes to be unresponsive.
If any of the primary LN payment channels are included in their channels, many LN users may not be able to access or move their BTC. Even worse, the users' only option in the event of such an attack would be to attempt to forcibly shut down their unresponsive channels on the primary BTC network. Millions of LN users attempting to close their channels at the same time would only serve to exacerbate the problem if the attack occurred during a time of high congestion. This would result in a negative feedback loop, which could result in delays of up to 500 blocks or several days and skyrocketing fees.
In these circumstances, only the wealthy are ready to pay $50 or more in transaction fees to have their transactions completed, which is hardly a fair financial system for the unbanked and certainly not the micropayment network that Satoshi Nakamoto envisioned in the Bitcoin White Paper. A block size-constrained BTC protocol is inherently susceptible to this negative feedback effect, where the reaction to the attack leads to the problem getting worse. LN just complicates matters by increasing back pressure during these periods of intense network congestion.
The second attack method is more worrisome.
The researchers used the present architecture of the LN network to predict how many nodes would have to cooperate to effectively steal funds during such periods of historical congestion on the BTC network, as opposed to being just a kind of vandalism or inconvenience. (Spoiler: It's just thirty.) Attackers on LN purposefully attempt to post invalid close channel transactions to the main chain to their advantage during this attack, which is a type of double-spend attack.
For instance, if Alice and Bob started with a channel balance of 5-5, which means that each of them contributed $5, after the end of a few payments, the channel would now stand at 10-0. In other words, Bob could still attempt to publish an old channel close attempt with the initial state of 5-5 even if Alice has all the coins on her side. The "Watchtowers," which are community-run services that monitor the network for these fraudulent close transactions, would often spot this and publish a "punishment" transaction to punish Bob for trying to take five coins from Alice.
However, as the paper demonstrates, users may have been able to effectively double spend coins on the main network in front of the punishment transactions by paying a fee that was high enough to make the BTC miners prioritize the fraudulent channel closing transactions through a coordinated flood of numerous such attacks that occurred during times of network congestion. Because of this, the BTC miners are unable to distinguish between legitimate and fraudulent LN channel transactions. This is the fundamental problem with partitioning the transaction security model into long-lived payment channels on LN.
This should worry you if it does. LN has been hailed as the BTC of the future. But now, research is finally catching up to intuition. Of fact, when LN was first introduced, a lot of people, including myself, cautioned against the possibility of such difficulties. But regardless of whether it was convenient or well-funded, the LN experiment had to be investigated, since the myth that Bitcoin cannot risk having unlimited block sizes because it would collapse under the weight of its success persists to this day. This theory has been refuted by BSV.
Man will constantly try to find a method to stop nature because it always finds a way.
You must be logged in to post a comment.