Hash Time-Locked Contract
A Hash Time-Locked Contract is a specialized smart contract that requires a cryptographic proof and a time constraint to release funds. It is the core technology enabling atomic swaps, ensuring that a transaction is only finalized if both parties provide the correct secret key within a set period.
If the key is not provided before the time expires, the contract locks and returns the assets to the sender. This mechanism effectively removes the need for a trusted third party in cross-chain or off-chain transactions.
It acts as an escrow that is governed by mathematics rather than legal agreements. The hash lock ensures that the secret key used by one party can be used by the other to claim their assets, preventing one-sided execution.
This protocol design is critical for building trustless bridges and layer two payment channels. By using these contracts, participants can interact with confidence, knowing the protocol enforces the exchange rules.
It is a fundamental tool for managing counterparty risk in a decentralized financial system.