Search looks through the written questions first. The AI only answers when nothing matches.

What is a Lightning HTLC?

Experienced · Updated

A Lightning HTLC locks a payment across hops with a hash. Whoever knows the preimage, the value whose hash was agreed, can claim the payment. Whoever does not reveal it in time can be refunded after a timeout. Each hop has its own deadline. The deadlines are staggered so that an honest hop has time to pass the claim backwards after seeing the preimage. The amounts differ by each hop's fee. The hash is the same along the route.

For you, the payment either completes, when the preimage travels the route, or it refunds after the timeouts, if someone stops. It is not instant finality. A hop that is offline near the end of the deadline can push the channel on chain. For someone running a Lightning node, an HTLC is a conditional output in the channel state: it is claimed with the preimage or returned after the timeout. How to extract value from a hop is not described here. The contract is: hash to claim, time to refund.

Informational text from Criptos.ai. It is not a buy or sell recommendation, and it is not tax advice. This is general information, not financial, tax or legal advice. We do not promise gains.

In the glossary

Articles

In the Academy: Advanced · In the Academy · In the glossary

Related questions