Skip to main content

Hashed Timelock

Definition

A hashed timelock is a cryptographic primitive used to create conditional payments that are time-bound and require a secret to be revealed. This mechanism combines a hashlock, which demands the revelation of a secret for funds to be spent, with a timelock, which returns funds to the sender if the secret is not revealed within a set period. Hashed timelocks are fundamental to atomic swaps, enabling trust-minimized exchanges of cryptocurrencies across different blockchains. They ensure that either both parties complete a transaction or neither does, preventing loss of funds for either participant.