Breach tx vulnerability & CPFP attack [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2016-03-29T01:03:50+00:00


Summary:

In a 2016 email thread, Rusty Russell and Peter Todd discuss the importance of small miners in the Bitcoin network. According to Todd, while miners provide the service of mining blocks, their most valuable service is being independent from other miners to prevent any single entity from having over 50% of the hashing power. The thread includes a link to a relevant Bitcointalk forum discussion from 2012 that remains interesting and relevant.The context then shifts to a scenario involving Alice and Bob's channel with 100BTC in Bob's favor. Alice broadcasts an obsolete 50/50BTC commitment transaction and her revocable transaction. Bob breaches by broadcasting his breach transaction, but it is not confirmed in blocks. Alice follows up by broadcasting a transaction where she offers miners to share Bob's 50BTC with her, worth 25BTC * P(M mines block) * P(nobody else mines Bob's tx). The profitability of this offer depends on the number of small miners.A subsequent email conversation between Jérôme Legoupil and Dave explores the incentives for miners in this situation. Dave argues that miners should be treated as competing independent actors. While Bob's transaction can be included immediately, Alice's ability to spend the stolen 50BTC is locked for potentially hundreds of blocks. Miners must choose whether to mine Bob's low-fee transaction or wait for Alice's high-fee transaction after several hundred blocks. Dave believes that, in a correctly functioning network without a majority hash rate miner or cartel, option #1 (mining Bob's transaction) would be more profitable for miners on average.Another scenario is presented where Alice and Bob have a channel with 50BTC on each side, which ends with 100BTC in Bob's favor. Alice broadcasts the obsolete 50/50BTC commitment transaction and her revocable transaction. Bob's breach transaction is not confirmed in blocks. Alice then broadcasts a transaction where she offers miners to share Bob's 50BTC with her, knowing that she has nothing left in the channel. To defend against this attack, Bob should maintain a minimum balance in his channels and monitor the blockchain for obsolete commitments. If he detects one, he should immediately broadcast his breach transaction and assume Alice is colluding with miners. Bob can engage in a scorched earth policy by broadcasting a replace-by-fee CPFP transaction to himself, offering Alice's share to miners. The longer the contest period, the better Bob's chances of winning at a lesser cost.In conclusion, the email thread explores the importance of small miners in maintaining the independence of the Bitcoin network. It also discusses the incentives for miners in scenarios involving breached transactions and the strategies that parties can employ to defend against attacks. While not all defenses are deemed convincing, they offer potential solutions to mitigate risks.


Updated on: 2023-07-31T18:57:33.138378+00:00