What Is A Hashed Timelock Contract?
A hashed timelock contract is a smart contractWhat Is A Smart Contract? A smart contract is a digital contract that is enforced by code rather than a trusted third party. Smart contracts are executed automatically when the... that allows anyone to lock bitcoin at an address until certain conditions have been met. For example, one party might require that the other party provide proof of receipt before the funds are released. HTLCs are often used in conjunction with payment channels, such as the lightning networkWhat Is The Lightning Network? The lightning network is a layer 2 payment protocol that enables near-instant, low-fee, private payments on the Bitcoin network. It is intended to enable scalable,..., to facilitate trustless payments.
If you’ve been involved in the bitcoin space for any length of time, you’ve probably heard of the Lightning Network. The Lightning Network is a payment protocol that uses smart contractsWhat Is A Smart Contract? A smart contract is a digital contract that is enforced by code rather than a trusted third party. Smart contracts are executed automatically when the... to enable trustless, near-instant payments between two parties. A key component of the Lightning Network is the Hashed Timelock Contract (HTLC).
An HTLC is typically made up of two parts: a hashWhat Is A Hash? A hash, or cryptographic hash, is a mathematical function that takes digital data of any size as an input and produces a digital output of a... lock and a timelock. The hash lock is a cryptographic math equation that must be solved in order to release the funds. The timelock is a mechanism that ensures that the funds can only be released after a certain amount of time has elapsed. This combination of hashlock and timelock makes it virtually impossible for one party to cheat or defraud the other.
HTLCs are commonly used in conjunction with payment channels, such as the Lightning Network. Payment channels are off-chain transactions that are only broadcast to the blockchainWhat Is The Blockchain? The blockchain is the public record of bitcoin transactions, which are organized into blocks that are all chronologically linked to one another. Because every block is... when they are finalized. This allows for much faster and cheaper payments, as there is no need to wait for confirmations from the blockchain. However, it also means that there is a greater risk of one party defaulting on the payment. To mitigate this risk, HTLCs are often used to lock up funds in escrow until both parties have signed off on the transaction.