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.

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.

Advertisement

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.

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.

 

For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.

Advertisement

Related Stories

Popular Mobile Brands
  1. Flipkart's Big Billion Days Sale Samsung Galaxy S24 Ultra Deal Leaked
  2. Samsung Galaxy Tab S10 Lite With Exynos 1380 SoC Launched in India
  3. iPhone 17 Series Available to Pre-Order in India: See Price, Offers
  4. Moto Pad 60 Neo Launched in India: Check Price, Features
  5. OTT Releases This Week: An Action-Packed Weekend Awaits You With These Releases
  6. Sony Xperia 10 VII Launched With 5,000mAh Battery and This Snapdragon Chip
  7. Samsung Galaxy Buds 3 FE Launched in India With ANC, Galaxy AI Features
  8. Nintendo Direct: Here Are All the Major Announcements
  1. NASA Restores Contact With TRACERS Spacecraft SV1 After Communication Loss
  2. Mario Tennis Fever, Super Mario Galaxy 1+2, Donkey Kong Bananza DLC: Major Announcements at Nintendo Direct
  3. James Webb Space Telescope Spots Rare Protostar Blasting Twin Jets Across Milky Way
  4. Scientists Say Solar Flares Are Hotter Than Expected, Could Reach 108 Million Degrees
  5. Artiste OTT Release: This Is Where You Can Watch the Telugu-Language Crime Thriller
  6. Borderlands 4 Becomes Series' Biggest Steam Launch Ever With Over 200,000 Concurrent Players
  7. Meesha Is Now Streaming on Sun NXT: All About This Malayalam Survival Drama
  8. KuCoin Taps Golfer Adam Scott as First Global Brand Ambassador
  9. Poco M7 Plus 5G to Be Available in New 4GB RAM Variant in India on September 22
  10. Realme Could Be Working on Clip-Style Earbuds, Patent Application Shows
Gadgets 360 is available in
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2025. All rights reserved.