Sunday, August 10, 2025
No Result
View All Result
Crypeto News
Smarter_way_USA
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
Crypeto News
No Result
View All Result

Postmortem On The Lightning Replacement Cycling Attack

by crypetonews
October 24, 2023
in Bitcoin
Reading Time: 5 mins read
0 0
A A
0
Home Bitcoin
Share on FacebookShare on Twitter



So a lot of noise has been made around the Lightning vulnerability recently disclosed by Antoine Riard. Many people are claiming the sky is falling, that Lightning is fundamentally broken, and nothing could be further from the truth. I think part of the problem is that people don’t really understand how this vulnerability works, firstly, and secondly many people don’t understand how this individual vulnerability overlaps with other known issues on the Lightning Network that have known solutions.

So first, let’s go through and try to understand the vulnerability itself. When a Lightning payment is routed across the network, one thing that is key to understand is how the timelocks for refunding a failed payment work. The hop closest to the receiver has a timelock of ‘x’, and every hop going back to the sender has one of ‘x+1’, ‘x+2’, and so on. The timelocks get progressively longer as you go each hop from the receiver back towards the sender. The reason for this is that if a payment reaches the receiver, but some problem stops the preimage from propagating all the way back to the sender, the hop where it stopped has time to enforce it on-chain, and put the preimage there that all preceding hops need to confirm the payment. Otherwise someone in the middle, where the failure happens, could have their outgoing hop claim the funds with the preimage, and the hop that forwarded it to them claim it with their refund path, and leave that person in the middle shit out of luck having lost funds.

The Replacement Cycling Attack is a complicated way to try and accomplish exactly that undesired outcome, the target node losing money by having the outgoing hop claim the funds with a success transaction, and the incoming hop claiming funds through the refund transaction. This necessitates stalling out the victim node, and preventing them from seeing the preimage in the success transaction on one side until after the timelock expires on the other side, so they can claim the refund there.

This requires a very targeted and complicated game of manipulating the victim’s mempool. Let’s look at the actual transaction structure involved here. You have the commitment transaction, which is the main transaction representing the Lightning channel state. It has an output for each side of the channel representing funds completely under the control of one member or the other, and outputs for each HTLC in the process of being routed. These outputs are the ones we are concerned with. Each HTLC output can be spent either immediately at any time with the preimage from the receiver, or after the timelock expires on the refund.

The attack requires that a malicious party, or two conspiring parties, have a channel on both sides of the victims node routing a payment. So Bob, the victim, has a channel with Alice and Carol, the attackers, and payment routed from Carol to Bob to Alice. Now remember, the timelock refund path between Alice and Bob will expire and become valid before the refund between Carol and Bob.

The attackers route a payment through Bob, and then Alice will refuse to send Bob the preimage to finalize the payment when she receives it. What Bob will do now is wait until the timelock window expires between himself and Alice, and go to broadcast the channel commitment transaction and refund transaction to get it confirmed before the timelock window expires. What Alice will do is then go to spend the preimage transaction to claim the funds with an output unrelated to the channel, and right afterwards doublespend the second input in the preimage success transaction. The goal here is to evict Bob’s timeout transaction from the mempool, but also evict the preimage success transaction so Bob doesn’t see it. If he does, he will learn the preimage and can simply claim the funds in his channel with Carol before her timeout transaction is valid to spend.

Alice and Carol have to do this on a consistent basis, everytime Bob rebroadcasts his timeout transaction with Alice, until the blockheight passes where Carol’s timeout transaction is valid. Then they can submit the success transaction on Alice’s side, and the timeout transaction on Carol’s side, and leave Bob holding the bag having lost the value of the payment he was routing.

The problem with this is two fold. Firstly, the victim’s Bitcoin Core node must be specifically targeted to ensure that at no time does the preimage success transaction propagate into their mempool where their Lightning node can acquire the preimage. Secondly, if the second transaction Alice uses to evict the preimage transaction is confirmed, Alice incurs a cost (remember, the idea is to replace the timeout transaction with the preimage, so that is evicted from the mempool, then replace the preimage transaction with the second one double-spending the additional input in the preimage transaction). That means every time Bob re-broadcasts his timeout transaction, Alice has to pay a higher fee to re-evict it, and when that is confirmed she actually incurs a cost.

So Bob can force Alice to incur a big cost simply by regularly rebroadcasting his timeout transaction with a higher fee, meaning if the payment HTLC output is not worth significantly more than the fees Alice could incur, the attack isn’t economically worthwhile to pull off. It would also be possible to prevent the attack completely by changing how HTLC success and timeout transactions are constructed. By using the SIGHASH_ALL flag, which means the signature commits to the entirety of the transaction and becomes invalid if the tiniest detail (like adding the new input in the preimage transaction required for this attack) is changed. This wouldn’t work with current version of Lightning channels using anchor outputs, but it would solve the issue entirely. Peter Todd has also proposed a new consensus feature that would entirely solve the issue, essentially a reverse timelock, where the transaction would become invalid after a certain time or blockheight instead of becoming valid after. Going that far however is not necessary in my opinion.

Simply rebroadcasting your transaction regularly with a slight fee bump is a massive mitigation of the attack, but there are also numerous dynamics that just make it not a serious issue regardless. First, if you aren’t a routing node, this isn’t really a serious issue. So most end users are safe from this attack. Secondly, there are many reasons why nodes do not allow any random person to open channels to them. Large nodes are very selective about who they peer with, as random channels not managed efficiently or professionally have a cost in the form of sunk or wasted capital in unused channels. So any large node that would make a juicy target for this attack is not trivial to even get connected with in the first place, let alone connect to them with multiple channels to pull off the attack in the first place. Lastly, as I’ve written about in the past, other unrelated attacks possible on the network are already necessitating filters and restrictions in how nodes choose to handle HTLCs they could forward. I.e. limits on the size of payments they will forward, how many they will allow at any given time, etc. So even if you can open a channel with a node worth attacking, as the network evolves there will be more thought through criteria and filters for deciding whether to even forward a payment in the first place.

Overall, this is a legitimate issue and possible attack, but both in terms of direct mitigations, and how the attack will interact with solutions to other issues over the long term, this is not an unsolvable problem. It is a legitimate issue, and dismissing it as purely FUD is not an accurate reaction, but to claim the sky is falling and the Lightning Network as a protocol is doomed is far overblowing the issue.

Time will march on, we will run into problems, and we will fix those problems as they come. Like we always have. 



Source link

Tags: attack..CyclingLightningPostmortemReplacement
Previous Post

Enterprise-managed IAM: An SRE team case study

Next Post

Cosmos Developer Releases New Proposal To Cut ATOM Inflation in Half to 10% – Here’s Why

Related Posts

XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy
Bitcoin

XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy

August 10, 2025
XRP Stalls, But Holds The Line At .30 After Explosive Rally
Bitcoin

XRP Stalls, But Holds The Line At $3.30 After Explosive Rally

August 10, 2025
BlackRock Confirms No Current XRP Or Solana Spot ETF Filings
Bitcoin

BlackRock Confirms No Current XRP Or Solana Spot ETF Filings

August 9, 2025
Bitcoin Is Still King Of Capital Inflows, According To Michael Saylor
Bitcoin

Bitcoin Is Still King Of Capital Inflows, According To Michael Saylor

August 9, 2025
Ethereum Price Watch: Market Eyes Breakout Toward ,500 Target
Bitcoin

Ethereum Price Watch: Market Eyes Breakout Toward $4,500 Target

August 9, 2025
Even Robinson Crusoe Understood The Price And Value Of Money
Bitcoin

Even Robinson Crusoe Understood The Price And Value Of Money

August 9, 2025
Next Post
Cosmos Developer Releases New Proposal To Cut ATOM Inflation in Half to 10% – Here’s Why

Cosmos Developer Releases New Proposal To Cut ATOM Inflation in Half to 10% – Here’s Why

BlackRock BUYING BITCOIN NOW (Here's WHY)!! Bitcoin News Today & Ethereum Price Prediction!

BlackRock BUYING BITCOIN NOW (Here's WHY)!! Bitcoin News Today & Ethereum Price Prediction!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

RECOMMENDED

Top Bitcoin Casinos – Slots Guide for Beginners [August 2025]
Bitcoin

Top Bitcoin Casinos – Slots Guide for Beginners [August 2025]

by crypetonews
August 4, 2025
0

Discover the Best Bitcoin Casinos for Slot Enthusiasts. Our beginner’s guide covers top platforms, bonuses, and slot games to play...

DOT Price Slides Below Key Moving Averages as Polkadot Tests Critical Support

DOT Price Slides Below Key Moving Averages as Polkadot Tests Critical Support

August 7, 2025
Bitcoin and Ether ETFs Surge With 3 Million Inflows as Recovery Momentum Builds

Bitcoin and Ether ETFs Surge With $503 Million Inflows as Recovery Momentum Builds

August 8, 2025
I Asked ChatGPT’s New Agent What to Post Next — It Got 50,000 Views in 48 Hours

I Asked ChatGPT’s New Agent What to Post Next — It Got 50,000 Views in 48 Hours

August 9, 2025
AAVE daily fees skyrocket 200%, signaling lending market recovery

AAVE daily fees skyrocket 200%, signaling lending market recovery

August 5, 2025
Trump To Sign Executive Order Allowing 401(k) Crypto Investment

Trump To Sign Executive Order Allowing 401(k) Crypto Investment

August 7, 2025

Please enter CoinGecko Free Api Key to get this plugin works.
  • Trending
  • Comments
  • Latest
Top 10 NFTs to Watch in 2025 for High-Return Investments

Top 10 NFTs to Watch in 2025 for High-Return Investments

November 22, 2024
Uniswap v4 Teases Major Updates for 2025

Uniswap v4 Teases Major Updates for 2025

January 2, 2025
Enforceable Human-Readable Transactions: Can They Prevent Bybit-Style Hacks?

Enforceable Human-Readable Transactions: Can They Prevent Bybit-Style Hacks?

February 27, 2025
Best Cryptocurrency Portfolio Tracker Apps to Use in 2025

Best Cryptocurrency Portfolio Tracker Apps to Use in 2025

April 24, 2025
What’s the Difference Between Polygon PoS vs Polygon zkEVM?

What’s the Difference Between Polygon PoS vs Polygon zkEVM?

November 20, 2023
FTT jumps 7% as Backpack launches platform to help FTX victims liquidate claims

FTT jumps 7% as Backpack launches platform to help FTX victims liquidate claims

July 18, 2025
XRP Official CRYPTO VOTE LIVE NEWS!🔴GENIUS, CLARITY Act

XRP Official CRYPTO VOTE LIVE NEWS!🔴GENIUS, CLARITY Act

46
IMP UPDATE : BILLS PASSED || BITCOIN DOMINANCE FALLING

IMP UPDATE : BILLS PASSED || BITCOIN DOMINANCE FALLING

38
🚨BIG UPDATE ON WAZIRX || ALT COIN PORTFOLIO NO 1

🚨BIG UPDATE ON WAZIRX || ALT COIN PORTFOLIO NO 1

37
BITCOIN: IT'S HAPPENING NOW (Urgent Update)!!! Bitcoin News Today, Ethereum, Solana, XRP & Chainlink

BITCOIN: IT'S HAPPENING NOW (Urgent Update)!!! Bitcoin News Today, Ethereum, Solana, XRP & Chainlink

33
JUST IN XRP RIPPLE DUBAI NEWS!

JUST IN XRP RIPPLE DUBAI NEWS!

25
Flash USDT | How It Became the Biggest Crypto Scam Worldwide

Flash USDT | How It Became the Biggest Crypto Scam Worldwide

31
XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy

XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy

August 10, 2025
XRP Stalls, But Holds The Line At .30 After Explosive Rally

XRP Stalls, But Holds The Line At $3.30 After Explosive Rally

August 10, 2025
ETH Rally Wipes Out 3M in Shorts—Eric Trump Says it Puts a ‘Smile on My Face’

ETH Rally Wipes Out $173M in Shorts—Eric Trump Says it Puts a ‘Smile on My Face’

August 9, 2025
BlackRock Confirms No Current XRP Or Solana Spot ETF Filings

BlackRock Confirms No Current XRP Or Solana Spot ETF Filings

August 9, 2025
Bitcoin’s Difficulty Smashes Records, Making Rewards Tougher Than Ever

Bitcoin’s Difficulty Smashes Records, Making Rewards Tougher Than Ever

August 9, 2025
Custodia Bank founder Caitlin Long dives into Trump’s debanking executive order

Custodia Bank founder Caitlin Long dives into Trump’s debanking executive order

August 9, 2025
Crypeto News

Find the latest Bitcoin, Ethereum, blockchain, crypto, Business, Fintech News, interviews, and price analysis at Crypeto News.

CATEGORIES

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Updates
  • DeFi
  • Ethereum
  • Metaverse
  • Mining
  • NFT
  • Regulations
  • Scam Alert
  • Uncategorized
  • Videos
  • Web3

LATEST UPDATES

  • XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy
  • XRP Stalls, But Holds The Line At $3.30 After Explosive Rally
  • ETH Rally Wipes Out $173M in Shorts—Eric Trump Says it Puts a ‘Smile on My Face’
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

No Result
View All Result
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In