Cointegrity

Hashed Timeclock Contracts (HTLCs)

Web3 / smart contracts

Hashed Timeclock Contracts are cryptographic protocols that enable two parties to exchange assets across different blockchains without requiring a trusted intermediary. They work by combining three key elements: a cryptographic hash function that locks funds until a secret is revealed, a time lock that allows the sender to reclaim funds if the recipient fails to claim them within a deadline, and conditional logic that releases payment only when both conditions are satisfied. HTLCs are fundamental to atomic swaps, allowing Bitcoin holders to directly trade with Litecoin holders, for example, with absolute certainty that either both transactions settle or both are reversed. Example: The Lightning Network extensively uses HTLCs to route payments across its payment channels, enabling fast Bitcoin transactions by locking funds with time constraints and hash preimages until intermediaries forward payments along the route. Why it matters for smart contracts: HTLCs demonstrate how smart contracts can eliminate counterparty risk in cross-chain transactions, reducing reliance on centralized exchanges and custodians while establishing a pattern for conditional, time-dependent contract execution.

Category: smart contracts, cross chain

Explore the full Web3 Glossary — 2,048+ expert-curated definitions. Need guidance? Talk to our consultants.