{"id":19752,"date":"2019-07-16T19:54:46","date_gmt":"2019-07-16T19:54:46","guid":{"rendered":"http:\/\/ci027cfe7aa0302697"},"modified":"2025-01-27T21:43:38","modified_gmt":"2025-01-27T21:43:38","slug":"bitmex-research-confirms-lightning-justice-works","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/technical\/bitmex-research-confirms-lightning-justice-works","title":{"rendered":"BitMEX Research Confirms Lightning \u2018Justice\u2019 Works"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/bitmex-research-confirms-lightning-justice-transactions-work.jpg\" title=\"\"><\/figure>\n<p>The Lightning Network, as Bitcoin\u2019s second layer for instant payments and greater transaction privacy, requires a matching degree of security robustness. However, due to the differences in its architecture from Bitcoin, the means to guarantee the honesty of participants can\u2019t rely on the same Nakamoto Consensus design. The intricacies of payment channels and network synchronization must punish malevolent operations in an efficient way which deters such behavior. <\/p>\n<p>This is exactly why section Pi (3.1.4) of the <a href=\"https:\/\/lightning.network\/lightning-network-paper.pdf\" target=\"_blank\" rel=\"noopener\">Lightning Network white paper<\/a> introduces a game theory mechanism through which malevolent parties who violate their agreement lose all the money in the channel. After testing this \u201cJustice Transaction\u201d system, the BitMEX Research team <a href=\"https:\/\/blog.bitmex.com\/lightning-network-justice\/\" target=\"_blank\" rel=\"noopener\">recently published empirical evidence<\/a> which seems to demonstrate its efficiency and efficacy. The data has been collected by the research team since Lightning\u2019s mainnet deployment in late 2017, and the numbers look very promising.More specifically, even in the absence of the upcoming <a href=\"https:\/\/bitcoinmagazine.com\/articles\/watchtowers-are-coming-lightning#!\">watchtowers<\/a>, there have been 241 instances in which cheating has been prevented automatically by the client software. The total saved this way amounts to 2.22 BTC, potentially. <\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/picture1.png\" title=\"\"><\/figure>\n<p>&#8220;This does not necessarily mean thieves tried and failed to steal 2.22 BTC, as the dishonest nodes may have punished thieves by an amount larger than the value they tried to steal,&#8221; the report notes.<\/p>\n<p>Furthermore, it points out that it is \u201calso possible that many of the 241 justice transactions do not indicate genuine dishonesty; for instance, it could be users testing the system, where the same user owns both lightning nodes in question. For example BitMEX Research is responsible for 5 of the 241 justice transactions, when there was no victim, as BitMEX owned all the nodes and funds.\u201d<\/p>\n<p>Lightning Labs CEO Elizabeth Stark echoes the clarification that these preventions don\u2019t necessarily indicate attempted fraud.<\/p>\n<p>&nbsp;\u201cI believe most of those were either tests or errors where the funds were returned. So the marketing as \u2018thieves\u2019 is misleading,\u201d she said.&nbsp;<\/p>\n<p>The next section will describe the nature of \u201cJustice Transactions\u201d and how malevolent actors can attempt to steal funds from offline channels with which they are connected. As a way to preemptively counter theft, you should never leave your node offline for longer than the consensual time established for closing channels without consent (usually 24 hours).&nbsp;<\/p>\n<h3><strong>What Are Lightning \u2018Justice Transactions\u2019?<\/strong><\/h3>\n<p>Let\u2019s consider the never-ending transactional affair between Alice and Bob. If they open a Lightning channel between themselves, then they can send each other BTC amounts proportional to the input value. For the sake of convenience, let\u2019s say that they both put in 1 million satoshis (0.01 BTC).<\/p>\n<p>If Alice and Bob both keep their nodes online at all times while transacting, then everything is going to be just fine. It means that, whenever either party decides to close the channel, they\u2019re going to have a consensual scenario where the amounts returning on the main chain follow the exact history of transactions. This can happen cooperatively if they both close the channel, or non-cooperatively if only one of them initiates the settlement and the established closing time passes without an action on the other side. However, this is the ideal state of affairs where nobody can become a victim of theft.&nbsp;<\/p>\n<p>In order for Alice to steal Bob\u2019s funds, she must attempt to close the channel non-cooperatively (without the knowledge of the other party) and speculate at a moment when the other side is not online. If these conditions are met, then Alice will broadcast an older channel state and hope that Bob will not get online within the established time (usually 24 hours) to automatically set the record straight.&nbsp;<\/p>\n<p>Bob\u2019s node knows that the transaction history is different from Alice\u2019s malevolent revisionism, and it will engage the justice system if the internet connection (or power) gets restored before the time limit. If Alice is successful in her attempt, then she will irreversibly steal funds she illegitimately requested from Bob due to the channel closing and the transaction being written in a Bitcoin block. But if Bob returns within the time limit, then Alice will be penalized by losing all of the 0.1 BTC she put in the channel.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/picture1-1.png\" title=\"\"><\/figure>\n<p>In order to test the efficiency of the \u201cJustice Transaction,\u201d the BitMEX research team replicated the steps described above with two of their nodes. The result was positive and pointed toward a great efficiency of the system \u2014 their \u201cBitMEXThief\u201d node has lost the 400,000 satoshis with which it opened a channel with \u201cBitMEXResearch.\u201d<\/p>\n<p>This kind of experimentation is useful at a social and engineering level: It creates a greater amount of trust in Lightning by proving its security, while also helping developers understand where their efforts should be directed. As adoption grows and more users integrate the quick and private transactions on Bitcoin\u2019s second layer, the robustness should follow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BitMEX Research has confirmed that the Lightning Network\u2019s Justice Transactions system can effectively prevent cheating.<\/p>\n","protected":false},"author":3423,"featured_media":12313,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[1536,2989,1252,460,330],"class_list":["post-19752","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technical","tag-bitmex","tag-elizabeth-stark","tag-lightning-labs","tag-lightning-network","tag-security"],"author_data":{"id":3423,"name":"Vlad Costea","nicename":"vladcostea","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/dcf8df0c5a9b46a72d343c10a23bf0777a27a34001a19284e14f1439f3bfacca?s=96&d=robohash&r=g"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/bitmex-research-confirms-lightning-justice-transactions-work.jpg","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/19752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/3423"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=19752"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/19752\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/12313"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=19752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=19752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=19752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}