Outlines the main protocol model for performing atomic swaps between parties
commit
and setting the timelock to , where is the current timestamp and is the duration for which the user is willing to lock their funds. The party performing the exchange must then call the lock
function on the destination chain, setting the timelock to (), where is a reasonable duration (e.g., 15 minutes) to ensure the user has time to act and leave sufficient time for the party. Finally, the user calls addLock
, specifying the timelock and completing their commitment with a hashlock.
Here are the steps:
User Commit
Party Lock
User AddLock
Party Redeem
User Redeem
Standard transaction sequence diagram
User Commit
Solver(AB) Commit
Solver(BC) Lock
User, Solver(AB) AddLock
Unlocks
Multihop transaction sequence diagram