bitcoin-dev

V3 Transactions are still vulnerable to significant tx pinning griefing attacks

V3 Transactions are still vulnerable to significant tx pinning griefing attacks

Original Postby Gloria Zhao

Posted on: December 20, 2023 19:13 UTC

The discussion involves an analysis of transaction pinning with RBF (Replace-By-Fee) in the context of Bitcoin transactions, focusing particularly on how the introduction of 'v3' transactions affects this dynamic.

The primary concern is quantifying the potential extra costs a user, named Alice, might incur due to an attacker, Mallory, attempting to exploit the system by pinning.

Scenario calculations are provided to illustrate the differences in cost implications between v3 and non-v3 transactions when an attacker attempts to pin. In the case of v3 transactions, it is observed that Mallory is significantly less successful in increasing the replacement cost for Alice due to restrictions on the size of unconfirmed child transactions. For instance, if Alice's commitment transaction is 1000 virtual bytes (vB), the additional cost inflicted by Mallory in a v3 transaction setting could be 80,152 satoshis, whereas in a non-v3 world, Mallory could push that number up to 8,000,152 satoshis, forcing Alice to pay almost 7 million satoshis extra.

The example further expands with larger sizes of the commitment transaction, demonstrating that as the size of the transaction increases, the potential damage decreases proportionally in a v3 environment compared to a non-v3 scenario. With a commitment transaction size of 50,000 vB, Alice would be willing to pay 8,124,624 satoshis at a rate of 162 sat/vB, but in a non-v3 world, Mallory's attack could potentially increase the cost to 4,080,152 satoshis over what Alice would expect to pay. However, in the v3 world, Alice's Child-Pays-For-Parent (CPFP) transaction can still cover the cost, rendering Mallory's attack unsuccessful.

The analysis underscores the effectiveness of limiting the allowed child size to reduce potential damage by 100 times, highlighting the benefits of v3 transactions which enforce a rule against having more than one unconfirmed parent per transaction. This change from 100KvB to 1000vB represents a significant reduction in vulnerability. The email concludes by inviting feedback on any arithmetic mistakes and reaffirms the importance of understanding these dynamics to protect users from potential fee-related attacks within the Bitcoin network.