Locking of funds by both parties in HTLC to enforce penalty



Summary:

The conversation is about the construction of Hashed Time-Lock Contracts (HTLCs) in the Bitcoin Lightning Network. The initial question was why another HTLC needs to be established from B to A when a single HTLC from A to B should suffice for a simple transfer of funds from A to B. The response clarified that the use case presented involved multiple hops, and the conventional conclusion is that punishment cannot be enforced in an HTLC from A->B->C because the HTLCs need to be set up from left to right, and A cannot punish B for not revealing the secret because A does not know it. However, punishment would work in an atomic swap example where payment is made A->B->A. The conversation then shifted to the idea of enforcing penalties on the counterparty in the terms of the HTLC itself. The suggestion was made that the terms could be set as 0.4 BTC to A, 0.2 BTC to B, and 0.4 BTC to HTLC, with the HTLC output following either of two paths. If B produces the required information within a set time, it receives back 0.4 BTC; otherwise, after the set time, A can broadcast with 0.4 BTC going to A, preventing B from withholding information and inducing a possible griefing attack across a longer path. The paper on fair atomic swaps was shared as a reference.


Updated on: 2023-06-02T23:57:05.866666+00:00