By making atomic swaps practical for bridging, we gain a crucial advantage. The same hashlock can be reused across multiple networks (multi-LP routing) for a single bridging request. Once the secret is revealed, all linked HTLCs/PreHTLCs in all networks can be unlocked.

Let’s assume a user wants to transfer assets from Chain A to Chain C, but no single liquidity provider (LP) supports both chains. Instead, there are two LPs, one supporting transfers from Chain A to Chain B: LP(AB) and another from Chain B to Chain C: LP(BC).

The protocol facilitates this request as follows:

1

User Commit

The user creates a PreHTLC for LP(AB).

2

LP(AB) Commit

Once detected, LP(AB) creates a PreHTLC for LP(BC).

3

LP(BC) Lock

LP(BC) then creates an HTLC for the user.

4

User, LP(AB) AddLock

The user detects the last transaction, retrieves the hashlock, and converts their PreHTLC to an HTLC on Chain A. LP(AB) does the same on Chain B.

5

Unlocks

LP(BC) can now release the user’s funds on Chain C and claim their funds on Chain B, while LP(AB) can claim their funds on Chain A.

Multi-hop transactions can use two LPs to move funds to the user’s desired destination autonomously. This process can be expanded to include any number of LPs, allowing for multiple “hops” to reach the final destination. Meanwhile, the user still only needs to complete two transactions on the source chain, regardless of the number of hops.

Was this page helpful?