All About Interoperability in Blockchain
Blockchain has presented the whole world of new possibilities before us. The Bitcoin blockchain came up in 2009 and after that many new blockchains with their own ecosystem, model and community have come up. The decentralized system has helped enterprises solve the problem of transparency, security and efficiency. However, the future of distributed networks such as blockchain highly depends on their ability to interact with each other. We call it interoperability which means the ability to share information freely across the blockchain networks.
Say a user of another blockchain has sent you something on your blockchain then you should be able to process it. Various blockchains should be able to easily communicate with each other.
The blockchains are increasing in number and so is the number of digital assets. But they all are isolated and work only in their own stipulated environment. You can’t use Bitcoin on Ethereum network nor can you use smart contracts on the Bitcoin network. Therefore, there is a growing consensus on the issue of interoperability among different blockchains.
How to get interoperability?
There are two categories of Interoperability:
1. Exchange of digital assets over different blockchains without intermediaries.
2. Exchange of arbitrary data i.e. Using data on one chain to effect state changes on other and making it possible to make advanced API calls between blockchains.
According to Vitalik, there are 3 primary technical approaches to achieve interoperability:
1. Notary schemes (exchange of arbitrary data)
2. Relays (exchange of arbitrary data)
3. Hashed timelocks (exchange of digital assets only)
A trusted federation is required to attest the events on another chain. Say the federation verified to chain A that an event had taken place on chain B. After the notaries come to agreement through consensus algorithm, a signature is issued which can be used to finalize payments on chain A based on the set consensus. Liquid is a BTC-backed sidechain from Blockstream which allows the use of synthetic bitcoin on a ledger.
The cross-chain interoperability can be easily achieved through notary schemes. The only condition here is that you have to keep trust in the federation of notaries.
Here the chains themselves verify the events without relying on a federation. A relay is a contract on chain A which acts as a light client of chain B and uses chain B’s standard verification procedure to verify the block headers of its contract. This allows chain A to understand event changes on chain B. Relays can have a lot of interesting cross-chain applications. Example- BTCRelay, a smart contract on Ethereum can read the Bitcoin chain and has been used to create applications such as EthereumLottery, where the lottery uses block headers of Bitcoin as a source of randomness. But there is a limitation with BTCRelay that interoperability is only one-way. Bitcoin can’t be used on the Ethereum chain since there is no Ethereum relay contract on Bitcoin.
It is the most practical technical approach and the most limiting in terms of functionality. A hashed timelock contract (HTLC) is a class of blockchain-based payments using hashlocks and timelocks. The receiver of a payment is required to either acknowledge receipt prior to a deadline or forfeit the ability to claim the payment, returning it to the payer. HTLC allows cross-chain atomic swaps and bi-directional payment channels between assets on certain types of blockchains.
Example – the Lightning Network (LN) is a protocol enabling high-volume, low-latency micropayments without any dependency of intermediary trusted stakeholders. HTLC is used to create a network of payment channels where transactions are executed off-chain and the net balances can be settled at any time on the underlying blockchain(s). LN is mostly being viewed as a scaling solution for Bitcoin. Currently, it is only compatible with Bitcoin and Litecoin.
Strong interoperability among blockchains makes them more user-friendly, useful, efficient and scalable. Notary schemes are the easiest to implement and offers full interoperability. Relays are similarly capable but in a trust-minimized setting and possess drawbacks in terms of compatibility with existing networks.
HTLCs are the most trust-less and practical approach among the three but their scope is limited to the exchange of value. However, they cannot be used to create synthetic representations of assets on different ledgers.