lightning-dev
HTLC output aggregation as a mitigation for tx recycling, jamming, and on-chain efficiency (covenants)
Posted on: December 21, 2023 13:34 UTC
Understanding the nuances of a potential strategy involving Hashed Time-Locked Contracts (HTLCs) can be intricate.
In this scenario, we analyze a situation where Bob might attempt to profit through an "off-chain double-spend" on a 1 BTC HTLC. To achieve this, it is suggested that Bob would need to postpone Alice's transactions until the timelock on her incoming HTLC expires, referred to as the CLTV delta blocks. The assumption here is that Alice, motivated by nearing timelocks on her incoming HTLCs, would strive for prompt inclusion in the blockchain, potentially at considerable expense.
Bob's tactic would entail incurring approximately next block fees for each block during the delta period. Moreover, he would risk the value of an HTLC for every transaction executed in this manner. A key observation highlights the risk involved for Bob: Alice has the capability to claim all expired HTLCs economically due to the simple nature of the necessary transactions (requiring only one input and one output, without the need for merkle paths or preimages). Since game theory suggests Alice may be willing to allocate nearly the entire value of the last 1 BTC HTLC towards transaction fees to ensure confirmation before expiry, Bob faces a dilemma. He cannot match this by spending his smaller HTLCs, creating a situation where the most Alice could spend is around 0.9 BTC in fees—a sum Bob is unlikely to rival.
While Bob has the option to force Alice into this expensive position, thereby causing her financial grief, it remains uncertain whether such a move would be considered rational. This strategy hinges on exploiting the timing constraints of HTLCs but introduces significant risk for both parties, especially considering the high fees Alice is willing to pay to secure her HTLCs.