delvingbitcoin
Liquidity griefing in multi-party transaction protocols
Posted on: December 7, 2023 11:21 UTC
The recent discussion on the liquidity ads protocol highlighted some critical aspects of transaction handling in the context of withheld signatures and preventing confirmation.
When dealing with transactions, a significant detail emerges regarding the non-initiator's contribution of funds. Specifically, the non-initiator only provides funds if they are being compensated by the initiator, which is facilitated through liquidity ads. This mechanism ensures that the buyer covers the on-chain fees for the seller's inputs and outputs. In a scenario where the buyer, Mallory, fails to confirm a transaction, and subsequently, Alice engages with the seller, Bob, it's Alice's responsibility to bear the cost of double-spending Bob's inputs from the unconfirmed transaction.
A practical implementation strategy to mitigate the risks associated with such scenarios involves node operators utilizing a dedicated Bitcoin wallet specifically for leasing funds through liquidity ads. This approach limits exposure to griefing issues to that wallet alone, ensuring the seller does not incur any unexpected on-chain fees resulting from double spends within the liquidity ads ecosystem.
When addressing the prevention of transaction confirmation, the consensus leans towards making it the default behavior to prevent double-spending of genuine transactions that may be delayed in confirmation. However, this does not restrict the non-initiator from unlocking UTXOs post-broadcast if anomalies are detected. Despite challenges in detection, unlocking UTXOs can circumvent potential losses as the double-spend would not incur additional costs because the original transaction would no longer exist.
The requirement for confirmed inputs presents another challenge, particularly in terms of liquidity efficiency. Unconfirmed change outputs represent "locked liquidity" until confirmation is achieved, which is far from ideal. While numerous mitigations have been explored, there seems to be no perfect solution at the lightning layer without accompanying drawbacks. The ultimate resolution appears to lie within improvements at the mempool layer, with innovations like package relay, v3 transactions, ephemeral anchors, and cluster mempool undergoing intensive research. Although widespread implementation of these advancements may take years, there is optimism for their eventual integration.
In the interim, selling liquidity entails an inherent risk. Striking a balance between protocol-level mitigations and heuristic or policy implementations is challenging. Nevertheless, the current proposals appear to achieve a reasonable equilibrium between the two, offering a tentative solution until more substantial mempool enhancements become a reality.