Hashed Timelock Contract (HTLC)

A payment agreement wherein the receiver or beneficiary is required to acknowledge the receipt of payment before a predetermined time or deadline

Over 1.8 million professionals use CFI to learn accounting, financial analysis, modeling and more. Start with a free account to explore 20+ always-free courses and hundreds of finance templates and cheat sheets.

What is a Hashed Timelock Contract (HTLC)?

A Hashed Timelock Contract (HTLC) is a transactional agreement used in the cryptocurrency industry to produce conditional payments. It is basically a payment wherein the receiver or the beneficiary is required to acknowledge the receipt of payment before a predetermined time or a preset deadline. The receiver is required to acknowledge the payment in the form of cryptographic proof of payment, or else, they forfeit the ability to claim that payment. It is then refunded back to the payee.

Hashed Timelock Contract (HTLC)
Source

Hence, an HTLC basically implements time-bound transactions in the crypto world. If the receiver does not generate a cryptographic proof of receipt of payment within a certain predetermined time frame, they will not receive any money, and the transaction becomes void.

Summary

  • A Hashed Timelock Contract (HTLC) is a transactional agreement used in the cryptocurrency industry to produce conditional payments. It is basically a payment wherein the receiver or the beneficiary is required to acknowledge the receipt of payment before a predetermined time or a preset deadline.
  • The receiver is required to acknowledge this payment in the form of a cryptographic proof of payment, or else they forfeit the ability to claim that payment, and it is refunded back to the payee.
  • Hence, an HTLC basically implements time-bound transactions in the crypto world. If the receiver does not generate cryptographic proof of receipt of payment within a certain predetermined time frame, they will not receive any money, and the transaction becomes void.

What is a Hashlock?

A hashlock, in the world of finance and investment, is a form of a limitation or a restriction that involves capping a cash outflow – i.e., an investment or a purchase – until a specific required parameter, like some important data or a highly anticipated transaction, is publicly revealed. It is an integral part of the hashed timelock contracts system.

What is a Timelock?

A timelock, in the world of finance and investment (specifically in the world of cryptocurrencies), is a type of locking or a restricting mechanism that locks out a transaction or an account until a preset or a predetermined time is not reached. It means that a certain amount of bitcoins or cryptocurrencies will be locked out and will not be spent until a preset or predetermined time is reached.

How Hashlock and Timelock Mechanisms Come Into Play

The HTLC agreement is named after the hashlock and timelock mechanisms because they play a very crucial role in the settlement of crypto transactions.

A hashlock is a limiting or restricting mechanism in the form of a cryptographic key generated by the payer or the one who instigates the transaction. The instigator of the transaction generates a key and hashes it. The hash is then stored until the final transaction is carried out and executed.

A timelock is a locking mechanism used in HTLC agreements. When transactions or contracts are generated using the HTLC system, a set of two timelocks are generated. It is to set two different time constraints on the impending transaction/contract.

The first one is called the CheckLockTimeVerify (CLTV) timelock. It sets a base time and locks and releases the cryptocurrency accordingly. The second timelock is called the CheckSequenceVerify (CSV). It does not lock out the transaction but is instead implemented to keep a check on the number of locks generated, which, in turn, helps in determining the finalization of the transaction.

Advantages of Hashed Timelock Contracts

1. Time-bound transactions

Using a hashed timelock contract system ensures time-bound transactions. It guarantees the timely execution of transactions and hence, the timely execution and receipt of payments.

2. Atomic swaps

Using the HTLC system to settle transactions brings the ability to engage in atomic swaps to the table. An atomic swap is a form of smart contract technology that enables the settlement of cryptocurrency transactions without the use of central bodies, exchanges, or intermediaries. It ensures faster settlement of transactions without any middlemen.

3. Minimize counterparty risk

The primary advantage of HTLC payment settlements is the fact that it minimizes counterparty risk. Its basic function is to minimize counterparty risk by eliminating the “what ifs” of a transaction. It is done by hashlocks and timelocks, thereby ensuring that the settlement of a transaction is 100% ensured.

Learn More

CFI is the official provider of the global Commercial Banking & Credit Analyst (CBCA)™ certification program, designed to help anyone become a world-class financial analyst. To keep advancing your career, the additional resources below will be useful:

0 search results for ‘