Lightning commitments
Terms used in this lesson
- HTLC
- Hashed Timelock Contract: a conditional payment that requires a secret before a deadline or permits a later refund.
- Preimage
- The original secret data whose hash equals a previously committed value.
Revocable commitments, HTLCs, timelocks, and justice or replacement mechanisms manage unilateral closes.
Loading lesson visuals...
Learn the idea
Lightning commitment transactions represent each channel party's current unilateral settlement. Revocable commitment designs punish publication of an old state by revealing a revocation secret to the counterparty. A contest delay postpones the obsolete broadcaster's ordinary local-output path; it does not make the revocation path disappear at maturity. After the delay, conflicting spends race until one confirms. HTLC means Hashed Timelock Contract, a conditional output with separately authorized preimage and timeout paths. Expiry enables the timeout path; it does not necessarily disable a still-valid preimage path, so post-expiry conflicts require a confirmation winner.
Build asymmetric commitments
Each party holds a different commitment transaction with delayed local outputs and immediately claimable remote outputs, arranged to support punishment.
Inspect every idea above to open it.
A party may retain old signed transactions. Revocation secrets and delayed outputs make broadcasting them punishable rather than technically impossible.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.