paint-brush
A Beginners Guide On Blockchain Bridgesby@samiranmondal
1,130 reads
1,130 reads

A Beginners Guide On Blockchain Bridges

by Samiran MondalAugust 17th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Blockchain bridges also referred to as cross-chain bridges, are the connection that allows the transfer of tokens or arbitrary data (other data) from one chain to another. Blockchain bridges can do many things, but token transfer is the most common utility. Since its inception, one of the biggest problems of blockchain technology is the inability to work together. While they are very fluid and somewhat efficient as single entities, each blockchain is limited by the walls of its domain. Often, this can lead to high transaction costs and congestion, as in the case of Ethereum.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - A Beginners Guide On Blockchain Bridges
Samiran Mondal HackerNoon profile picture


Blockchain bridges also referred to as cross-chain bridges, are the connection that allows the transfer of tokens or arbitrary data (other data) from one chain to another.


Blockchain bridges can do many things, but token transfer is the most common utility. Since its inception, one of the biggest problems of blockchain technology is the inability to work together. While they are very fluid and somewhat efficient as single entities, each blockchain is limited by the walls of its domain. Often, this can lead to high transaction costs and congestion, as in the case of Ethereum.

Creating a blockchain bridge

Bridges provide a compatible avenue for two chains with different protocols, rules, and governance models, to interoperate securely on both sides. Most bridges use a lock and mint model to move the data between chains. A bridge can be used to transfer data from one parent blockchain to its child chain (sidechain). These bridges can also allow users to send digital assets hosted from one blockchain to dApps. Cross-chain bridges work by wrapping tokens in a smart contract and issuing native assets. For instance, if you have bitcoin but want to spend it like Ethereum, you can do that through the bridge and get BTC, which uses BTC as collateral.


Bridges can be created through smart contracts, bridge pallets for substrates, or higher order protocols. Your typical bridge designs will have several components, including monitors, message passing, consensus, and signing. The monitoring components are usually actors that monitor the state of the source chain. They can either be an oracle, validator, or relayer.


The message passing components or the relaying transmit information from the source chain to the destination chain. At the same time, consensus in some models is required between the actors monitoring the source chain to relay the information.


Lastly, actors need to sign information sent to the destination chain cryptographically. This can be done individually or as part of a threshold signature scheme.


Types of bridges

Bridges come in different types but can be categorized into two; centralized bridges, trusted or federated, and decentralized, trustless.


Trusted bridges depend on a central entity for their operations, while trustless bridges operate using algorithms and smart contracts. Also, users mostly rely on the bridge operators' reputation with trusted bridges. On the other hand, in trustless bridges, the bridge's security is the same as the underlying blockchain.


Bridges exchange information either locally or remotely. Local bridges are different layers, protocols, and tools within a single blockchain, while remote bridges are separate blockchain ecosystems. In addition, blockchain bridges can also be categorized based on other factors, including how they work, security, speed, connectivity, capital efficiency, and statefulness.


How does a bridge work?

Bridges allow users to deploy digital assets hosted on one blockchain to dApps on another, conduct fast, low-cost transactions of tokens hosted on otherwise less scalable chains and execute dApps across more than one platform.


The first process when using decentralized blockchain bridges involves locking or freezing the sent assets by the user on the blockchain where they live using a smart contract. The second mechanism is employed if the smart contracts are not supported.


The second step involves creating new tokens of an equal amount on the receiving blockchain. Once the user commences redeeming their tokens, the original assets are unlocked. Then, the equivalent tokens are burned.


Challenges while using bridges

While blockchain bridges bring many benefits, they also have some downsides. For instance, in the case of trusted bridges, there is a risk of theft of user funds by custodians. However, some bridges pre-empt this problem by forcing the custodian to provide a form of bond used to compensate users in the event of malicious behavior. According to recent reports, funds stolen through bridge heists account for 69% of the total crypt hacks in 2022, about $1.4 billion.


Also, when custodians neglect their duties, a bridge might stop working, affecting the user. Also, there are technology risks such as buggy code, software failure, spam, human error, malicious attacks, and more. Lastly, bridges that use smart contracts are prone to malicious exploits leading to the loss of users' funds.