Skip to content

celer-network/cBridge-contracts

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.