Hashed Timelock Contracts
Hashed Timelock Contracts are a type of smart contract that uses cryptographic hash functions and time-based constraints to facilitate secure, trustless exchanges. In an atomic swap, both parties must provide a secret key to unlock their funds within a specific time limit.
If the key is not provided in time, the funds are automatically refunded to the sender. This mechanism prevents either party from taking the funds without fulfilling their obligation.
Hashed Timelock Contracts are the foundation of many decentralized exchange protocols and lightning network payment channels. They enable cross-chain transactions without requiring a centralized intermediary or trusted third party.
By enforcing strict logical conditions, they ensure that the transaction is atomic, meaning it either happens entirely or not at all. They are a core component of the trustless infrastructure in the crypto ecosystem.