Cross-Chain Bridges Explained

Hundreds of blockchains exist already, and the number is still growing. Each has its own protocol, governance model, economy, and other unique features that make it incompatible with the others. Cross-chain bridges are designed to solve the compatibility problem. These decentralized platforms allow crypto assets to be transferred between different networks.

What is a Cross-Chain Bridge?

A cross-chain bridge is a protocol that enables the transfer of assets and information between two or more blockchain networks. These bridges act as connectors, allowing users to move their tokens or data from one blockchain to another without the need for a centralized intermediary.

Here's an example: using a cross-chain bridge, you can swap USDT on ERC-20 (Ethereum) to USDT on BEP-20 (BNB Smart Chain).

Wrapped tokens are created for transfers between blockchains. For the same purposes, liquidity pools in different ecosystems and relay nodes with liquidity in different networks are used.

Why cross-chain bridges are necessary

The primary purpose of cross-chain bridges is to enhance interoperability between different blockchain networks. This interoperability is crucial for several reasons, including:

  • Asset mobility: Users can move their assets— such as cryptocurrencies—between different blockchains, taking advantage of various platforms' unique features or opportunities.
     
  • Expanded liquidity: Cross-chain bridges connecting different blockchain ecosystems help increase overall market liquidity, benefiting decentralized finance (DeFi) applications and users.
     
  • Enhanced functionality: Developers can create applications that leverage the strengths of multiple blockchains, potentially leading to more robust and versatile decentralized applications (dApps).
     
  • Reduced fragmentation: As the blockchain space continues to grow, cross-chain bridges help mitigate the problem of ecosystem fragmentation by creating connections between various networks.
     
  • Cost and speed benefits: Cross-chain bridges establish connections and enhance efficiency and scalability. They can enhance transaction speeds by allowing more effective blockchains and eliminating the necessity to rely on multiple cryptocurrency exchanges for asset swaps.

How cross-chain bridges work

Cryptocurrency transfer between blockchains using a bridge is as follows:

  1. Crypto from blockchain A is sent to a smart contract with the recipient's address in blockchain B.
     
  2. A smart contract (lock contract) locks the received crypto and notifies the oracle that a certain crypto transaction has been made to a specific address.

    An oracle is an algorithm that confirms that a transaction was made and validated on the source network. It then enables a smart contract on the destination blockchain to proceed with the transaction.
     
  3. Upon receiving confirmation of the transaction in blockchain A, a smart contract (mint contract) mints a copy of the crypto locked in the original blockchain, i.e., wrapped tokens (synthetic asset). It forwards them to the recipient's wallet. 

    A wrapped token is a synthetic crypto asset equivalent in value to the original token, regardless of which network it is placed on.
     
  4. When a reverse transaction is made, tokens previously issued in blockchain B with their synthetic counterparts in blockchain A are destroyed (burned), oracles confirm the destruction, and the original crypto is unlocked and sent to the user's wallet.
     

Liquidity pools are another option for transferring tokens across a network bridge. The crypto from blockchain A is locked in the bridge's liquidity pool, and the crypto of blockchain B from another pool is sent to your wallet. In the first case, token wrapping transfers its value from one blockchain to another, that is, to get a token in the other network that is equivalent in value to the original. 

The second option involves swapping a token in one network for a token in another.  This means, when you transfer crypto from one blockchain to another, it is not the actual transfer, it only seems this way. Although it makes no difference to a user, a user receives a token in the desired network.
 

Issues with cross-chain bridges: Refunds

While cross-chain bridges offer numerous benefits, especially when integrated into Tangem Express,  it's crucial to understand that not all transactions will be successful. Sometimes, a transaction may fail, and a refund process may be initiated. 

This refund mechanism is an essential safety feature of cross-chain bridges, protecting users from potential losses due to failed transactions. Refunds in cross-chain transactions typically occur under specific circumstances: 

1. Insufficient gas: If the destination chain doesn't have enough gas (transaction fees) to complete the operation, the transaction may fail, triggering a refund. 

2. Network congestion: Extreme network congestion on either the source or destination chain can sometimes lead to transaction failures and subsequent refunds. 

3. Smart contract errors: If there's an error in the smart contract execution on the destination chain, it may result in a failed transaction and initiate a refund process. 

4. Time-outs: Many cross-chain bridges implement time-out mechanisms. If a transaction takes too long to complete (often due to network issues), it may be automatically refunded.

5. Unsupported tokens: Attempting to transfer tokens that are not supported by the bridge can result in a failed transaction and a refund.

The refund process typically involves returning the locked assets on the source chain to the user's original address. However, refund times can vary depending on the specific bridge implementation and the networks involved.
 

Conclusion

Understanding the benefits, potential risks, and safeguards of any technology involving financial transactions is crucial. The refund mechanism in cross-chain bridges serves as an important safety net, protecting users from potential losses due to failed transactions.

As the blockchain space continues to mature, we can expect cross-chain bridges to play an increasingly important role in shaping the future of decentralized finance and beyond.