Cross-Chain Transfer Flow
Using Private Liquidity Pools and HTLCs
Approach: Private Liquidity Providers with HTLCs
Instead of relying on a DEX or shared liquidity pool, use a decentralized network of liquidity providers. These liquidity providers lock their own funds in HTLCs and facilitate cross-chain transfers by providing the equivalent value on the destination chain.
Steps for Cross-Chain Token Transfer Using HTLCs and Liquidity Providers
Locking Tokens on Chain A:
User A transfers 100 Token 1, and they are locked in an HTLC-based private pool contract on Chain A. This HTLC includes a hash lock and a time lock.
Generating and Sharing the Hash Preimage:
User A's private pool contract generates a secret (preimage) and hashes it. The hash is included in the HTLC on Chain A.
User A's private pool contract shares the hash (but not the preimage) with User B's private pool contract on Chain B via the Bridge contract and a cross-chain communication mechanism such as a decentralized oracle or relay network.
Private Liquidity Pool on Chain B:
A liquidity provider on Chain B has Token 2 and agrees to facilitate the transfer.
The liquidity provider locks the equivalent value of 100 Token 2 in an HTLC on Chain B using the same hash.
Revealing the Preimage:
User A reveals the preimage to unlock the HTLC on Chain A, triggering the process.
The preimage is then used by User B and the liquidity provider on Chain B to unlock the HTLC for Token 2.
Finalizing the Transfer:
User B uses the preimage to unlock and receive the 100 Token 2 from the HTLC on Chain B.
The liquidity provider can use the preimage to claim the 100 Token 1 from the HTLC on Chain A, thus completing the transaction.
Last updated