Hash Time-Locked Contract (HTLC)
smart-contract · payments · cryptography
A conditional payment that can be claimed with a secret before a deadline or refunded after the deadline.
- Also known as
- Hashed Timelock Contract
1.general
A Hash Time-Locked Contract (HTLC) combines a hash lock and a time lock. Before the deadline, one spending path requires the secret preimage of a committed hash; after the deadline, a fallback path can return or redirect the funds.
2.uses
HTLCs are used in payment-channel routing and cross-chain atomic swaps. Revealing the preimage to claim one conditional payment can allow another participant to claim a linked payment under the same hash condition.
3.limits
Safety depends on compatible hash functions, correctly ordered timeouts, chain access, confirmation assumptions, and transaction malleability rules. An HTLC coordinates conditional settlement; it does not remove liquidity, privacy, routing, counterparty, or software risks around the larger protocol.
Related terms
Atomic Swap
→A trustless exchange of assets across chains using time-locked contracts.
technology · trading
Hash
→A fixed-length digital fingerprint calculated from data.
cryptography · security
Timelock
→A spending rule that prevents a transaction or output from being used until a specified time or block height.
scripting · bitcoin
Payment Channel
→A protocol that locks funds on-chain while participants exchange authorized balance updates off-chain before final settlement.
payments · layer-2 · scaling
Help make this definition clearer. Suggest a correction.