Cross-chain Bridges And Atomic Swaps

Today we have many different blockchain infrastructures available to us, from wallets to DeFi. If the average user makes purchases from 50 different brands, they will have to use 50 different altcoins/blockchains. During the transition to fully programmable digital money, it is important to ensure that high switching costs are eliminated. In economics, the term “switching costs” refers to the costs associated with switching to another competitive system.
For example, I am using Ethereum (ETH) and want to switch to Binance Smart Chain (BSC). According to economic theory, when you need to switch from one network to another, you estimate the cost of that switch.
Today, the costs of switching traditional currencies are quite high. For example, if you want to switch from the US dollar to the euro, and from the euro to the yen, then you will spend a significant amount on it. For many people, switching costs are very high. In many countries, such transactions are illegal, or those who wish to use multiple currencies are subject to tight controls.
But in the world of digital programmable money, switching costs are zero. The only thing that needs to be paid is the network commission. And you don’t even need to ask permission from anyone. Using various bridges, you switch to the network that you need at the moment. There are liquid systems here that you can switch between.One of the effective technologies is payment channels and simple smart contracts, thanks to which atomic cross-chain swaps can be carried out.
Why Cross-chain Bridges Are Needed And How They Work
In 2021, projects that develop cross-chain bridges are gaining popularity. Some of the most successful examples are Solana, Polkadot and Polygon. According to CoinMarketCap, the value of these cryptocurrencies has grown tenfold since the beginning of the year.
Blockchain technology, which has become the backbone of all cryptocurrencies, has a closed architecture. This means that different networks cannot communicate with each other. Transactions, tokens and smart contracts from one blockchain do not work on another. For example, Bitcoins cannot be sent to an Ethereum wallet. In 2021, projects began to gain popularity that seek to solve the problem of blockchain interoperability.
For example, consider the Ethereum and Solana blockchains. Both projects serve to create decentralized applications. Ethereum appeared earlier and managed to attract a large number of users. Solana is a new and technologically advanced blockchain, but it has a smaller audience. The problem is that it is difficult for Ethereum users to switch to products from Solana, since their tokens will not work there.
A similar situation happened in the 90s, during the formation of the Internet.Users of different e-mail services could not send letters to each other until they added the “@” symbol to the address. Now you can write to outlook.com from gmail.com.
There is no such universal solution for blockchains yet. Almost all projects develop in parallel and are incompatible with each other. However, the developers of Solana and some other blockchains are creating cross-chain bridges. Next, we will take a closer look at this technology and how it works.
On September 17, 2021, the Solana developers announced the launch of the Wormhole cross-chain bridge. It connects Ethereum and Solana so that users can exchange tokens between the two blockchains. Let’s use his example to show how the technology works.
The Wormhole cross-chain bridge has little to do with conventional bridges. In fact, tokens do not move from one blockchain to another, since this is physically impossible. Instead, a freeze and re-release mechanism is used. When a user needs to send a token from Ethereum to Solana, two things happen:
- The Ethereum token is frozen in a special account.
- A copy of this token is issued in Solana.
For the user, this process looks like a simple dispatch: his token disappears from the Ethereum wallet and appears on the Solana wallet. The only thing that has changed is the ability to use decentralized applications on a different blockchain.
The copy of the token in Solana is indistinguishable from the original in Ethereum. It has the same value, since it can “return” to the original blockchain at any time. To the user, this again looks like a simple dispatch, but the cross-chain bridge does two things:
- A copy of the token in Solana is burned.
- In Ethereum, the original token is unfrozen.
Thus, cross-chain bridge is a set of tools for creating communication between blockchains. Smart contracts freeze and issue tokens, oracles monitor price compliance, and nodes perform validation. All projects have different approaches to the implementation of this solution, but the described principle remains unchanged. There are other examples besides Solana, some of which are listed below.
Examples Of Cross-chain Bridges
For each pair of blockchains, a new cross-chain bridge has to be “built”, so this solution remains an experimental technology for now. This is costly for developers and inconvenient for users. However, there are already several working examples:
- Binance Bridge. The Binance Smart Chain blockchain is an Ethereum clone, but with cheaper fees. Binance Bridge provides the ability to transfer any tokens from Ethereum to be used in the Binance ecosystem.
- SmartBCH. Bitcoin Cash split from Bitcoin in 2017. In 2021, it became compatible with Ethereum via the SmartBCH bridge. This means that BCH coins can now be used in Ethereum DeFi applications.
- Bridge Chain. Polkadot is a network that connects different blockchains through a single platform.With the help of the Bridge Chain, the internal ecosystem can interact with Ethereum and Bitcoin.
- Polygon Bridge. The Polygon blockchain is a second-tier solution for Ethereum, but interoperability is also achieved using a cross-chain bridge. Polygon Bridge is available inside the official web wallet of this project.
Most of the cross-chain bridges are led to the Ethereum network. Startups are building them to gain access to a broad user base. And old blockchain projects add features to their cryptocurrencies.
Lack of interoperability is a major obstacle to the development of blockchain technology. Tokens and smart contracts from one network cannot be transferred to another. Cross-chain bridges help to get around this problem. These are special tools for communication between blockchains.
Cross-chain bridges freeze tokens on one blockchain and issue copies of them on another. For users, the whole process looks like a simple submission, since both versions of the tokens are almost the same. This makes it possible to exchange assets between blockchains, but is not yet a universal solution.
Considering the growth of activity in the DeFi space, it becomes obvious that these bridges will be in great demand. In the future we will see wallets that will perform all these processes without user intervention. Here is one example of such a wallet:
Let’s say I want to buy something on Overstock, the wallet sends a request to the Overstock server, receives a list of currencies that the company accepts, and it also has a list of currencies that I have. It analyzes information about which currencies will be converted the fastest with the lowest transaction fees, or it can configure the wallet to increase privacy, optimize currency consumption, and reduce transaction fees. The wallet will then use the optimal strategy and convert the currency to follow that strategy using existing payment channels, cross-chain bridges, and Lightning Network channels.
The Lightning Network is a network that allows you to create payment channels with the ability to use different currencies. For example, you have an open Lightning channel with some node and you send bitcoin (BTC) through it. On the other end, your bitcoins are converted and converted to Litecoin (LTC). Thus, the channel independently conducts the atomic cross-chain swap. This is one of its functions. We now have a micro-payment network that allows you to transfer any amount of money, even the smallest amounts of money with practically zero fees, while converting it into another currency at the same time.
Someday all these processes will recede into the background and the user will not even realize that he is using it, just making a purchase.
