Cross-Consensus Atomic Swap

Hash time lock contract, or HTLC for short, is a composition of a hash lock and a time lock.[1] The hash lock authorizes a claim transaction. The time lock authorizes a refund transaction. The result of this contract is either claim or refund for both parties[2], assuming that transactions are timely confirmed by the consensus algorithms. It is also named an atomic swap.

Hash Lock

Hash lock is a cross-consensus authorization mechanism that requires a preimage of a cryptographic hash.

Implemented types:

Time Lock

Time lock is a cross-consensus authorization mechanism that requires a specified consensus time or height to pass.

Implemented types:

RPC API

In version 0.3 RPC API will be implemented.

The proposed API is subject to change due to an issue 144.

References

  1. gmaxwell, Re: P2PTradeX: P2P Trading between cryptocurrencies, .
  2. satoshi, Re: BitDNS and Generalizing Bitcoin, .