<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ayelet Lotem (Mizrahi) on Medium]]></title>
        <description><![CDATA[Stories by Ayelet Lotem (Mizrahi) on Medium]]></description>
        <link>https://medium.com/@ayelem02?source=rss-188f8ffb4164------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*yEPLiDCYTZgT1Cy6sSGkHg.png</url>
            <title>Stories by Ayelet Lotem (Mizrahi) on Medium</title>
            <link>https://medium.com/@ayelem02?source=rss-188f8ffb4164------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:56:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayelem02/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Sliding Window Challenge Process for Congestion Detection]]></title>
            <link>https://medium.com/blockchains-huji/sliding-window-challenge-process-for-congestion-detection-b0567e991958?source=rss-188f8ffb4164------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0567e991958</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[congestion]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Ayelet Lotem (Mizrahi)]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 11:43:11 GMT</pubDate>
            <atom:updated>2022-06-17T07:56:24.124Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.cse.huji.ac.il/~ayelem02/">Ayelet Lotem</a>, <a href="http://www0.cs.ucl.ac.uk/staff/S.Azouvi/index.html">Sarah Azouvi</a>, <a href="https://stonecoldpat.github.io/">Patrick McCorry</a>, and <a href="https://www.avivz.net/">Aviv Zohar</a></p><p>[Links to <a href="https://arxiv.org/pdf/2201.09009"><strong>paper</strong></a>, <a href="https://youtu.be/217-18ZPoiA"><strong>video</strong></a>]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*W_sbA_Qnb8AUDK9XTUzJGA.png" /></figure><p>Sometimes, you really need to get a transaction published on the blockchain in time. Missing that deadline may cause you to lose some money. One such case is when you’re participating in an auction controlled by a smart contract. If you’re unlucky, that auction deadline may coincide with the latest hyped-up NFT launch, and you may have to compete with others who really need to get transactions out on time.</p><p>On March 12th, 2020 (Crypto Black Thursday) the price of Ethereum dropped by more than 50% in less than 24 hours triggering many MakerDAO auctions to liquidate collateral. Tokens were purchased at almost no cost because bidders couldn’t send transactions with a reasonable fee on time. This has, allegedly, been leveraged by one user to gain $8.3 million worth of ETH.</p><p><strong>If there’s a lot of blockchain congestion, wouldn’t it be great if you could just get an extension on that deadline?</strong> The auctioneer would love to grant you an extension —congestion hurts his bottom line too. The problem is, that we want to give extensions only if congestion occurs.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FsFZWsWayAQJ6Jsjz3z%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FsFZWsWayAQJ6Jsjz3z&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2FsFZWsWayAQJ6Jsjz3z%2F200.gif%3Fcid%3D790b761109dbc29d038f4fd26d764fcde7dc05a3e82b5a17%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="146" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d88f1517f9f878f638caf9385ea184a/href">https://medium.com/media/2d88f1517f9f878f638caf9385ea184a/href</a></iframe><p>In our most recent <a href="https://arxiv.org/pdf/2201.09009">paper </a>(see <a href="https://youtu.be/217-18ZPoiA">VIDEO</a>), published in ‘Financial Cryptography and Data Security 2022’, we describe a mechanism that allows contracts to detect transaction congestion and provide such extensions.</p><p>Another example where deadlines play an important role is in payment channel networks (PCNs) like Lightning, where you have a fixed period of time to react in case another node in the network tries to steal your funds. To avoid losing funds, the implementation of payment channels tends to have long deadlines (of about 1 week) to avoid users having to pay significant fees to quickly resolve the dispute. This means that you have to wait longer when closing channels even if there is no congestion.</p><h3>Our approach</h3><p>Our goal is to eventually design a congestion “opcode” that will allow smart contracts to utilize congestion signals to extend deadlines. The main issue with blockchain congestion detection is that you’re only able to use information from the blockchain (so that all nodes can agree that congestion occurred). It’s impossible to use other sources of information that nodes don’t fully agree about like mempool data.</p><p>We start by defining what it means for a single block to be congested. If you think about it, then really, it is always possible to get a transaction accepted into a block if you’re willing to pay a high-enough fee. So the congestion signal is really just a price signal. Therefore, if most transactions are high-fee, we consider this block congested.</p><p>If we can say that a single block was congested, then we can then extend the notion to determine that <em>multiple blocks </em>are congested within a time period. Now, given a binary series of the blocks’ congestion signals we want to decide whether a recent time period is “uncongested enough” so that transactions have a fair chance to get in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1S0rGdp3m-Gi7j1WjTiB4A.png" /><figcaption>A Period of n blocks. The colors indicate the congestion signals of the blocks (red for congested, green for uncongested)</figcaption></figure><p>The most intuitive way to implement a protocol is to simply say, well if at least M blocks are not congested, then we should consider that good enough. In most execution environments, that would probably work as a good solution. However, the world of blockchains is an adversarial environment where bad actors may try to manipulate the congestion signal. We need to ensure that our solution is robust.</p><p>Here are the properties that we would like our definition to meet:</p><ol><li>Efficiency — we want to be able to obtain compact proofs for the lack of congestion with relative ease.</li><li>Consistency — if a period is considered uncongested, we want any period that contains it to also be considered uncongested. This way, once we decided a period is uncongested and does not deserve a deadline extension we won’t be forced to change our minds.</li><li>Robustness — we want to make sure that the congestion signal is reliable and cannot be manipulated easily by miners. We consider two types of attacks that we would like to defend against:<br>- A <strong>congestion attack</strong> in which the attacker tries to reverse the congestion signal of the period from uncongested to congested. This attack causes an unnecessary delay in the response deadline. <br>- An <strong>uncongestion attack</strong>, in which the attacker tries to reverse the congestion signal of the period from congested to uncongested. This might cause participants to miss the chance to respond on time.</li></ol><h3>The Sliding Window Protocol</h3><p>We suggest the ‘Sliding Window (K-out-of-N)’ protocol which maintains all the properties mentioned above. The protocol defines uncongestion by the existence of a window of size N (of consecutive blocks) with K uncongested blocks among them.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fhv1Mayw75UDma4P2iy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fhv1Mayw75UDma4P2iy%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fhv1Mayw75UDma4P2iy%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="96" frameborder="0" scrolling="no"><a href="https://medium.com/media/065d6c06c8e02dfbad9c66260c20de70/href">https://medium.com/media/065d6c06c8e02dfbad9c66260c20de70/href</a></iframe><p>This protocol is resilient to both of the attacks described above. We evaluated the attacks over Ethereum using short response deadlines as low as 3 hours, considering an attacker with 33% of the network&#39;s computational power, and found that attackers succeed with only negligible probability.</p><p>In the following table, we present upper bounds on the probabilities for an attacker to succeed in each of the attacks, using different parameters for N and K. The wider the sliding window is, the greater the protection we get from manipulating miners. Since the values of N and K are configurable, we can choose to increase the level of security from one attack at the expense of the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*AR4yMMHlSJfpQ2x6POU_og.png" /><figcaption>Upper bounds on the probabilities of the attacker to win each attack given (N, K)</figcaption></figure><h3>Implementation</h3><p>At last, we provide <a href="https://github.com/stonecoldpat/slidingwindow">an implementation in Solidity</a> of the Sliding Window protocol as an Ethereum smart contract using the EIP 1559 base fee as a measure of congestion. EIP 1559 implements a base fee that is adjusted up and down by the protocol according to how congested the network is. The EVM supports fetching the base fee of the highest block. We suggest extending this to fetch the base fee of any block, and to add an opcode that checks whether a block is congested. This opcode will receive as inputs a block and a maximum base fee, chosen by a user, and will return whether the maximum base fee exceeds the block’s base fee.</p><p>For more see the <a href="https://arxiv.org/pdf/2201.09009">full paper</a>, published in ‘Financial Cryptography and Data Security 2022’.</p><p>A video version of the paper is available on our <a href="https://www.youtube.com/channel/UCaKVgCps1lUsPnK03097hUA">YouTube channel</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0567e991958" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchains-huji/sliding-window-challenge-process-for-congestion-detection-b0567e991958">Sliding Window Challenge Process for Congestion Detection</a> was originally published in <a href="https://medium.com/blockchains-huji">Blockchains @ HUJI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Congestion Attacks in Payment Channel Networks]]></title>
            <link>https://medium.com/blockchains-huji/congestion-attacks-in-payment-channel-networks-b7ac37208389?source=rss-188f8ffb4164------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7ac37208389</guid>
            <dc:creator><![CDATA[Ayelet Lotem (Mizrahi)]]></dc:creator>
            <pubDate>Tue, 18 Feb 2020 07:41:26 GMT</pubDate>
            <atom:updated>2022-01-30T08:56:44.116Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.cse.huji.ac.il/~ayelem02/">Ayelet Lotem (Mizrahi</a>) and <a href="https://www.avivz.net/">Aviv Zohar</a></p><p><strong>In a </strong><a href="https://arxiv.org/pdf/2002.06564.pdf"><strong>new paper</strong></a><strong> (</strong><a href="https://youtu.be/71LAVUnLetQ"><strong>video link</strong></a><strong>) we discuss a fundamental vulnerability that arises in payment channel networks as part of the construction of trustless multi-hop payments. We present three modes of attack: the first aims to lock as many high liquidity channels as possible for an extended period, the second disconnects as many pairs of nodes as it can,</strong> <strong>and the third isolates hubs from the rest of the network. In this post, we present the evaluation of these attacks over the Lightning Network. We will examine the network’s properties and different parameters set by the three main implementations of the Lightning Network and show how recent changes in default parameters agreed upon by Lightning Devs made the attack easier to carry out. Our results show that it is possible to disrupt the Lightning Network by locking most of its liquidity spending less than half a bitcoin.</strong></p><p>Payment channel networks are a second layer off-chain solution to the scalability problems of blockchains. As of October 2020, Bitcoin’s Lightning Network has more than 14k nodes and 37k channels and a total capacity of around 1100 BTC (~11,700,000 USD).</p><p>The basic idea of the attack we explore was mentioned back in August 2015 in a correspondence in the<a href="https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html"> Lightning-dev list</a> and in May 2017 as a git issue in the<a href="https://github.com/lightningnetwork/lightning-rfc/issues/182"> BOLT</a>. No full evaluation of the consequences of this attack was ever given and its costs turn out to be low: spending less than half a bitcoin, the attacker can indefinitely lock up most of the network’s channels.</p><h3>The Attack:</h3><p>In order to paralyze channels, the attacker opens channels with the source and target of a route, and requests many small payments through this path, exhausting the number of simultaneously open HTLCs (each of the main implementations of Lightning limits the number of concurrent HTLCs differently). The attacker is both the source and destination of this payment and can severely delay the final execution of the payment (up to several days). The attacker can then re-run the attack once again and lock the same path for an additional period of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*iMGkHwaE55hlg40oC4eDfA.png" /><figcaption><strong>An attacker creates two long routes to paralyze</strong></figcaption></figure><p>We studied the main implementations of the Lightning protocol. Here are the default values they use for relevant parameters (most nodes do use these defaults — see details in the <a href="https://arxiv.org/pdf/2002.06564.pdf">paper</a>). Most nodes on the network nowadays are actually LND nodes (~91%).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*BX9f3cp48BIeehw4yfKepA.png" /><figcaption><strong>Default Parameters</strong></figcaption></figure><p>The diagram below illustrates how a single payment is executed along a path (the attacker repeats this many times on each path until no more HTLCs are available):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qsy5zaLFTYfS3yjb" /><figcaption><strong>The process of route establishment and the elimination of HTLCs</strong></figcaption></figure><p>We evaluate the consequence of running this massively on the <em>entire </em>Lightning Network.</p><h3><strong>Attacking the Entire Network:</strong></h3><p>When using a greedy algorithm in order to pick routes and paralyze as much liquidity as possible we get the following results. The graph below shows what fraction of the total capacity currently locked in Lightning we manage to paralyze (for 3 days at a time).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*0qtufOBPNoCGZLLIOlbCpA.png" /></figure><p>It is possible to lock the network quite effectively for different periods of time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*0DrJWTEFJRjbnPslLV9nYw.png" /></figure><p>The total cost of the attack is low. The costs are made up of two main factors: the cost of opening channels (non-refundable) and the cost of provisioning channels with liquidity (this money remains in the hands of the attacker).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*i-A7kPshc5eWyvz14QEYOA.png" /></figure><p>Our results show that the attacker can paralyze 830 BTC of liquidity in the Lightning Network for 3 days spending less than 0.25 BTC. The attacker needs to hold an additional amount locked in its channels - this amount is not spent, and will return to the attacker once it completes the attack.</p><p>We show how the attack affects connectivity between nodes in the network. We explored several algorithms to select the attacked routes and present them in the following graph:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*Vtf-FgUq7P9XvuNX9G8zFA.png" /></figure><h3><strong>Attacking Hubs:</strong></h3><p>In order to disconnect a single node from the network for an extended period of time, the adversary connects to the victim node and paralyzes its adjacent channels. To do so, it makes multiple payment requests over a path going back and forth through the victim’s channels (this is surprisingly allowed in Lightning implementations).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*rJmxwKzZ2TqaIiSXrNW_CQ.png" /></figure><p>Here are some prominent nodes, and how much it would cost to attack them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*cFXM1zbAKteS7JDLRhSmbA.png" /></figure><p>The last entry in the table relates to an isolation attack on all 25 nodes belonging to LNBIG, which hold a significant share of the network’s capacity in multiple channels.</p><p>If you want to attack smaller nodes, the cost is usually proportional to their degree (but not exactly):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*7XbZKHacZBHVZeAoqYOQfw.png" /></figure><p>We note that the vulnerability is relatively hard to fix since it arises from three fundamental properties of off-chain payment networks:</p><p>1. <strong>Payments are executed in a trustless manner</strong>, using conditional payment contracts (in the form of transactions with HTLCs) that are exchanged between parties and are only sent to the blockchain if disputes arise. These contracts grow in size as more conditional payments are pending, and so the total number of pending payments is limited by transaction sizes that can be placed on the blockchain.</p><p>2. <strong>Expiration times are long</strong>. To allow nodes to recover their funds if a malicious partner closes a channel that is part of a pending payment, HTLC expiration times have been set to allow nodes sufficient time to appeal such closures. In Bitcoin’s Lightning Network, due to lower expressiveness of its scripting language, HTLC expiration times accumulate over the length of the path, reaching up to 2016 blocks — which typically take the Bitcoin network two weeks to produce.</p><p>3. <strong>The privacy of payments</strong>. Payment Channel Networks utilize onion routing that does not allow intermediate nodes on the path to recognize where payments originate and where they are going, allowing the attacker to act with impunity.</p><h3>Mitigation techniques</h3><p>Recent changes to the defaults have in fact made our attack easier to carry out: LND changed their cltv_expiry_delta default from 144 to 40 blocks (on 12 Mar 2019) which allows chaining more nodes in each path without reaching the locktime_max limit. Additionally, a max locktime of 2016 (max_cltv) was agreed upon by Lightning developers in the 2018 Adelaide meeting to set the BOLT 1.1 specs. This is an increase of previous values used in some implementations. Again, this allows for longer routes and longer expiration delays that make the attack more damaging and easier to carry out.</p><p><strong>Enforcing fast HTLC resolution</strong>. While HTLC expiration times allow nodes to remain secure and provide sufficient time to publish transactions to the network, we propose the addition of another time-out mechanism. Specifically, if HTLC secrets are not propagated fast enough from one’s neighbor the channel with this neighbor should be closed. This mechanism is a way to disconnect misbehaving peers from the network in order to prevent them from repeating the attack many times at no cost.</p><p><strong>Reducing route length</strong>. We suggest lowering the maximum allowed route length (currently 20 hops). The network graph is highly connected, and a smaller number of hops should still suffice: paths between nodes in the network have an average of less than 3 hops and that the network diameter is ~6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*CE6iZJ_aUQFNoUMEnkaIqg.png" /></figure><p><strong>Setting the number of max concurrent payments based on trust level </strong>and <strong>Loop Avoidance </strong>are two more ways to slightly mitigate the attack.</p><p>Further work must be conducted in order to secure the network. Since the attack relies on fundamental mechanisms in payment channels, more consideration is warranted.</p><p>For more see the <a href="https://arxiv.org/pdf/2002.06564.pdf">full paper</a>, published in ‘<a href="https://fc21.ifca.ai/program.php">Financial Cryptography and Data Security 2021</a>’.</p><p>Video versions of the paper are available on our <a href="https://www.youtube.com/channel/UCaKVgCps1lUsPnK03097hUA">YouTube channel</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7ac37208389" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blockchains-huji/congestion-attacks-in-payment-channel-networks-b7ac37208389">Congestion Attacks in Payment Channel Networks</a> was originally published in <a href="https://medium.com/blockchains-huji">Blockchains @ HUJI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>