Hash timer contract: Difference between revisions
[checked revision] | [checked revision] |
CryptoUser (talk | contribs) m (CryptoUser moved page Commoninfo:hashtimercontracts to Hash timer contract) |
CryptoUser (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{#seo: | {{#seo: | ||
|title= Hash | |title= Hash timer contracts (HTLC) — Decimal Wiki | ||
|titlemode= append | |titlemode= append | ||
|keywords= Hash Timer Contracts (HTLC) | |keywords= Hash Timer Contracts (HTLC) | ||
|description= Hash Timer Contracts (HTLC) | |description= Hash Timer Contracts (HTLC) | ||
}} | }} | ||
'''Hash timer contract''' (also known as '''Hashed timelock contract''', or '''HTLC''') is a type of [[smart contract]] in [[cryptocurrency|cryptocurrencies]] to eliminate the counterparty and the risk associated with it. This allows for time-bound [[transaction]]s. | |||
In practical terms, this means that the recipients of the transaction must certify the payment by creating a [[cryptography|cryptographic]] confirmation within a certain period of time. Otherwise, the transaction will not take place. | |||
In practical terms, this means that the recipients of the transaction must certify the payment by creating a cryptographic confirmation within a certain period of time. Otherwise, the transaction will not take place. | |||
HTLC uses several elements from existing cryptocurrency transactions, but there are two of them that distinguish HTLC from standard cryptocurrency transactions. | HTLC uses several elements from existing cryptocurrency transactions, but there are two of them that distinguish HTLC from standard cryptocurrency transactions. | ||
The first is a "hash lock" . This is an encrypted version of the cryptographic key created by the initiator of the transaction. It is used to unlock the original hash. In HTLC, the initiating party generates a key and hashes it. The hash is stored in a preview image, which is subsequently revealed during the last transaction. | The first is a "hash lock". This is an encrypted version of the [[cryptographic key]] created by the initiator of the transaction. It is used to unlock the original [[hash]]. In HTLC, the initiating party generates a key and hashes it. The hash is stored in a preview image, which is subsequently revealed during the last transaction. | ||
The second important element of HTLC is "temporary blocking". To set time limits for contracts created using HTLC, two different locks are applied: | The second important element of HTLC is "temporary blocking". To set time limits for contracts created using HTLC, two different locks are applied: | ||
* '''CheckLockTimeVerify (CLTV)'''. Uses a temporary base for blocking and unblocking cryptocurrencies. This means that the time limits are rigidly programmed by the parties to the transaction and coins are issued only at certain times and dates or from a certain height of the block size. | |||
* '''CheckSequenceVerify (CSV)'''. This lock is not time-dependent, but instead uses the number of blocks generated as a measure to keep track of when to complete a transaction. Using HTLC eliminates the need for trust, because the contract creates a specific set of rules that prevent partial execution of an atomic swap. | |||
== See also == | |||
* [[Hash function]] | |||
* [[Smart contract]] | |||
[[Category:Commoninfo]] | |||
[[Category:Smart contracts]] | |||
Latest revision as of 18:15, 13 February 2024
Hash timer contract (also known as Hashed timelock contract, or HTLC) is a type of smart contract in cryptocurrencies to eliminate the counterparty and the risk associated with it. This allows for time-bound transactions.
In practical terms, this means that the recipients of the transaction must certify the payment by creating a cryptographic confirmation within a certain period of time. Otherwise, the transaction will not take place.
HTLC uses several elements from existing cryptocurrency transactions, but there are two of them that distinguish HTLC from standard cryptocurrency transactions.
The first is a "hash lock". This is an encrypted version of the cryptographic key created by the initiator of the transaction. It is used to unlock the original hash. In HTLC, the initiating party generates a key and hashes it. The hash is stored in a preview image, which is subsequently revealed during the last transaction.
The second important element of HTLC is "temporary blocking". To set time limits for contracts created using HTLC, two different locks are applied:
- CheckLockTimeVerify (CLTV). Uses a temporary base for blocking and unblocking cryptocurrencies. This means that the time limits are rigidly programmed by the parties to the transaction and coins are issued only at certain times and dates or from a certain height of the block size.
- CheckSequenceVerify (CSV). This lock is not time-dependent, but instead uses the number of blocks generated as a measure to keep track of when to complete a transaction. Using HTLC eliminates the need for trust, because the contract creates a specific set of rules that prevent partial execution of an atomic swap.