Understanding Hashed Time Lock Contracts

Understanding Hashed Time Lock Contracts


When cryptocurrency came into existence, the idea behind it was to allow two or more people send or receive payments digitally through advanced and encrypted manner, thereby eliminating the need of having to trust each other for the payments to be done. Cryptocurrencies have emerged as the most reliable medium to send money to people over the internet. Not only does it lower the transaction cost but also helps people not to get scammed while they are trying to do the transactions. A payment technology that makes this possible goes by the name hashed time lock contracts (HTLCs).

The Hashed Time Lock Contract (HTLC) is a new class of payments that employs hash locks and timelocks. In this, the people who have agreed to some financial arrangement send or receive money in the form of cryptocurrencies. The catch here is that the party on the receiving end has only a certain amount of time to accept the payment and failure to do so results in money being sent back to the sender.

How do HTLCs work?

HTLC can be understood as a simple technique for building protocols for atomics swaps. The wide range of implications is getting the developer excited about everything that can be achieved using HTLCs. The opportunities being offered by this technique can be said to be limitless. Here’s an insight into how HTLCs work.

  • A person who has to make a payment sets up a specific hash that signifies the amount of money that has to be paid.
  • The recipient will now have to create a cryptographic proof of payment to receive the payment. This has to be done in a certain amount of time or else the payment will be sent back to the sender. It may be noted here that the time allowed for the recipient to accept the payment varies from one time-locked contract to the other.
  • If the deadline is met by the recipient, he gets the stipulated amount of money and if the deadline is missed, the money goes back to the sender.
  • Using the HTLCs, it becomes very important to meet the deadlines.

Advantages of using HTLCs

HTLCs are akin to cross-chain atomic swaps. Probably, we can call the cross-chain atomics swaps the origin of the HTLCs. Unlike the popular cross-chain transfer, HTLCs are governed by the deadlines. The usage of timelocks and hash locks provides the benefit of making payments routable across two or more payment mediums. A few important advantages being offered by the HTLCs are discussed below.

  1. HTLCs eliminate the need for the recipient to have to have to wait indefinitely to be able to get the payment. HTLCs are time sensitive and meeting the deadlines is very important
  2. There is no loss of money if the payment is not accepted. For some reasons, if the recipient misses the deadline, the payment is safely returned to the sender.
  3. HTLCs are secure. The recipient will need the cryptographic proof of the payment to be able to accept it. This allows the recipient to also validate the payment on the blockchain.
  4. Due to the creation of hashes in the hashed time lock contracts, it becomes really easy to add them to the blockchains.
  5. Both the parties involved in the process are protected from the risk because of the structure of the HTLCs. There is no need to trust the other party or even know them for the payment.

A few major implications of the HTLCs are discussed below:


  • Beneficial for Cross-chain Trading


HTLCs can prove to be highly beneficial for cross-chain trading my employing atomic swaps. This will allow the people to exchange different cryptocurrencies within a certain amount of time even if they are present on different blockchains. This means using time-locked contract a person can change from one cryptocurrency to other within a few minutes.


  • Improvement of the ability of investors and traders


Further, HTLCs are said to improve the ability of the traders and investors as they can make rapid cryptocurrency trades, and respond very quickly to any market news to earn profits. The first atomic swap ever was done in 2017, and using HTLCs for the purpose can give birth to entirely a new cryptocurrency trading system.


  • Useful for the businesses

The businesses that make contractual offers on time-sensitive basis can benefit a lot from the HTLCs. For instance, a business requires some work to get done and has to choose between many contractors who are offering to do it. The business can create a hashed time lock contract to the contractor where they ask him to decide on it within two or three hours. If the contractor accepts the job within the time frame, he gets the contract and the money will be transferred to him. However, if he fails to respond within the specified time, the money will be returned to the business and can be then offered to another contractor using a new HTLC.

HTLC Application in QuickX

The QuickX protocol makes the use of HTLCs to make secure fund transfer through a network of channels with multiple hops to the final destination. A global state is allowed among the multiple nodes using hashes. It is further assured by time-sensitive nature of the HTLCs. The important feature offered by HTLCs in QuickX protocol is that it doesn’t require the trust of the counterparty. HTLCs is one of the key requirements to be compatible with the QuickX protocol.

HTLCs is an exciting development that can benefit both the individuals and the businesses. They significantly reduce the friction and simplify the contracts, and therefore, exhibit the huge potential of attracting more customers. Anyone who wishes to set up a contract without having to trust the counterparty can benefit from this concept. HTLCs do not disturb the blockchains in any manner and allow for seamless payments to be made in cryptocurrency within a specified time. It is expected that HTLCs will make the cryptocurrencies more popular than they are. Being a very interesting financial development, HTLCs usage is expected to grow over the time.

Follow us & participate …
Homepage: http://QuickX.io
Facebook: https://facebook.com/quickxprotocol
Twitter: https://twitter.com/quickxprotocol
Medium: https://medium.com/quickxprotocol
Reddit: https://www.reddit.com/user/quickxico/
Telegram: https://t.me/quickxprotocol
Whitepaper: https://quickx.io/whitepaper/QuickXProtocolv1.7.pdf