rand calculates its hash
H. Then, Alice posts a transaction on the Bitcoin network using
Hto lock 1 BTC with unlocking conditions to be either a) 1 BTC will be transferred to Bob with the given
r(satisfying the condition
Hash(r) = H, or b) 1 BTC will be returned to Alice after a certain wait time (e.g. 6 hours). Note that, Alice only discloses
rin this step.
Hto publish a transaction to lock 100 LTC on the Litecoin network. The unlock conditions are either a) 100 LTC will be transferred to Alice with the given
rsatisfying the condition
Hash(r) = H, or b) 100 LTC will be returned to Bob after a certain wait period (need to be less than Alice's time, such as 3 hours).
rto unlock Bob's transaction on the Litecoin network. As a result, Alice receives Bob's 100 LTC. This step will also disclose
rto the network.
r, he can proceed to unlock Alice's transaction on the Bitcoin network and receives 1 BTC from Alice as a result of the transaction.
rcan unlock a transaction on two separate unrelated blockchains, controlling both transactions to be either completed or dismissed at the same time. This is why this process is also known as atomic swaps.