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.

Advertisement

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. Samsung Galaxy Z Fold 8 Ultra Could Cost More Than Expected, Listing Suggests
  2. Oppo Find X10 Series Specifications Leak Online
  3. Google's Fitbit Air Spotted on Amazon India Ahead of Official Launch
  4. Tecno Camon 50 Ultra 5G Sale Begins in India Today
  5. Dell Alienware 16X Aurora Launched in India Alongside Alienware Area-51 Series
  6. These OnePlus Smartphones Could Receive the ColorOS 17 Update in India
  7. Redmi Note 17 Pro Max Listed on NBTC Website Ahead of Imminent Launch
  1. OnePlus 11, Nord 4, and Newer Models Tipped to Receive the Android 17-Based ColorOS 17 Update in India
  2. Redmi Note 17 Pro Max Appears on Thailand's NBTC Certification Database, Might Launch Soon
  3. Apple’s First Foldable iPhone Reportedly Appears in iOS 27 Beta Code With a Multi-Battery Setup
  4. X for Android App Undergoes Major Design Overhaul, Enhanced Performance and Reliability
  5. Samsung Galaxy Buds Able to Reportedly Skip Galaxy Unpacked Launch; Could Debut in October
  6. Dell Alienware 16X Aurora, Alienware 16 Area-51 and Alienware 18 Area-51 Launched in India: Price, Specifications
  7. Samsung Galaxy A55, Galaxy A35 One UI 9 Test Builds Reportedly Spotted Ahead of Android 17 Rollout
  8. Xiaomi Pad 9 Could Launch Soon With a Bigger Battery, Certification Listing Suggests: Expected Specifications
  9. Redmi 17 4G EPREL Certification Listing Gives an Early Look at Its Specifications
  10. Tecno Camon 50 Ultra 5G Goes on Sale in India With Dimensity 7400 Ultimate SoC: Price, Offers
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2026. All rights reserved.