All Projects → nervosnetwork → force-bridge-eth

nervosnetwork / force-bridge-eth

Licence: MIT license
Decentralized, trustless bridge between Ethereum and Nervos.

Programming Languages

rust
11053 projects
solidity
1140 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to force-bridge-eth

ckb-sdk-js
JavaScript SDK for CKB
Stars: ✭ 35 (+9.38%)
Mutual labels:  ckb, nervos
nxtp
Nxtp is a lightweight protocol for generalized crosschain transfers.
Stars: ✭ 129 (+303.13%)
Mutual labels:  interoperability, crosschain
ckb-sdk-java
Java SDK for CKB
Stars: ✭ 26 (-18.75%)
Mutual labels:  ckb, nervos
cpptcl
C++ library for interoperability between C++ and TCL
Stars: ✭ 33 (+3.13%)
Mutual labels:  interoperability
crosscloudci
Integrating, testing, and deploying projects within the CNCF ecosystem. Results published daily to the CNCF CI Dashboard.
Stars: ✭ 83 (+159.38%)
Mutual labels:  interoperability
ccn-lite
CCN-lite, a lightweight implementation of the CCNx protocol and its variations
Stars: ✭ 71 (+121.88%)
Mutual labels:  interoperability
linkedresearch.org
🌐 linkedresearch.org
Stars: ✭ 32 (+0%)
Mutual labels:  interoperability
WeCross
WeCross跨链路由
Stars: ✭ 183 (+471.88%)
Mutual labels:  crosschain
rust-to-ios
Example project for building a library for iOS in Rust.
Stars: ✭ 66 (+106.25%)
Mutual labels:  interoperability
trampoline
A complete dapp development framework for Nervos Network
Stars: ✭ 27 (-15.62%)
Mutual labels:  nervos
datasacks
Tools to make Unity3D UI connections better.
Stars: ✭ 24 (-25%)
Mutual labels:  interoperability
CL-CXX-JIT
Common Lisp and CXX interoperation with JIT
Stars: ✭ 40 (+25%)
Mutual labels:  interoperability
hashport-validator
Official repository containing the source code of the Hashport validators
Stars: ✭ 19 (-40.62%)
Mutual labels:  interoperability
CommonCoreOntologies
The Common Core Ontology Repository holds the current released version of the Common Core Ontology suite.
Stars: ✭ 109 (+240.63%)
Mutual labels:  interoperability
ckb-demo-ruby
CKB Demo Ruby SDK
Stars: ✭ 28 (-12.5%)
Mutual labels:  ckb
speckle-blender
speckle.systems/tag/blender/
Stars: ✭ 38 (+18.75%)
Mutual labels:  interoperability
ethrelay
Ethereum smart contracts that enable the verification of transactions of a "target" blockchain on a different "verifying" blockchain in a trustless and decentralized way
Stars: ✭ 34 (+6.25%)
Mutual labels:  interoperability
cordage
Cordage: the blockchain interoperability project!
Stars: ✭ 52 (+62.5%)
Mutual labels:  interoperability
sgn-v2-contracts
Smart Contracts for Celer State Guardian Network (SGN) V2 and cBridge V2
Stars: ✭ 74 (+131.25%)
Mutual labels:  crosschain
bitshares-mobile-app
This is the mobile app for bitshares blockchain
Stars: ✭ 44 (+37.5%)
Mutual labels:  crosschain

Force Bridge ETH

Force bridge is a bridge which connects CKB with other blockchain systems( aka cross-chain protocol ).

Force-Bridge-ETH is the Ethereum component. Messages consist of transactions、events and states on Ethereum can be transferred to CKB. In reverse, messages about transactions on CKB can be transferred to Ethereum.

In other words, dapps on two sides can interoperate with each other based on force-bridge-eth.

In the remaining part of this document, we will refer force-bridge-eth as force bridge for simplification.

Design

Cross-chain refers to the credible communication between blockchains. Generally, cross-chain protocols need solve two problems:

  1. The credibility of cross-chain messages, that is, the authenticity of the message can be verified.
  2. The comprehensibility of cross-chain messages, that is, messages can be decoded by another party.

For the first problem, force bridge maintains light clients in smart contracts on both chain and use light clients to verify that transactions or events did happened on the counter party chain. The concept of on-chain light client is similar to lightweight node on BTC. And we use a mechanism called SPV ( Simplified Payment Verification ) to accomplish the verification.

At the first stage, force bridge will maintain the light client in multi-signature notary scheme. A committee consists of Nervos Foundation and the community members will submit headers to the light client, along with their signature.

At the second stage, force bridge will replace the multi-sig-light-client with consensus-based-light-client. It will be a full decentralized way. Everyone can submit headers. The contract will verify the header with the consensus algorithm of the chain.

For the second problem, CKB uses molecule for serialization and blake2b for hashing, corresponding to rlp and keccak256 on Ethereum. So we developed molecule and blake2b library on Ethereum to decode messages from CKB, rlp and keccak256 library on CKB to decode messages from Ethereum.

Thereafter, we can transfer messages between CKB and Ethereum.

Ethereum to CKB

The Ethereum header contains state/transaction/receipt root, so messages of these three kinds can be transferred and verified.

Take assets transfer as an example:

  1. We can lock ETH/ERC20 token in an asset bridge contract with events emitted on Ethereum.
  2. Then transfer the receipt message to CKB, that is to say, construct a CKB transaction with receipt and merkle proof as witness.
  3. The constructed CKB transaction will mint mirror asset after verify the message by Ethereum client.

CKB to Ethereum

The CKB header contains transaction merkle root, so messages of CKB transaction can be transferred and verified.

Take assets transfer as an example:

  1. We can burn SUDT ( Simple User Defined Token ) on CKB.
  2. Then transfer the transaction message to Ethereum, that is to say, call unlock method of the asset bridge contract with transaction data and merkle proof.
  3. The asset bridge contract will unlock the correct asset after verify the message by CKB client.

Architecture

architecture

Force-bridge-eth will support assets transfer natively, the system consists of on-chain contracts and off-chain components.

On-chain:

  • Ethereum contracts ( solidity )
  • ckb contracts ( rust )
    • Ethereum light client
    • cross-chain contract

Off-chain:

  • bridge lib ( rust )
    • construct force-bridge-eth related transacitons to ckb and ethereum
    • construct cross-chain message proof
    • common structures and functions
  • bridge cli ( rust )
    • depends on bridge lib
    • used by developers to do [deploy, test, bridge actions]
  • bridge web ( frontend: js, backend: rust )
    • depends on bridge lib
    • used by users to do asset bridge actions
  • multi-sig-server ( rust )
    • depends on bridge lib
    • used by signers to maintain ckb/ethereum clients

Features

  • Security. The version 2.0 of force bridge will be full decentralized, permissionless bridge between CKB and Ethereum. Force bridge is secure as long as majority (1/2) of Etherem mining power and majority (1/2) of CKB mining power is honest. There are no additional security requirements. The whole crosschain process can be performed by anyone.
  • Extendability. Due to the low level abstraction of CKB script programming and flexible architecture of force bridge, it will be easy to extend its ability.
    • The asset bridge we already implemented will support ETH and all ERC20 token natively. In most solutions, you have to deploy a new asset on the target chain, register the address on Ethereum, and specify the relationship between them before you can move your asset. In force bridge, you can move your asset right after you deployed the ERC20 contract. You will get the associated mirror token automatically.
    • Move your asset to a user or to a dapp is the same thing for force bridge. As we will show in the DEX demo, users can place order with ETH to buy CKB in a single step, instead of locking the asset on ETH and then placing order on CKB. As long as the dapp follows some specific pattern, the dapp and bridge can be integrated without any changes of bridge.
    • In the future version of force bridge, we may reuse the existing components to support new crosschain situation, e.g. ERC721. The eth light client on CKB can verify that a transaction or event did happened on Ethereum. Developers can write handler dapps on CKB to extend the ability as they want.
  • User experience and broader interoperability. For a typical crosschain process, users have to maintain at least one account on each chain with associated wallet. In force bridge, users can reuse existing tools and participate in the CKB ecosystem without learning new concepts. You can use Ethereum wallet (e.g. Metamask) to do the crosschain, manage your assets and interact with DeFi on CKB. In future, we will support connecting to other blockchain systems. Users from different chain may use their own wallet to trade in the same liquid pool on CKB.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].