Login
Learn Bitcoin is live in Beta - spot an issue or have a suggestion? We'd love to hear it!
Home Glossary H HTLC (Hashed Time-Locked Contract)

HTLC (Hashed Time-Locked Contract)

A mechanism requiring a secret (preimage) to unlock payment before a time lock expires, core to LN and atomic swaps.
Share

HTLCs combine two elements: a hash (locking in the secret) and a time lock (forcing resolution within a set period). If the recipient reveals the correct preimage, they claim the funds immediately. If not, after the expiry, the sender recovers their coins. This design enables trustless payment channels in the Lightning Network and cross-chain atomic swaps, ensuring that either the trade completes fairly (by revealing the secret) or it unwinds automatically. HTLCs are essential for bridging untrusted parties without relying on a central authority.

Key takeaways
Enables trust-minimized payment and swaps
Uses a hash puzzle + time lock for safe fallback
Foundation of LN’s multi-hop payment logic
Learn Bitcoin visual
Learn how to

Be Your Own Bank

Be Your Own Bank teaches you how to securely store and manage your Bitcoin, giving you full control over your finances. Unlock the power of self-custody and financial sovereignty, so you can confidently operate without intermediaries.

Take the Survey
30 sec
Free
Suggest a Term

Have a term to suggest? Enter it below and help us expand our vocabulary!