Skip to content

Contracts for cBridge, cross-chain liquidity solution powered by Hashed-Timelock Transfers

Notifications You must be signed in to change notification settings

celer-network/cBridge-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d1a097b · Nov 1, 2021

History

25 Commits
Jul 22, 2021
Jul 16, 2021
Nov 1, 2021
Jul 16, 2021
Jul 16, 2021
Aug 23, 2021
Jul 16, 2021
Jul 8, 2021
Jul 22, 2021
Nov 1, 2021
Jul 22, 2021
Jul 16, 2021
Jul 16, 2021

Repository files navigation

cBridge-contracts

Contracts for cBridge, cross-chain liquidity solution powered by Hashed-Timelock Transfers.

The lifecycle of a cross-chain transfer is as simple as follow:

  1. Sender sends transferOut tx on the source chain.
  2. Bridge node sends transferIn tx on the destination chain, using the same hashlock set by the sender.
  3. Sender confirms the transfer on the source chain.
  4. Bridge node confirms the transfer on the destination chain.

If any party is not cooperative during the process, others can use the confirm and refund methods to finish or cancel the transfer forcefully.

This version of cBridge contract is tailored for users who want to efficiently transfer funds across different blockchains without any upfront liquidity locking or additional withdrawal operations. Alternatively, Celer state channel network (L1 contract, L2 node) supports cross-chain token transfer with higher throughput and lower amortized cost for repeated transfers. The trade-off is that users need to lock their funds in the state channel network upfront and perform additional withdrawal operations to move their funds out of the network.