What are crosschain bridges?

What are crosschain bridges?

They are decentralized applications that allow transferring the same asset between different blockchains.

Crosschain bridges allow tokens of different standards (ERC-20, BEP-20 and others) to be moved between blockchains. There are also crosschain bridges that allow transferring funds between blockchains built on different technologies (Bitcoin, Ethereum, Litecoin, Dogecoin), as well as between Layer 2 scaling solutions (Arbitrum, Optimism).

Wrapped assets can be created to make transfers between blockchains, liquidity pools in multiple ecosystems can be used. Also, relay nodes with liquidity in different blockchains can transfer funds.

To use a crosschain bridge, you need to connect to it using a Web3 wallet, such as MetaMask. After sending funds through the decentralized application, they will arrive at the sender’s address, but in a different blockchain. A crosschain transfer operation is not significantly different from a swap within the same blockchain using non-custodial exchanges.

Why are crosschain bridges difficult to implement?

An exchange transaction between users, one of whom wants to buy asset A and the other to sell it for asset B, in the absence of trust between them requires a third party (guarantor). The guarantor will receive asset A from the seller and funds from the buyer (asset B). After receiving funds from both users, the guarantor will transfer funds to each of them, completing the exchange transaction.

This algorithm can be used for any exchange operation. An exchange can act as a guarantor. For asset exchanges within the same blockchain, a smart contract can act as a guarantor.

A smart contract provides asynchronous blocking of each user’s funds and, once sent, unblocks them and transfers the required assets to each user. Until recently, this method of exchange was not widespread because it required the simultaneous presence of a seller and a buyer willing to exchange funds in the same amount at the same time.

Existing non-custodial exchanges require Liquidity Providers (LPs) to block funds for the exchange. When performing exchange transactions, the user’s funds go into a liquidity pool in one asset and the user receives funds in another asset in return. All of these transactions are performed using smart contracts and do not require a guarantor.

But smart contracts can only be executed within a single blockchain (e.g., Ethereum). If you need to move assets to another ecosystem, such an algorithm will not work because a smart contract does not allow you to interact with it.

Crosschain transfers require special algorithms that allow interaction with multiple blockchains. Liquidity providers in different systems are also required. To implement these algorithms, Layer 2 scaling solutions are widely used.

L2-solution smart contracts allow information from other ecosystems, including information about transactions in bitcoin, Ethereum, Binance Smart Chain (BSC) and other blockchains. They can also interact with external data by retrieving information from online analytics through oracles.

How do I use wrapped tokens for crosschain transfers?

One solution to move assets between blockchains requires the use of wrapped tokens. Assets are moved using two paired operations: locking coins – issuing wrapped tokens and burning coins – unlocking coins, as well as combinations of these operations.

A similar approach is implemented in the Ren project. It is well suited for moving assets between different blockchains. Let’s take a closer look at the crosschain bridge between bitcoin and Ethereum in Project Ren.

For a crosschain transfer, a user sends BTC to a bitcoin address generated by the decentralized application, while specifying their address in the Ethereum blockchain. The funds sent are blocked, and in return the user receives wrapped Ethereum renBTC tokens. The latter are ERC-20 standard coins and are pegged in value to the price of the underlying asset. They can be freely exchanged and transferred to any other user.

Any renBTC holder can get the underlying assets in the blockchain source (in this case, bitcoin) for them. To get the funds in BTC, the user needs to send renBTC to an address generated by the app. After that, a coin burn will be performed and the user will be transferred to their bitcoin blockchain address.

Using wrapped assets to transfer stabelcoins between EVM-compatible blockchains is not feasible due to the existence of more advanced solutions. The implementation of transferring USDC from Ethereum to BSC by issuing renUSDC will not be in demand because there is already a USDC token on this network.

How does a blockchain intermediary enable crosschain bridging?

A promising way to transfer assets between different networks is to use a specialized blockchain.

Such a mechanism is implemented in the THORChain project, which uses the native RUNE token. The technology requires liquidity providers, who contribute their funds to the pool and receive income from it.

The algorithm involves depositing funds into liquidity pools in two blockchains, one of which is THORChain. Most of the funds are deposited in RUNE tokens and act as collateral, while the other part is used to perform exchange transactions. The project allows exchanging assets from different blockchains that differ in value.

The exchange operation takes place in two stages using a decentralized application. First, an asset is exchanged from the source blockchain to a RUNE token using funds from the first liquidity pool.

In the second step, the RUNE token is exchanged for an asset in the destination blockchain, using the second liquidity pool.

Let’s take a closer look at the exchange of BTC to ETH. This transaction requires two liquidity providers, one providing BTC and RUNE and the other providing ETH and RUNE.

All transactions are conducted through a decentralized application. After the user submits a request to transfer funds and specifies an address in the Ethereum destination blockchain, he needs to transfer BTC to the address specified by the app.

The BTC are received by the first liquidity provider, who transfers a corresponding amount in RUNE to the second LP. The second liquidity provider, having received the funds in RUNE, transfers ETH in Ethereum blockchain to the address specified by the user.

These transactions are performed automatically by the liquidity providers, and the integrity of the LPs is guaranteed by collateral that exceeds the value of the funds used for the exchange transactions. The existence of two liquidity pools allows exchanging assets in forward and reverse directions.

THORChain allows to transfer stabelcoins (USDT, USDC and others) between EVM-compatible blockchains – Ethereum, BSC, Huobi ECO Chain (HECO), etc. There are no restrictions on the types of assets and blockchains between which exchange transactions can take place. The only requirement is the availability of appropriate liquidity pools.

How are assets transferred between EVM-enabled blockchains?

For asset transfers between EVM-enabled blockchains, L2 solutions are useful. Interacting with the underlying networks via smart contracts, they can enable fast asset transfers as well as exchanges between both layer 1 and layer 2 systems.

L2 solutions create a universal algorithm for transferring funds between blockchains. When there are liquidity providers in the source and destination blockchain, assets are transferred only between these systems using the funds of a single liquidity provider.

If there is no single LP with assets in the source and destination blockchain, one or more intermediary chains can be used. Layer 1 and Layer 2 blockchains can act as intermediaries. In each of these, asset transfer channels will be formed.

As a generalized example, let’s look at an intermediary blockchain transfer algorithm using Celer Network’s cBridge crosschain bridge.

crosschain bridges
Data: Celer Network.
Node A is a user holding funds in chain 1 who wishes to transfer those funds to node D in chain 3 (the same user must be represented by address A in chain 1 and address D in chain 3 to transfer assets).

If there is no liquidity provider with assets in chains 1 and 3, the decentralized application selects two relay nodes B and C. Relay node B owns an asset in chains 1 and 2 and is the liquidity provider for exchanges between these chains.

Relay node C similarly connects chains 2 and 3. To implement crosschain transfer, smart contracts are deployed in three chains and form three asset transfer channels linking nodes A, B, C, and D.

Relay nodes B and C are liquidity providers and also provide payment routing. They receive remuneration for providing these services.

In contrast to the traditional model of interaction with liquidity providers used in non-custodial exchanges, the funds provided by relay nodes are not blocked for a long time. They will be blocked only at the time of the exchange transaction in the amount required to conduct it.

To implement this algorithm, cBridge uses smart contracts with temporary blocking of funds – Hashed Time Lock. When performing crosschain transfers, funds are transferred from the user to the liquidity provider using a smart contract that locks assets for a certain period of time. During this time, the relay node needs to transfer assets to the user in the destination blockchain.

If the node does not execute the transfer during this time, the blocked funds are returned to the user.

The Celer Network architecture is implemented with open source software, allowing anyone to create such a relay node. But the smart contract algorithm discussed here protects the user from losing money if the relay node is malicious.

What are the crosschain bridges?

Following the rapid development of DeFi and non-custodial exchanges, decentralized applications that implement crosschain transfers began to appear. Most have a similar interface, but their algorithms can differ significantly. The most popular crosschain bridges are:

  • cBridge. A project specializing in L2 solutions using smart contracts for crosschain transfers. Provides the ability to move stabelcoins, as well as a limited number of tokens based on Ethereum, BSC, HECO and other ecosystems, as well as between different second-tier networks (Arbitrum, Polygon, etc.).
  • Hop Exchange. This L2 solution uses smart contracts to transfer assets between second-tier blockchains (Arbitrum, Polygon, etc.). Transactions are performed in stabelcoins.
  • xPollinate. Crosschain bridge uses smart contracts to transfer stablenecoins between BSC and second-tier solutions (Arbitrum, Polygon, etc.).
  • THORChain. The project is a blockchain intermediary and allows exchanging BTC, LTC, BCH and other assets. The exchange is carried out between the respective blockchains, as well as Ethereum and Binance Chain. A large number of ERC-20, BEP-20 tokens including native coins are also available for exchange.
  • AnySwap. The project uses several crosschain transfer technologies. Provides the possibility of exchanging a large number of tokens in Ethereum, BSC, HECO, OKExChain blockchains, as well as between different L2 solutions.
  • Ren. Crosschain bridge allows you to transfer BTC, BCH, DOGE, ZEC and other assets from the respective blockchains by creating wrapped tokens, as well as performing reverse transfers. Destination blockchains: Ethereum, BSC, Polygon, Arbitrum and others.

How do I use cBridge’s crosschain bridge?

Moving an asset between two blockchains is a lot like swapping within a single blockchain. Let’s look at the USDC token transfer from Arbitrum to Binance Smart Chain using cBridge as an example.

In the case of swaps within the same blockchain, you need to connect to the crosschain bridge using a Web3 wallet like MetaMask. After that, the selected blockchain and your address will appear in the upper right corner.

The interface that allows you to make a crosschain transfer is quite simple. You need to specify the source blockchain and the destination blockchain, as well as the asset itself.

In our case, we choose Arbitrum as the source and Binance Smart Chain as the destination, the asset is USDC.

Before the exchange, it is necessary to make sure that there is enough liquidity to carry out the operation. The latter may be absent or insufficient in some areas.

After selecting the basic parameters, enter the transfer amount (for example, 50 USDC). If the direction is active (there is a repeater node for this direction) and there is enough liquidity for the transfer, you will see the amount to receive (49,6 USDC) and commission (0,39 USDC) in the bottom window. If all parameters are satisfactory, you can click Transfer.

The next step is to confirm the use of the USDC token from MetaMask. This step should be done only once, subsequent USDC transfers from Arbitrum will not require confirmation. Next, it is necessary to send a request for a cross-chain transfer.

The app will ask you to confirm the interaction with the smart contract, for which a fee is charged. After confirmation in MetaMask, you need to wait for some time until the transaction is confirmed at the blockchain level.

After sending a transfer request to the relay node, you need to wait for a while until the node responds. After that, you should perform the transfer of funds by pressing the appropriate button and confirming the transaction in MetaMask.

After the funds are transferred, the relay node will send the assets to your destination blockchain account. When the exchange is completed, you will see information about the successful crosschain transfer.

All that remains is to switch the blockchain in MetaMask to the destination blockchain and check the account. You can find out the details of the transaction using the blockchain browser.

Detailed instructions on how to use Celer Network’s cBridge crosschain bridge.

What is the outlook for crosschain bridges?

Current trends show that a scenario where one blockchain becomes dominant and displaces other solutions is unlikely. Despite Ethereum’s broad capabilities, L2 solutions are emerging that offer significant advantages – high transaction speeds, lower fees, greater flexibility and functionality.

A number of ecosystems based on EVM-enabled blockchains (Binance Smart Chain, Huobi ECO Chain and others) are rapidly developing. The existence of many competing blockchains necessitates cross-chain transfers.

Stablecoins are widely used in such transactions. These assets exist on different blockchains and are not subject to significant price fluctuations. Stablecoins are convenient for storing value for long periods of time.

Due to the significant development of the DeFi field, crosschain bridges are becoming more and more popular compared to conventional exchanges. The technology is in demand in the market, more and more new projects appear, which indicates the prospects of this direction.

Add a comment