What are cross-chain bridges?
These are decentralized applications that allow the same asset to be transferred between different blockchains.
Cross-chain bridges allow you to move tokens of various standards (ERC-20, BEP-20, and others) between blockchains. There are also cross-chain bridges that allow transferring funds between blockchains built using different technologies (Bitcoin, Ethereum, Litecoin, Dogecoin), as well as between second-tier scaling solutions (Arbitrum, Optimism).
To make transfers between blockchains, wrapped assets can be created, liquidity pools in several ecosystems can be used. Also, the transfer of funds can be carried out by relay nodes that have liquidity in different blockchains.
To use a cross-chain bridge, you need to connect to it using a Web3 wallet, for example, MetaMask. After sending funds through a decentralized application, they will go to the sender's address but are already on a different blockchain. At the same time, a cross-chain transfer operation does not significantly differ from a swap within one blockchain using non-custodial exchanges.
Why is cross-chain bridging tricky to implement?
The exchange operation 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, as well as funds from the buyer (asset B). After receiving funds from both users, the guarantor will transfer funds to each of them, completing the exchange operation.
This algorithm can be used for any exchange operation. The exchange can act as a guarantor. When exchanging assets within the identical blockchain, a smart contract can act as a guarantor.
The smart contract provides asynchronous blocking of funds for each of the users, and after sending them, they are unblocked and the required assets are transferred to each user. Until recently, this method of exchange was not general, since it needed the simultaneous presence of a seller and a buyer who are ready at the current time to exchange funds in the same amount.
Existing non-custodial exchanges require liquidity providers (LPs) blocking funds for exchange. When performing exchange operations, the user's funds are transferred to the liquidity pool in one asset, in return, the user receives funds in another asset. All these operations are carried out using smart contracts and do not require a guarantor.
But smart contracts can only be executed within one blockchain, for example, Ethereum. If it is necessary to move assets to another ecosystem, such an algorithm will not work since the smart contract does not allow interacting with it.
Cross-chain transfers require specific algorithms to interact with multiple blockchains. It also demands liquidity providers across different systems. To implement these algorithms, second-level scaling solutions are widely used.
Trending: Smart Contracts Audits Startup Hexens Closed $4.2 M Seed Funding
Smart contracts for L2 solutions allow you to receive information from other ecosystems, including information about transactions carried out in the blockchains of Bitcoin, Ethereum, Binance Smart Chain (BSC), and others. They can also interact with external data, receiving information from analytical Internet resources through oracles.
How to use wrapped tokens for cross-chain transfers?
One solution to move assets between blockchains requires the use of wrapped tokens. Assets are moved using two paired operations: blocking coins - issuing wrapped coins 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 cross-chain bridge between Bitcoin and Ethereum in the Ren project.
For a cross-chain transfer, a user sends BTC to a Bitcoin address generated by a decentralized application, specifying their address on the Ethereum blockchain. The funds sent are blocked, and in return, the user receives wrapped Ethereum renBTC tokens. The latter are coins of the ERC-20 standard and are pegged in value to the price of the underlying asset. They can be freely exchanged and transferred to any other user.
Any holder of renBTC can receive for them the underlying assets in the source blockchain (in this case, Bitcoin). To receive funds in BTC, the user needs to send renBTC to the address generated by the application. After that, the burning of coins will be performed, and the funds will be transferred to the user to his address in the bitcoin blockchain.
Using wrapped assets to transfer stablecoins between EVM-compatible blockchains is not advisable due to the existence of more advanced solutions. Implementing the transfer of USDC from Ethereum to BSC by issuing renUSDC will not be required as the USDC token already exists on this network.
How does a blockchain intermediary enable cross-chain bridging?
A promising way to transfer assets between different networks is the use of a specialized blockchain.
A similar 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 generate income from it.
Trending: Finder: Bitcoin could hit $80,000 by 2025
The algorithm involves depositing funds into liquidity pools in two blockchains, one of which is THORChain. At the same time, most of the funds are deposited in RUNE tokens and act as collateral, while the other part is used to perform exchange operations. The project allows you to exchange 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 for a RUNE token using funds from the first liquidity pool.
At the second stage, the RUNE token is exchanged for an asset on the destination blockchain, while the second liquidity pool is used.
Let's take a closer look at the exchange of BTC for ETH. This operation requires two liquidity providers, one providing BTC and RUNE and the other providing ETH and RUNE.
All transactions are carried out through a decentralized application. After submitting an application for the transfer of funds by the user and specifying the address in the Ethereum destination blockchain, he needs to transfer BTC to the address specified by the application.
BTC goes to the first liquidity provider, which transfers the corresponding amount in RUNE to the second LP. The second liquidity provider, having received funds in RUNE, transfers ETH on the Ethereum blockchain to the address specified by the user.
These operations are carried out by liquidity providers in an automatic mode, and the guarantee of LP honesty is collateral that exceeds the value of the funds used for exchange operations. The presence of two pools of liquidity allows the exchange of assets in the forward and backward directions.
THORChain allows you to transfer stablecoins (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 be carried out. The only requirement is the availability of appropriate liquidity pools.
What are the prospects for cross-chain bridges?
Current trends show that a scenario in which one of the blockchains becomes dominant and replaces other solutions is unlikely. Despite the broad capabilities of Ethereum, L2 solutions are emerging that provide significant advantages - high transaction speed, lower fees, greater flexibility, and functionality.
Trending: German Digital Bank N26 Launches Crypto Trading
Some ecosystems based on EVM-compatible 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. It is convenient to store value in stablecoins for a long time.
With the significant development of the DeFi industry, cross-chain bridging is becoming more popular than conventional exchanges. Technologies are in demand on the market, more and more new projects appear, which speaks of the prospects of this direction.