The Crypto Bridges or Bridges are responsible for us being able to interconnect the different blockchains that exist and be able to interoperate between them, thereby diversifying and increasing the usability and scope of cryptocurrencies and the ecosystems that are built around them.
UA bridge or bridge between chains is a service (centralized or decentralized) that allows you to create a connection between two blockchains that normally cannot communicate with each other, so that tokens can be transferred between them.
This is a utility that has become essential thanks to the arrival of services DeFi, which have led the crypto community to a huge leap in the use of tecnología blockchain and Tokens that make life in the different block chains capable of providing this type of service.
How does a Bridge work?
A bridge can be seen as a simple information exchanger between blockchains. In other words, the main function of a bridge is to allow the bidirectional exchange of information between blockchain A and blockchain B, through a protocol that allows this connection. Of course this is an easy way to see how a bridge works, but the basic idea is that and having it very clearly will help you understand exactly how this information exchange takes place.
In fact, we can summarize it in four steps:
- The bridge is located between the chain A and B, creating the basic structure for its operation.
- If you want to pass a token from A > B, you go to the bridge, indicate the number of tokens you want to exchange at A, and provide the destination address at B.
- You make the shipment in A and the bridge blocks this balance in a vault, and then in B the exact amount of tokens is minted and sent to the address in B that you have provided.
- The tokens in A are blocked as a guarantee for the tokens in B and you can only recover them by doing the opposite process.
Explained in more detail
Let's take a more practical example to go a little further into how these bridges work. Imagine that you want to pass 1.000 USDT tokens from the Ethereum network to the Polygon network. Directly, despite the fact that the addresses of Ethereum y Polygon are identical, the reality is that their blockchain networks are different, so you cannot pass value directly between both blockchains. To do this, you must use a bridge and it will take care of completing that process.
Since Etheruem and Polygon are identical at the programming level (they are based on EVM, they use Solidity, they have the same address model, but they have different histories and consensus protocol) creating a bridge is quite easy. To do this, the bridge creates a series of contracts (in Ethereum and Polygon) that will allow both networks to communicate with a common language through a blockchain oracle. The oracle's job is to give those contracts precise information about what is happening on the other blockchain and vice versa. In this way, we create the two-way communication channel between Ethereum and Polygon, at this point half of the work is done.
Now, in order to send that ETH USDT to Polygon, you will need to interact with the bridge on the ETH side. It will ask you for two things:
- A receive address for the Polygon network.
- That you send the 1.000 USDT that you have in ETH to a vault (also in ETH) that will be controlled by a smart contract of the bridge. This step is usually transparent to the user.
By completing these two steps and sending the ETH side, the bridge begins its work. The first thing that happens is that the oracle detects the shipment in ETH and reports it to the smart contracts on the Polygon side. With this report, there is the amount of tokens exchanged and the destination address (the one you have given) for them. Once the ETH operation is complete, then the oracle reports this and the smart contracts on the Polygon side start generating the 1.000 USDT and send it to the provided address.
The tokens generated from the Polygon side are the same USDT, the same amount and with the same value, and this is possible, because the vault created serves as a guarantee of the value of these new tokens and they will be blocked until the moment you do the opposite operation (transfer that USDT from Polygon to ETH). Blocking prevents tokens from being generated out of thin air, while maintaining security and economic stability between the chains and the bridge.
When you do the opposite process to recover your USDT in ETH, the bridge takes your USDT from the Polygon side, burns it and, once burned, the corresponding USDT is delivered to you from the Ethereum side. With that, the work of the bridge between ETH and Polygon is finished.
Bridge Types
Bridges can be of two types:
Centralized
A centralized bridge is one whose management falls to a centralized entity that takes and releases tokens between the chains supported by said entity. Basically, it works like an exchange, only instead of exchanging pairs, it just takes a token and sends you the same token on the destination network of your choice. An example of this type of bridge is OKex Bridge.
Decentralized
A decentralized bridge is one that is completely controlled by smart contracts and where control of the funds does not lie with any central entity. An example of this type of bridge is Celer Bridge.
Main functions of a bridge
Among the main functions of bridges we can mention:
- Enable interoperability between chains. That way, Ethereum users can take their tokens and send them to other chains like BSC, without going through an exchange.
- Allows users to pass between Layer1 and Layer2. For example, Ethereum users can take their tokens from Layer1 (the Ethereum network) to Layer2 networks like Polygon, Arbitrum, Optimism, xDai, and more.
- It helps to minimize the operation costs, since it allows the user to search for networks with better commissions to carry out their operations.
- Attract value from other networks to networks with better opportunities. A good example of this is the move in value from BTC to Ethereum during the crypto winter. The move was motivated to take advantage of the nascent DeFi ecosystem and generate profits at a time when BTC remained low in value.