Can miners attack lightning network making it unusable with the hope that the transaction are forced to be processed on-chain, and they earn more transaction fee?


As a miner, you can pick and choose which transactions you include in the blocks templates you are working on. Usually, miners will choose the transactions that pay them the highest fee rates, and while this is not required, it is the most economically viable approach, which is important in a highly competitive industry.

The only way miners could 'attack' the lightning network is by not including lightning channel open/close/etc transactions in their block templates. But if any one miner, or even a small group of miners decides to not include these transactions, it won't matter too much, as other miners will probably happily include them, in order to get the transaction fees. This is the plight of a miner that is ignoring/censoring certain transactions: they will miss out on the fees, which will affect their profitability (it goes down), and the profitability of other non-censoring miners (it goes up). In a highly competitive industry, this obviously isn't ideal, you don't want to do things that hurt you and benefit your rivals.

If a majority of miners decide to censor lightning transactions (including by making any blocks that include them stale), then lightning transactions could indeed be withheld from the chain, but the usual caveats to a 51% attack will also hold true: doing so would undermine confidence in the network, and thus hurt its value. If we assume the miners are acting in a rational manner, with the goal of not losing money, then it certainly isn't clear that performing a 51% attack to shut down the lightning network is the way to do this. I would argue that the opposite is true: censoring lightning transactions will cause the miners to lose money.

Another important point: how will the miners know which transactions are lightning related? You may be thinking something like "taproot will hide the nature of the scripts that encumber the lightning UTXOs!", but I think we could assume that any miner wishing to censor lightning transactions would be running a lightning client of some sort that is listening for channel-related gossip, thus allowing them to discern which UTXOs are related to lightning channels. So I think that miners would only really be able to censor transactions that close/etc an already-open channel, but censoring the creation of new channels won't be possible in the best case scenario. (Happy to be corrected here, but thats my first thought based on my understanding of it).

More generally, I think the idea that miners will want all transactions to happen on-chain is very naive. Block space is limited, so the way to maximize fees collected is to maximize the economic activity happening within each transaction/block. A lightning-channel-related transaction that accounts for hundreds/thousands/etc of individual payments will be reasonably capable of paying far more in fees, compared to a transaction that only represents one single payment.

To put it differently, where would you expect to make more money: by processing a transaction that allowed someone to buy their lunch? Or by processing a transaction that allows thousands of lunches to be bought?

Miners will make far more in revenue by hashing on a network that has a well-adopted lightning network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.