Skip to main content

Hashed Time-Locked Contract (HTLC)

smart-contract
payment-channel
security

A contract that locks funds with both a hash condition and a deadline, enabling atomic swaps and routed payments.

Also known as
htlc
1
concept

An HTLC locks funds behind two conditions: a recipient can claim by revealing the preimage to a known hash before a deadline, or the sender can refund after the deadline. This creates an all-or-refund structure for payments that cross parties or chains.

2
mechanics

The contract contains a hash H, a claim path requiring a value x where hash(x)=H, and a refund path that becomes valid after time T. Timelocks may be absolute, such as CLTV, or relative, such as CSV.

3
security

HTLC safety depends on secure hash functions, correct scripts, and timelocks that leave enough time to react. Cross-chain designs must account for different block times, reorg risk, fees, and mempool congestion.

Conceptual links

Related terms

3 linked

Explore connected entries beyond the alphabetical index.

All terms and definitions may update as the Cryptionary improves.