bitcoin-dev

Full Disclosure: CVE-2023-40231 / CVE-2023-40232 / CVE-2023-40233 / CVE-2023-40234 "All your mempool are belong to us"

Full Disclosure: CVE-2023-40231 / CVE-2023-40232 / CVE-2023-40233 / CVE-2023-40234 "All your mempool are belong to us"

Original Postby Matt Morehouse

Posted on: October 19, 2023 17:53 UTC

The email discusses the concept of replacement cycles in an attack and how a defender can implement a scorched-earth fee bumping policy to counter it.

The attacker may try to avoid certain replacement cycles to reduce the cost of the attack. However, with the defender's scorched-earth policy, either the HTLC-timeout will confirm in the next block or the attacker must pay more fees than the HTLC-timeout fees to replace it.

As the CLTV delta deadline approaches, the fees required for replacement may increase significantly. Under the scorched earth policy, these fees can be 50%, 80%, or even 100% of the HTLC value. This makes the attack unprofitable for the attacker, even if they only have to do one replacement cycle right before the deadline. In practice, when the HTLC values are much higher than the next-block fee cost, the attacker will need to perform multiple replacements as the deadline approaches.

It is important to note that the linear scorched earth policy mentioned in the email is just an illustration. Further tuning of the fee bumping curve across the full CLTV delta is necessary to ensure minimal fees are paid when not under attack. However, as the deadline approaches, it becomes necessary to become very aggressive both to get the transaction confirmed during high mempool congestion and to punish replacement-cycling attackers.