长推:简单理解闪电网络所涉资金丢失风险问题

MarsBitPublished on 2023-10-24Last updated on 2023-10-27

Abstract

Antoine 在去年年底发现了一种闪电网络的“All your mempool are belong to us”攻击,并在今年4月份发布的 lnd v0.16.1-beta中“mitigate”了这种攻击。目前为止,没有在主网上观察到此类攻击,但Antoine计划在30号再开始在公开邮件列表上进行回复,并且之后会专注在 Core 的开发上。

注:原文来自@hu_zhiwei发布长推。
“All your mempool are belong to us”,上周的闪电网络这个问题得到了很多关注。我也去学习了一下,但发现很多理解似乎并不准确,在这里做一个整理。
1-到底什么问题?
简单来说,是攻击者利用 RBF(手续费替换)使得闪电网络上的受害者没办法在主网上提交 timeout 交易,使其损失了转发的资金。
2-大体的流程是:
- 共谋的攻击者 A 和 C,分别和受害者 B 建立了闪电网络通道,然后 A 通过受害者 B 转发付款给 C。
- 攻击者在这里利用了两次 RBF(手续费替换),第一次是阻止 B 去 timeout B<>C的通道;第二次是隐藏HTLC的原像,阻止B去向 A claim 收款。
具体的:
- 在第一次 RBF 前,攻击者要提前准备了一系列低费率的链式交易
- 第一次RBF是C利用这个交易作为其中一个输入加上自己的原像把 B 的 timeout 交易替换掉
- 还要再做第二次 RBF 是因为B看到原像后,就可以向A去claim收款。所以这时候,C会立即再做一笔替换,把这个链式交易中的最后一笔替换掉
因为原像的交易依赖于这笔链式交易,因此这时候也会被替换掉,也就无法从 mempool 里观察到了。
C 重复这两个 RBF 过程,让B无法在B<>C的通道上发送timeout(如果受害者 B 不关注 mempool,无法注意到C短暂发出的原像),直到 A<>B 的通道也过期,让 B 彻底无法获得这笔转发的资金。
这里涉及到两个概念:timeout 交易和RBF(手续费替换)
1)timeout 交易。闪电网络为了转发交易,设置了HTLC 来协调通道间的转发付款。当有一笔付款的每一跳在付款人(如上例中的 B)发给收款人(如 C)时,通道会在原有基础上增加一个 HTLC 的条件,要求必须在限定时间内给出原像,以此“结算”这笔付款。
如果超时后收款人(C)还给不出原像,可能存在欺诈行为,需要将当前的通道状态发布到主链上来把转发的资金收回来;如果能给出原像,就可以结算当前的付款(通道也不必关闭),同时还可以和上一跳的付款人(A)来结算。
2)RBF(手续费替换)。这个其实不是像以太坊链上 MEV 用更高 gas 去抢跑,但也是在 mempool 里的操作。RBF 的设计背景是用户发送了一个低费率(BTW 请不要把比特币链上的费率称为“gas”)交易,可能会在mempool里一直未得到确认;RBF 允许用户重新发一个新的高费率交易来替换掉原交易。
具体的攻击过程可以参考,这个非常直观的解释: https://twitter.com/mononautical/status/1715736832950825224…
这里也有原报告者的Paper: https://github.com/ariard/mempool-research/blob/2023-10-replacement-paper/replacement-cycling.pdf
3-会有哪些影响?
值得注意的是,这个问题不是上周才发现的,而报告者 Antoine 已经在去年年底发现,告知了 Core 的维护者和闪电网络主要实现的开发团队。报告过程和其他开源项目都类似,都是通过“负责任的披露过程”,而不是在发现的当时就在公开渠道里对所有人直接说。
因此在过去的闪电网络主要版本里已经“mitigate”了这种攻击,例如在今年4月份发布的 lnd v0.16.1-beta。 根据和 LN 的开发者交流:“现在lnd会一直观察mempool,所以一旦preimage出现了,B可以直接从mempool里拿到preimage然后settle;另外是lnd会一直rebroadcast,防止tx从mempool里消失”。
不过,想完全解决,可能要依赖于 Core 等协议层面的实现,例如把 mempool 里的信息保存更久一些等等。
目前为止,没有在主网上(包括 Bitcoin 网络和闪电网络)观察到此类攻击。 但并不意味着以后不会出现,因为可能有更高级的攻击者会更精心策划攻击,例如和矿工合谋从而让更细心的节点也会遭受攻击。
4-开发者因此感到失望、退出开发了?
Antoine 关注到目前一些媒体报道上出现偏差后,还专门又写了一封邮件说,这不是"intentional backdoor",并且建议媒体可以等更专业的报告者提供更多信息后再发布报道…… https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-October/004157.html…
尽管不知道他个人的未来计划,但 Antoine 在之前的邮件里也提到他计划在30号再开始在公开邮件列表上进行回复,并且之后会专注在 Core 的开发上。
可以在邮件列表看到更详细的讨论:
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-October/021999.html…
如果没时间的话,每周中更新的 Bitcoin Optech 在本周会有汇总:
https://bitcoinops.org
因为讨论还在进行中,我也没有读完所有的邮件。如有错误或不准确的地方,请指正。

Trending Cryptos

Related Reads

Bitcoin Is Ready for "Parabolic Growth". Is Altseason Upon Us?

Amid a general market uptrend, experts are discussing the potential start of an 'altcoin season', where major cryptocurrencies could outpace Bitcoin's growth. This follows Bitcoin surpassing $81,000, predictions of a new bull market, and a capital shift from AI stocks toward Bitcoin and gold. Since August 17th, the crypto market has risen over 22%, primarily driven by Bitcoin (BTC) and Ethereum (ETH), which gained 25% and 30% respectively, reaching highs last seen in May. Analysts suggest the Bitcoin bear cycle has ended, anticipating a historically strong rally, with renewed institutional demand for cryptocurrency ETFs. BitMEX founder Arthur Hayes, in a recent interview, declared the start of a new bull market, predicting Bitcoin could quickly reach "hundreds of thousands" of dollars. Market observers interpret this as an expectation for 'parabolic growth.' Signs of a bull market revival include Bitcoin ETFs re-entering the top 10 most-traded ETFs, displacing some AI-focused funds. Analysts at CryptoQuant note capital is flowing from Bitcoin into riskier altcoins, with their bull market indicators showing the most optimistic signals since October 2025. However, the reality is more nuanced. The current surge is a rebound from yearly lows; Bitcoin's price is still down nearly 40% from its October peak. The Altcoin Season Index has dropped to 39 from 67 in early August, and Bitcoin's dominance remains around 60%, indicating investor focus is still on Bitcoin rather than altcoins. Experts predict the market is entering a phase where project fundamentals and real revenue, rather than speculation, will increasingly determine asset value.

cryptonews.ru13m ago

Bitcoin Is Ready for "Parabolic Growth". Is Altseason Upon Us?

cryptonews.ru13m ago

$120 Million Vanishes Overnight! Crypto's 'Steadiest Giant' Stumbles in South America

Summary: Tether's $120 million Bitcoin mining venture in Uruguay, initiated in May 2023, was abruptly shut down in July 2025 when the national power utility UTE cut off electricity. The project, developed in partnership with local firm Microfin in Florida province, was touted as a model for leveraging the country's nearly 98% renewable energy grid. The collapse stemmed from a fundamental contract dispute over electricity supply. Tether interpreted the agreed power volume as a "minimum guaranteed supply," expecting to request more as the mining operation expanded. UTE, however, viewed it as a "strict maximum cap." This disagreement led to frequent power curtailments for the 24/7 mining facility, causing significant revenue loss from lost computing power. Following the 2025 election of left-wing President Yamandú Orsi and a management change at UTE, negotiations broke down. Microfin stopped paying electricity bills in May 2025, formally notified UTE of contract termination in June, and did not attend a final meeting where UTE presented a revised contract. By the July 25 power cut, Microfin's debt approached $5 million. The operation ceased, laying off 30 of its 38 local staff, with all outstanding debts settled by December 2025. The failure highlights key risks for heavy-asset overseas investments: Uruguay's green energy proved not to be cheap energy, especially after the 2024 Bitcoin halving squeezed industry profits. Furthermore, political changes can swiftly alter utility company policies, undermining the long-term regulatory stability critical for such projects. While financially absorbable for Tether, the incident underscores that operational success depends on unambiguous contracts and genuine cost advantages, not just technological scale.

marsbit38m ago

$120 Million Vanishes Overnight! Crypto's 'Steadiest Giant' Stumbles in South America

marsbit38m ago

Is Bitcoin Price Lagging? Record Global M2 Money Supply Could Be a Springboard for BTC's Rise

Bitcoin Price Lagging? Record Global Money Supply M2 Could Springboard BTC Growth The global money supply (M2) is expanding rapidly, similar to global debt. The US M2, representing all money circulating in its economy, has reached a record $23.16 trillion. Combined with figures from major economies like the Eurozone, China, and Japan, the global M2 is approximately $103 trillion. Some estimates, however, place it closer to $195 trillion. This surge in liquidity is significant because excess capital often seeks higher returns in assets like precious metals, stocks, and cryptocurrencies. Bitcoin's recent price surge above $81,000 has brought the global M2 metric back into focus. Following a sharp rise in early August after a US Treasury bond buyback announcement, BTC still trades about 37% below its October 2025 all-time high exceeding $126,000. This gap presents a potential "catch-up" trade thesis. Bitcoin's fixed supply of 21 million contrasts with governments' ability to print fiat currency, making scarce assets like BTC attractive if monetary expansion continues. Historically, Bitcoin's bull cycles in 2017-2018 and 2020-2021 coincided with M2 expansion and increased liquidity. Over the past year, the correlation seemed broken as M2 grew while Bitcoin's price fell sharply from its peak. Observers believe fresh dollars may have remained locked in cash-favorable investments. Some, like Ash Crypto, now suggest a long-awaited alignment between Bitcoin and M2 may be starting, especially as a weakening US Dollar Index this month has seen assets like gold and Bitcoin surge. A softer dollar pressures cash havens and prompts holders to act. While record M2 doesn't guarantee higher Bitcoin prices, a sustained influx of liquidity, a weak dollar, and capital flowing into alternative assets could trigger a catch-up rally sooner than expected. However, changes in these conditions could lead to the opposite outcome.

cryptonews.ru1h ago

Is Bitcoin Price Lagging? Record Global M2 Money Supply Could Be a Springboard for BTC's Rise

cryptonews.ru1h ago

Trading

Spot

Hot Articles

What is $BITCOIN

DIGITAL GOLD ($BITCOIN): A Comprehensive Analysis Introduction to DIGITAL GOLD ($BITCOIN) DIGITAL GOLD ($BITCOIN) is a blockchain-based project operating on the Solana network, which aims to combine the characteristics of traditional precious metals with the innovation of decentralized technologies. While it shares a name with Bitcoin, often referred to as “digital gold” due to its perception as a store of value, DIGITAL GOLD is a separate token designed to create a unique ecosystem within the Web3 landscape. Its goal is to position itself as a viable alternative digital asset, although specifics regarding its applications and functionalities are still developing. What is DIGITAL GOLD ($BITCOIN)? DIGITAL GOLD ($BITCOIN) is a cryptocurrency token explicitly designed for use on the Solana blockchain. In contrast to Bitcoin, which provides a widely recognized value storage role, this token appears to focus on broader applications and characteristics. Notable aspects include: Blockchain Infrastructure: The token is built on the Solana blockchain, known for its capacity to handle high-speed and low-cost transactions. Supply Dynamics: DIGITAL GOLD has a maximum supply capped at 100 quadrillion tokens (100P $BITCOIN), although details regarding its circulating supply are currently undisclosed. Utility: While precise functionalities are not explicitly outlined, there are indications that the token could be utilized for various applications, potentially involving decentralized applications (dApps) or asset tokenization strategies. Who is the Creator of DIGITAL GOLD ($BITCOIN)? At present, the identity of the creators and development team behind DIGITAL GOLD ($BITCOIN) remains unknown. This situation is typical among many innovative projects within the blockchain space, particularly those aligning with decentralized finance and meme coin phenomena. While such anonymity may foster a community-driven culture, it intensifies concerns about governance and accountability. Who are the Investors of DIGITAL GOLD ($BITCOIN)? The available information indicates that DIGITAL GOLD ($BITCOIN) does not have any known institutional backers or prominent venture capital investments. The project seems to operate on a peer-to-peer model focused on community support and adoption rather than traditional funding routes. Its activity and liquidity are primarily situated on decentralized exchanges (DEXs), such as PumpSwap, rather than established centralized trading platforms, further highlighting its grassroots approach. How DIGITAL GOLD ($BITCOIN) Works The operational mechanics of DIGITAL GOLD ($BITCOIN) can be elaborated on based on its blockchain design and network attributes: Consensus Mechanism: By leveraging Solana’s unique proof-of-history (PoH) combined with a proof-of-stake (PoS) model, the project ensures efficient transaction validation contributing to the network's high performance. Tokenomics: While specific deflationary mechanisms have not been extensively detailed, the vast maximum token supply implies that it may cater to microtransactions or niche use cases that are still to be defined. Interoperability: There exists the potential for integration with Solana’s broader ecosystem, including various decentralized finance (DeFi) platforms. However, the details regarding specific integrations remain unspecified. Timeline of Key Events Here is a timeline that highlights significant milestones concerning DIGITAL GOLD ($BITCOIN): 2023: The initial deployment of the token occurs on the Solana blockchain, marked by its contract address. 2024: DIGITAL GOLD gains visibility as it becomes available for trading on decentralized exchanges like PumpSwap, allowing users to trade it against SOL. 2025: The project witnesses sporadic trading activity and potential interest in community-led engagements, although no noteworthy partnerships or technical advancements have been documented as of yet. Critical Analysis Strengths Scalability: The underlying Solana infrastructure supports high transaction volumes, which could enhance the utility of $BITCOIN in various transaction scenarios. Accessibility: The potential low trading price per token could attract retail investors, facilitating wider participation due to fractional ownership opportunities. Risks Lack of Transparency: The absence of publicly known backers, developers, or an audit process may yield skepticism regarding the project's sustainability and trustworthiness. Market Volatility: The trading activity is heavily reliant on speculative behavior, which can result in significant price volatility and uncertainty for investors. Conclusion DIGITAL GOLD ($BITCOIN) emerges as an intriguing yet ambiguous project within the rapidly evolving Solana ecosystem. While it attempts to leverage the “digital gold” narrative, its departure from Bitcoin's established role as a store of value underscores the need for a clearer differentiation of its intended utility and governance structure. Future acceptance and adoption will likely depend on addressing the current opacity and defining its operational and economic strategies more explicitly. Note: This report encompasses synthesised information available as of October 2023, and developments may have transpired beyond the research period.

2.1k Total ViewsPublished 2025.05.13Updated 2025.05.13

What is $BITCOIN

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of BTC (BTC) are presented below.

活动图片