Cross-chain bridge and Connext

Bridges are a newer concept that is starting to catch on in 2021. Bridges allow cryptocurrency holders to "move" (or "bridge") their assets between different blockchains. This enables them to hop from chain to chain and reach out to other networks. It uses cross-chain communication technology to support transactions between two or more networks, which can be layer 1, layer 2, or even off-chain services. For example, USDC holders on Ethereum may wish to transfer their USDC from Ethereum to Avalanche via the bridge application.

At present, there are more than 100 active public chains in the market. Based on this, many cross-chain bridges have appeared in the market.

post image

One can define a cross-chain bridge as a system that transfers information between two or more blockchains. In this context, "information" can refer to assets, contract calls, proofs, or state. Most cross-chain bridge designs have several components:

Monitoring: There is usually an Actor, "Oracle", "Validator" or "Relay" that monitors the state of the chain. Messaging/Relaying: After an Actor receives an event, it needs to transmit the information from the source chain to the target chain. Consensus: In some models, consensus is required among participants monitoring the source chain in order to relay that information to the destination chain. Signing: Actors are required to cryptographically sign information sent to the target chain, either individually or as part of a threshold signature scheme.

In general, there are about 4 types of cross-chain bridges:

Asset-specific: Its sole purpose is to provide access to a specific asset from an external chain. These assets are usually "wrapped" assets, fully collateralized by the underlying asset in a custodial or non-custodial manner. Bitcoin is the most common asset (xBTC of all kinds) bridged to other chains, with seven different bridges on Ethereum alone. These cross-chain bridges are the easiest to implement and are very liquid, but have limited functionality and need to be reimplemented on each destination chain.

Chain-specific (specific to a certain chain): a cross-chain bridge between two blockchains, the main operation is to lock and unlock tokens on the source chain, and mint packaged assets on the target chain. Due to the limited complexity of these cross-chain bridges, they can often be brought to market faster, but are also not easily scalable to the wider ecosystem. An example is Polygon's PoS bridge, which allows users to transfer assets from Ethereum to Polygon and vice versa, but only on these two chains.

Application-specific: An application that provides access between two or more blockchains, but only for use within that application. The application itself benefits from a smaller code base; it is not a complete application on every blockchain, instead, there are often lighter, modular "adapters" on each blockchain. The blockchain on which the adapter is deployed has access to all other blockchains the app is connected to, so there is a network effect. The downside, though, is that it's hard to extend this functionality to other applications (from lending to trading, for example). Specific examples include Compound Chain and Thorchain, which build separate blockchains dedicated to cross-chain lending and trading, respectively.

Generalized: A protocol designed for transferring information across multiple blockchains. This design enjoys strong network effects due to the O(1) complexity employed (regardless of the amount of data in the dataset, the time taken is fixed), a single integration of a project gives it access to the entire ecosystem within the bridge system. The downside is that some designs often trade off security and decentralization for this scaling effect, which can have complex unintended consequences for the ecosystem. An example is IBC, which is used to send messages between two heterogeneous chains (with finality guarantees).

post image

Among them, Connext is undoubtedly the leader of the fourth type.

Supporting Chain: ETH Arbitrum Optimism Polygon BSC xDai Fuse Avalanche Fantom Moonbeam Moonriver Supported currencies: USDT USDC DAI WBTC WETH FEI GRT GTH

Operation Mechanism

Connext is a Layer 2 cross-chain bridge based on Ethereum compatible EVM, which supports the construction of liquidity pools on the chain, and uses state channels to achieve atomic swaps. Connext deploys nxtp to achieve internal verification of cross-chain information.

Nxtp consists of a simple contract that prepares and completes transactions using locked mode, an off-chain Router network that participates in pricing auctions and passes data between chains, and a user-side sdk that finds the Router and prompts on-chain transactions.

post image

Internal verification process of cross-chain transfer:

  1. Route Auction: Input 100 USDC to transfer from the Polygon chain to the Arbitrum chain, wait for the internal confirmation of the protocol, and the Router (auction participant) will bid to select the best bid and route, and complete the auction stage. At this time, the user interface will display Approximate transfer fee and amount received

  2. Prepare: 100 USDC is submitted to the transaction management contract, which locks the assets to be transferred on Polygon. The Router passes the transaction to the transaction management contract on Arbitrum and locks in a portion of the auction fee

  3. Completion stage (Fulfill): The router that has checked this information receives the tokens transferred by the user and submits the information to the transaction management contract to unlock the user's assets on Polygon and send it to the wallet address of Polygon, and confirms that the router is locked funds. The Router submits the same signature information and unlocks the original amount on Arbitrum, completing the transaction.

Internally verify the underlying architecture structure:

post image

Contracts: carry contracts for all network participants and lock/unlock funds based on data submitted by users

Subgraph: Enables scalable query/response by caching on-chain data and events.

TxService: Elastically experiment with sending transactions to the chain

Messaging: Through the Prepare stage, send messages and listen for message data

Router: listens for events from message services and subgraphs, then dispatches transactions to txService

SDK: Create auctions, listen for events and create transactions on the client side.

Connext Advantage

Only the Router is required to lock the auction price instead of all liquidity, and the capital utilization is more efficient.

Connext's internal verification mechanism, the security has been greatly improved.

Connext Disadvantages

The complexity of the underlying architecture of Connext makes it difficult to deploy.