Hash Time-Locked Contracts (HTLCs)
Web3 / infrastructure applications
Hash Time-Locked Contracts are smart contracts that enable secure payment transfers by conditioning fund release on two cryptographic conditions: knowledge of a pre-image to a hash function and satisfaction of a time constraint. The sender generates a random secret, creates its hash, and includes this hash in the contract. The recipient can claim funds only by revealing the pre-image within the specified timeframe; if unclaimed, the sender recovers the funds. This mechanism enables trustless atomic swaps across blockchains and underpins routing protocols like the Lightning Network, where payments flow through intermediaries without requiring trust. Example: The Lightning Network uses HTLCs to route payments across the network, allowing Alice to pay Carol through Bob without trusting Bob. If Bob fails to forward the payment, the HTLC automatically refunds Alice after the timeout expires. Why it matters for blockchain infrastructure: HTLCs enable cross-chain atomic swaps and trustless payment routing, fundamental building blocks for interoperability and multi-hop payment networks. They demonstrate how cryptographic conditions can replace trust in decentralized systems.
Explore the full Web3 Glossary — 2,038+ expert-curated definitions. Need guidance? Talk to our consultants.