Hash Time Locked Contracts (HTLCs) Explained

2 min readDec 17, 2020

Today, the traditional financial system operates on a centralized model. With forms of money that always require third party custody and arbitration, we miss out on the benefits of programmability and automation, not to mention the lack of real ownership and risks of censorship.

This changes with the advent of Bitcoin and blockchain technologies, which enable people to both own and program money. The result is the rapid advances in peer-to-peer (P2P) finance, transactions that do away with centralized intermediaries. One key innovation which enables this is Hash Time Locked Contracts (HTLCs).

Simply put, HTLCs are time-bound conditional payments through programmable escrows which enable conditional P2P value transfer to minimize counterparty risks.

Imagine Party A is sending BTC to Party B through a HTLC. It consists of a hashlock and a timelock. After Party A sends BTC to an address that only Party B can spend, the hashlock requires Party B to provide the correct secret phrase to claim the funds. The secret phrase can be shared via private communication channels. With the timelock, Party B is required to claim the funds prior to an expiry time; otherwise the transaction defaults to a refund to Party A.

In this way, Party A and B do not need to rely on a third party for sending BTC. What’s more, HTLCs can be leveraged to build more advanced applications. For example, HTLCs implemented both ways across two blockchains result in cross-chain atomic swaps. Other applications include data swaps via Bitcoin transactions called Zero Knowledge Contingent Payments (ZKCPs), and the Lightning Network.

HTLCs are fundamental building blocks to the internet of money. They provide alternatives to the traditional financial system unencumbered by trusted third parties, creating truly self-sovereign and programmable money.

For more information, please visit our website.

Join our Telegram and community conversations or say hi to us at any of the channels below: