Coder Social home page Coder Social logo

feiyiban / cbridge-contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from celer-network/cbridge-contracts

0.0 0.0 0.0 264 KB

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

JavaScript 10.30% TypeScript 47.78% Solidity 41.92%

cbridge-contracts's Introduction

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.

cbridge-contracts's People

Contributors

dominator008 avatar xiaozhou avatar zhangqi021 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.