Explained: Hashed Timelock Contracts in Blockchain Applications

HTLCs can safeguard cross-chain crypto transactions between two parties but there are some vulnerabilities that may need to be taken care of.

Advertisement
Written by Radhika Parashar, Edited by Siddharth Suvarna | Updated: 13 March 2024 11:52 IST
Highlights
  • HTLCs are a way to safeguard funds from third party access
  • HTLCs are still, however, vulnerable to bribery attacks
  • HTLC still largely unfamiliar to the public

Bitcoin and Ethereum are among blockchains that support HTLCs

Photo Credit: Reuters

Cryptocurrencies, the unconventional newbie in the world of finance, is laced with hidden or lesser-known features that when put to use, could safeguard funds against losses. One such feature is called the Hashed Timelock Contract (HTLC). An HTLC is a time-bound smart contract, that allows transfers of crypto funds only after the receiving party punches a secret, pre-decided cryptographic passphrase. Deploying an HTLC while finalising a crypto transfer could ensure that no third party can access the funds – keeping the transaction secure.

In order to complete an HTLC transaction, the receiving party must ensure that they log the passphrase within a pre-decided timeframe. If either of these criteria are not met with, the transaction is not processed.

Advertisement

How are HTLCs Deployed?

HTLCs have two primary components – Hashlock and Timelock.

A hashlock, as per a report by Investopedia, is a cryptographically regenerated version of a public key. The party that decided to send the funds gets to generate hashlocks, which eventually act as private keys. Once generated, hashlocks are uploaded in the form of pre-images that later reveal themselves at the time of the financial transaction.

On the other hand, a timelock is used to add the time element to HTLCs. Each HTLC contract has two timelocks to frame the exact period within which the receiving party need to punch in the cryptographed passphrase to facilitate the transaction.

Advertisement

Where do HTLCs Work?

Bitcoin and Ethereum are among several other blockchains that allow HTLC transactions. These kinds of smart contracts make the overall blockchain industry more interoperable by allowing cross-chain transactions without having to involve a centralised exchange, said a report by Faster Capital.

It is however notable, that HTLCs are subject to some vulnerabilities, out of which bribery attacks sit on top of the heap. In bribery attacks, the attacker can extend a higher transaction fee as a favour to blockchain miners to make them access an HTLC transaction unethically.

Advertisement

Another kind of vulnerability that can affect the successful completion of an HTLC contract is the Malleability attack. Here, the attacker can manage to change the transaction ID of the HTLC causing the transaction to fail all together.

 

Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.

Advertisement

Related Stories

Popular Mobile Brands
  1. iOS 27.2 Update: Six iPhone Apps Set to Get New Features Next Week
  2. Apple Music's New Branding Uses Vibrations to Turn Music Into Visuals
  3. Poco X8s With a 6,330mAh Battery Debuts at This Price
  4. Oppo Find X10 Pro Max Will Launch in India With This Flagship MediaTek SoC
  5. This Diwali, Upgrade to an NVIDIA RTX 50 Series Laptop, Get 6X More Frames From DLSS 4.5
  6. Infinix GT 50 Pro Gaming Bundle Revealed Ahead of October 27 India Launch
  7. Remember Karbonn? Brand Teases India Return With Rebel 5G
  1. iOS 27.2 Update to Reportedly Bring New iPhone Features Across Messages, Apple TV and More Apps
  2. Apple Music Gets a New Black-and-White Brand Identity Inspired by Sound, Liquid Glass
  3. GTA 6 Is Estimated to Have Generated $630 Million From Pre-Orders Already
  4. Infinix GT 50 Pro Gaming Bundle Revealed Ahead of October 27 India Launch
  5. Malaysia Rolls Out Tokenised Bond Platform for Around-the-Clock Settlement
  6. SBI Reports Suspected Data Exposure Affecting 3,897 Customer Records
  7. eMudhra Takes Remedial Action After Security Researcher Flags Weak Intermediate CA Keys
  8. Upbit Operator Dunamu Partners With MoonPay to Advance Stablecoin Payment Solutions
  9. Perplexity Computer for Mac Adds Local AI Mode for Pro, Max Subscribers
  10. Oppo Reno 17 Pro Camera, Display and Battery Specifications Surface Online Ahead of Expected Launch
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2026. All rights reserved.