Blockchain technology is still developing and is constantly tackling various challenges along the way. One significant challenge developers and others in the industry have to tackle is blockchain’s lack of interoperability. Blockchains are siloed by design to maintain the consensus that forms the basis of the security and accuracy of the shared ledger. When developers build their decentralized application (DApps), they are generally locked in that particular blockchain with no means of accessing resources available on the other blockchains.
This raised the need to create interoperable solutions that would strengthen communities within the industry while allowing DApps developers to harness resources from other blockchains. The search for a solution led to the creation of blockchain bridges.
Experts believe that blockchain technology will go mainstream when end users are unlocked into one blockchain or standard. Bridges are not just any technology. Rather, they are absolutely required to ensure a seamless experience for users.
What are Blockchain Bridges and how do they operate?
Blockchain bridges are the connection that allows the transfer of tokens or arbitrary data (other data) from one chain to another. Bridges, usually token bridges, provide a compatible avenue for two chains with different protocols, governance models, and rules to interoperate securely on both sides. Bridges also allow users to send digital assets hosted on one blockchain to dapps on another, execute dapps across more than one platform and conduct fast, low-cost transactions of tokens hosted on otherwise less scalable chains.
Blockchain bridges also allow transferring the data from one parent blockchain and its child chain (sidechain). This occurs when the sidechain either operates under different consensus rules or has inherited its security from the parent chain. For instance, developers of Axie Infinity, a blockchain-based game, had to create a dedicated Ethereum linked sidechain called Ronin. The bridge allowed the game developers and users to deposit ERC-20 tokens, ETH, and NFTs into a smart contract. Ronin then picks up this data and relays it to the sidechain.
For instance, in decentralized Finance (DeFi), blockchain bridges allow users to access the advantages of different blockchain networks without sacrificing the benefits they get from their host chain.
Notably, bridges come in different types but can be categorized into two; centralized bridges and decentralized bridges. The former are trusted or federated, while the latter are trustless, meaning users do not have to place their trust in a single authority.
A famous example of centralized bridges is the Wrapped Bitcoin (WBTC) that allows Bitcoin holders to access the Ethereum ecosystem through tokens swap. Users deposit a certain amount of Bitcoin through partners called merchants. The BTC is deposited into a wallet controlled by a trusted custodian, which stores the BTC securely. The custodian then mints wBTC tokens of equal value on Ethereum. One thing to note is that all wBTC are backed 1:1 by BTC. These ERC-20 compatible tokens provide users with a faster way to conduct Bitcoin transactions. They also allow users to employ Bitcoin on various DeFi protocols to perform various activities.
When using decentralized blockchain bridges, the first process involves locking or freezing the sent assets by the user on the blockchain where they live using a smart contract. Notably, if the smart contracts are not supported, the second mechanism is employed—this step is governed by the mint and burn protocol.
The second step involves creating new tokens of an equal amount are built on the receiving blockchain. Once the user begins redeeming their tokens, the original assets are unlocked while the equivalent tokens are burned.
Some examples of blockchain bridges include RSK token bridge, xDai bridge, Wanchain blockchain bridge, the Syscoin-Ethereum blockchain bridge, and the OmniBridge.
Creating a blockchain bridge
Decentralized and trustless bridges can be built through Bridge pallets for substrate, smart contracts, and higher-order protocols. Building a bridge can be done in various ways.
The first case scenario is when developers choose to use smart contracts on a particular blockchain, such as Ethereum, and link the smart contracts using an Oracle.
One can also choose to build the bridge using an SPV client. An SPV client is a lightweight system that allows succinct proof of cumulative proof of work. This allows the users to select the best chain from the available selections. Notably, SPV light clients are ideal tools for building a smart contract-based bridge between two blockchains based on proof of work. This method allows both blockchains to maintain a representation of the other blockchain’s best chain.
Others may choose to use more developed systems like the HawkClient, an interactive decentralized smart contract system. The HawkClient system allows the transfer of information by maintaining a smart contract in the host blockchain connected to a remote blockchain. Usually, a simple HawkCkinet system will have four roles: the prover and Approximate Merkle Mountain Range (AMMR) Updater or otherwise referred to as AMMR-Updater verifier, and finally the user. This system is implemented in a mirrored fashion between the two blockchains, thus providing a basis for a decentralized token bridge.
It is worth mentioning that there are a few more methods in addition to the above examples. Developers are still working on improving and creating better ways for building blockchain bridges.
Functioning of blockchain bridges
Some type of mint-and-burn protocol is imperative to keep flow of tokens constant across the blockchain networks. Tokens moving out of a blockchain are burned. In other words, they are moved to a place without an address. These tokens are locked with an equal number of tokens minted on the next blockchain. At the time of these tokens moving back to the original network, the tokens minted against them are burned or locked. In another blockchain, the equivalent number of tokens are minted or unlocked.