
image description
Figure 1: Schematic diagram of Celer cBridge architecture
Celer cBridge, a cross-chain payment network that supports high speed and low cost. Users can transfer value within or between any Ethereum Layer-2 system, Ethereum main chain, and other Layer-1 or Layer-2 through this network.
Use cases for Celer cBridge include:
Fast and low-cost payments between Layer-2 of Ethereum without going through Layer-1. These Layer-2 networks include Optimistic Rollups (such as Optimism, Arbitrum, and Celer Rollup), PoS sidechains (such as Matic and SKALE);
Fast asset transfer between Layer-1 and Layer-2 without long delays;
Realize the two-way bridge between the Layer-2 of the main chain and another main chain without going through the main chain;
Connect seamlessly with the Celer state channel network that is routed across chains.
Why is cBridge important?
We are moving towards a multi-chain era. More and more distributed applications and digital assets are deployed in various weakly coupled systems. These systems have different trade-offs between safety, throughput, latency, ease of development, and modularity. they include different
Layer-1 (such as Ethereum, Cosmos, Polkadot), these Layer-1 shards, and different Layer-2 expansion solutions (such as Optimistic Rollup, ZK Rollup, and side chains).
Even if the operations and transactions within the respective systems are relatively smooth, cross-chain transactions or asset transfers are often expensive and slow. Taking rollup as an example, it usually takes several days to transfer assets out of the rollup main chain contract, and the payment transfer between different rollups is more time-consuming and laborious.
cBridge Demo: https://www.youtube.com/watch?v=vY6eQ7qbBAE&feature=youtu.be
In order to allow funds to flow efficiently in different systems without long delays or trust-based custodians, a common value network that can connect various parachains and flatten different layer systems is particularly important.
cBridge is such a general value network. As shown in Figure 1, a customer on Arbitrum can pay to a customer on Polkadot through the multi-hop cBridge and Celer state channel network, passing through the Arbitrum cBridge, to multiple state channel nodes on the Ethereum main network, and finally to the Polkadot node. This process only requires millisecond-level delay and extremely low cost.
To further compare the performance improvement, we can see that it takes half a month to perform the above operations without cBridge, and the delay is as high as one million times that of cBridge. In terms of cost, cBridge has the low cost of state channel instead of transaction billing. Its fees are related to the total amount transferred and its liquidity funds. This will reduce the cost of small asset transfers hundreds of times. Obviously, cBridge plays an extremely important role in the unified high-speed asset transfer of users within and between different networks.
As shown in Figure 1 above, we implement cBridge by extending the Celer state channel, enhancing the existing protocol so that it can run on multiple chains simultaneously. For example, A in Figure 1 can exist in Optimism rollup, Arbitrum rollup, Celer rollup, and the Ethereum main network at the same time. Node A connects all customers who want to bridge funds between the four chains, and also provides liquidity for asset bridging between Layer-2 and Layer-1. These multi-dwelling nodes (such as A) can be connected to different state channel main networks, and the connections between these multi-dwelling nodes constitute the "backbone network" of this cross-chain network.
image description
Figure 2: Simplified example of Celer cross-chain payment
Figure 2 shows an example of a multi-hop cross-chain payment from node A of chain-1 to node D of chain-3. These different chains can be any EVM-compatible platform, such as Aritrum/Optimism rollup, side chains, eth2 shards, or other layer-1 main chains. Intermediate nodes (B and C) provide state channel liquidity and payment forwarding services to end customers (A and D). In the above example, B runs a node on chain-1 and chain-2 at the same time, and C runs a node on chain-2 and chain-3 at the same time.
If all nodes cooperate honestly, this cross-chain payment will be settled quickly and instantly. If any node along the way does not cooperate or do evil, other nodes can force settlement in the CelerPay contract on the chain, thus ensuring the fund security of all honest nodes. Our online architecture document details the CelerPay contract (https://www.celer.network/docs/celercore/channel/pay_contracts.html) and payment protocol (https://www.celer.network/docs /celercore/channel/pay_protocol.html). In order to realize cross-chain payment on a multi-chain platform, we need to deploy contracts on each chain, add a chain-id identifier to the payment address, and add a payment conversion protocol when crossing chains. In the example above, payAD, payAD*, and payAD** have the same sending and receiving addresses, payment value, hash lock, and different local tokens and contract addresses. Intermediate nodes B and C are responsible for the payment conversion when crossing the chain.
How is cBridge different?
cBridge is a Celer-based state channel product, which has been field-tested in game applications with millions of users. Other solutions include some cross-chain bridging contracts, and other Layer-2 bridging systems (such as Vector implemented by our partner Connext). The following table compares the characteristics of these systems.
How to use cBridge?https://github.com/celer-network/goCeler-oss/blob/master/tools/osp-cli/README.md#config-crossnet-routing-infoThe function of state channel cross-chain payment has been added to the Celer state channel network. To test this function, you need to deploy the CelerPay contract on each EVM test chain, or deploy the corresponding contract or plug-in on a non-EVM compatible chain (such as the Celer Substrate module on Polkadot). In addition, cBridge operators need to start nodes on each chain, using the command line tools we provide (
) Write the information configuration required for cross-chain payment (example: https://github.com/celer-network/goCeler-oss/blob/master/testing/profile/crossnet/o6.json) into the corresponding node database. The local end-to-end test in the code (https://github.com/celer-network/goCeler-oss/blob/master/test/e2e/e2e_crossnet_test.go) can be used as an example to some extent to show the Fast state channel payment (Figure 2).