As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [hash-time-locked-contract]

A Hash Time Locked Contract (HTLC) is a conditional payment that requires the recipient to reveal a hash preimage. It also includes a time lock clause that allows the payment to be refunded after a certain time. HTLCs are used in Lightning Network channels, atomic swaps and other protocols.

Filter by
Sorted by
Tagged with
7 votes
2 answers
2k views

HTLC (Hash Time Lock Contract) using bitcoin-qt

Is it possible to manually create a HTLC using the bitcoin-qt command line? I know how to manually creating createrawtransaction/sendrawtransaction using the bitcoin-qt clients command line, and ...
oshirowanen's user avatar
10 votes
1 answer
2k views

How is a node in the middle prohibited from keeping the money in a routed Payment in Lightning network?

It is my understanding that Lightning is to scale with users having only few payment channels by leveraging the six degrees of separation theory to facilitate payment routing. I understand how onion ...
Murch's user avatar
  • 69.8k
8 votes
1 answer
3k views

What is a hash pre-image as it is used for the breach remedy?

Until this afternoon I thought the anti-cheat transactions or breach remedies built on the exit-transaction of the counterparty. Apparently, they build on something called a "hash pre-image". What is ...
Murch's user avatar
  • 69.8k
3 votes
1 answer
395 views

Why does every HTLC in a commitment transaction require its own signature?

From BOLT 02 we can learn When a node has changes for the remote commitment, it can apply them, sign the resulting transaction (as defined in BOLT #3), and send a commitment_signed message. 1. type: ...
Rene Pickhardt's user avatar
2 votes
1 answer
225 views

What happens if R is not revealed by one of Lightning Network nodes? (Payment cancelation)

Let's say we have route of 3 hops A -> B -> C -> D (A pays D). And in the middle of payment (revealing secret R stage) node C disappear from network. In this case B will be not able to finalise ...
Jaro's user avatar
  • 123
2 votes
2 answers
78 views

Automatic force closure and on chain settlement of expired HTLC

After roughly a month of mostly smooth operation a lightning node (LND 0.16.2-beta) automatically initiated a force closure of a channel. Two days later an expired HTLC was settled on-chain. In both ...
Andreas's user avatar
  • 31
1 vote
2 answers
91 views

What would happen to Bitcoin if GPS/Galileo timing ceased to be available?

According to this web site, the timing from a system like GPS is essential to "financial networks [which] rely on precision timing for synchronization and operational efficiency." Is the ...
brethvoice's user avatar
1 vote
1 answer
324 views

Reuse of payment hash in Lightning Network

Suppose there exist two such payment transfer request: A transfers 1 msat to R via A->B->C->R and S transfers 5 msat to R via S->B->C->R. Let the two HTLCs be formed across both the paths ...
Subhra Mazumdar's user avatar