Blockchain forks, wrapped tokens, bridges and interoperability (Article 34):

Different blockchains work as independent entities without any communication with each other, so interoperability is required to unleash the true might of this great technology.

Al_ref
Decentralized Innovations
8 min readNov 18, 2022

--

Background by Pixabay on pexels.

Once you start to interact with blockchains and get involved with cryptocurrencies, it will become obvious rather quickly that blockchains are rather separated from one another. If you have a crypto wallet, you probably noticed that it only works with a limited number of cryptocurrencies. This is because blockchains work with different standards, which makes them incompatible with each other. To illustrate the magnitude of this problem, imagine blockchains were banks that could not communicate with each other. In such a scenario, if you wanted to try to purchase an item or obtain a service, then you would have to first make sure that the provider uses the same bank as you do, otherwise, you would not be able to transfer money to them.

On the one hand, this independency between blockchains ensures each blockchain’s sovereignty and security, but on the other hand, it limits blockchains from benefiting from each other’s strengths. So, why weren’t modifications and features built right into the first blockchain, Bitcoin?

When Bitcoin took off and more users started participating, some modifications were proposed to fix certain issues and to speed up transactions. However, not all Bitcoin users agreed to those proposals, which led to a split (or a fork) that resulted in 2 copies of the Bitcoin blockchain. The same thing happened with Ethereum after ‘the DAO’ debacle.

Forks:

Forks are replicas of the blockchain. Every miner keeps a full copy of the blockchain. So, when miners disagree on the way forward, each group can decide to proceed with their new modification of the blockchain, and such a decision leads to forks. There are both soft- and hard-forks.

A soft fork is a slight modification in the blockchain protocol or rewinding the blockchain a few blocks backwards. A soft fork doesn’t require users of the blockchain to upgrade their software as the fork is backwards compatible. So, a soft fork is a small update to the blockchain or a correction of past actions.

Then there are hard forks, which are major modifications to the blockchain. Hard forks result in 2 copies of the blockchain that are incompatible with each other, so at least one fork requires an update to its software. Hard forks are similar to changing your phone from an Android to an iPhone; you need new accessories and there is also a different operating system and a new app store.

Some of the main forks are:

  • Litecoin (LTC): a fork of Bitcoin (BTC). It was created when some Bitcoin users decided to use a new hashing algorithm other than the SHA-256 that is used in Bitcoin. They also decided to reduce the block time to 2.5 minutes instead of 10 minutes.
  • Bitcoin Cash (BCH): a hard fork of BTC prior to the implementation of SegWit (Segregated Witness) due to a disagreement among Bitcoin users regarding the scaling roadmap. BCH was later forked into Bitcoin ABC and Bitcoin Satoshi’s Vision (BSV).
    In Bitcoin (and some other blockchains) the transaction ID is not included in the block verification. When Bob sends 1BTC to Alice, he constructs a transaction that looks something like this:

    Sender: Bob (wallet address: 3FZbgi29cpjq2GjdwV8eyHuJJnkLtkmZc5)
    Receiver: Alice (wallet address: 3FZbgi2bbsfah8hbdjf7h9V8eyHuJJnkLtk)
    Amount: 1BTC
    Signature: khsddfu8hkshf88u4 (immutable ‘hash’ that includes sender and receiver wallet addresses and amount transacted)
    ID: 1234 (not included in the signature)

    Then he sends this transaction to be verified. But before verification, Alice copies the transaction and changes the ID:

    Sender: Bob (wallet address: 3FZbgi29cpjq2GjdwV8eyHuJJnkLtkmZc5)
    Receiver: Alice (wallet address: 3FZbgi2bbsfah8hbdjf7h9V8eyHuJJnkLtk)
    Amount: 1BTC
    Signature: khsddfu8hkshf88u4 (immutable ‘hash’ that includes sender and receiver wallet addresses and amount transacted)
    ID: 5678 (not included in the signature)

    Alice’s copy of the transaction is valid because the signature is genuine. So, if her transaction is picked first by a miner, this will disqualify Bob’s transaction from being verified because it is spending the same money. Although the money has left Bob’s wallet to Alice’s, he cannot trace the transaction because he will be looking for an ID: 1234 that is not confirmed. This will make him send the money again. This issue is called transaction malleability and is one of the reasons for introducing SegWit. SegWit is beyond this introductory series.
  • Ethereum Classic (ETC): a fork of Ethereum after the famous ‘the DAO’ incident.

So, users may disagree on some features and therefore create forks, although they still agree on the core concepts and operation of the blockchain. Now, imagine the situation when a complete overhaul is proposed, like upgrading Bitcoin code to be Turing-complete. Such an undertaking did not just result in a fork, but instead led to an entirely new blockchain: Ethereum.

Although blockchain (core) users disagree and create forks and new blockchains, interactions between different blockchains are essential. One example is moving some of the staggering value on Bitcoin to Ethereum for DeFi. The necessity of transferring cryptocurrencies between blockchains resulted in a few solutions including, parachains and cross-chains (bridges) & wrapped tokens.

To decide on the best solution for interoperability, the 5 classifications below are needed.

The goal for communication:

  1. Transfer value in the form of cryptocurrency between blockchains.
  2. Validate and verify operations on another blockchain.

The approach for connection:

  1. Centralized: an entity controls and triggers the transfer of assets or verifies operations.
  2. Decentralized: this means automatic operations, so the communication is performed by a smart contract and validated by a decentralized pool of nodes.

Communication mechanism:

  1. Relay: a validation and verification mechanism where blockchain-A keeps a record of some information from blockchain-B, such as the block header.
  2. Hash-locking: a mechanism where a time-lock is put on the transaction (finality) to provide time for the sender’s and receiver’s obligations to be met.
  3. Bridges and wrapped tokens: a (decentralized) entity with smart contracts on 2 blockchains where tokens are locked on the first blockchain and new tokens with the same value are minted on the second blockchain. The tokens on the second chain are called “wrapped tokens”.

Asset tangibility:

  1. Tangible: the token represents a physical asset like gold or silver.
  2. Intangible: the token represents a digital asset like software or digital art.

Asset fungibility:

  1. Fungible: the token is divisible. This token can be digital like BTC, or a digital twin of a physical asset like grams of gold.
  2. Non-fungible: the token is indivisible. This token can be an NFT of digital art or an NFT of certificates of ownership.

Parachains:

Parachains (short for “parallel chains”) are a relatively new concept, and they can be considered a blockchain of blockchains. They are implemented on e.g. Polkadot. Instead of building Dapps on a layer-1 blockchain, Polkadot allows users to build their own blockchains and connect them to the Polkadot central chain, which is called the “relay chain”.

Concept of parachains. Source: Polkadot.

Polkadot is a collation of blockchains connected through the relay chain. Each blockchain can have its own consensus and cryptocurrency, along with a set of miners. In the Polkadot system, collators (miners on parachains) maintain a record of the parachain and produce new blocks. Those blocks are then passed on to the validators (miners on the relay chain) for validation and then they include them in the relay blockchain. This system allows for an efficient and fast way of creating parallel chains to handle different applications or for purposes of scalability. Parachains don’t have to worry about security or reliability, since those tasks are handled by the relay chain.

However, this solution is only possible for blockchains that are Polkadot-compatible. But what about non-compatible blockchains? They couldn’t just be ignored. Bitcoin has the most value of any currently active blockchain, and Ethereum is the largest engine for Dapps, so it is necessary for blockchains to interact with both — even Bitcoin and Ethereum needed to communicate with one another. This led to the creation of bridges and wrapped tokens.

Bridges and Wrapped tokens:

With the growth of DeFi protocols on the Ethereum blockchain, it was recognised that the largest portion of the crypto value is inaccessible for DeFi since this value is in bitcoins. To tap into the pool of bitcoin funds, wrapped bitcoin (wBTC) was created. The amount of BTCs that is to be transferred to Ethereum is first locked in a wallet on Bitcoin blockchain. Then, an equal value of wBTC (which are ETH-compatible tokens) are minted on the Ethereum blockchain.

Working of wrapped tokens. Source: cointelegraph.

The wallets for the bridge can be centrally controlled, but thanks to multi-signature (multisig) and MPC (Multi Party Computation), decentralized bridges also exist. (Multisig and MPC will be covered in a later article.) The concept of wBTC can also be extended to other tokens and it can be applied to any cryptocurrency. Any wrapped token has the same value as the original token. It also takes the letter ‘w’ before the token ticker, e.g., wETH or wADA.

When bridging tokens between 2 blockchains where at least one of them is a second-generation blockchain, a new token is minted, rather than the native blockchain coin. So, wBTC on the Ethereum blockchain is a new Ethereum token called wBTC, and not the equivalent of BTC in ETH coins. This is because cryptocurrencies’ values fluctuate relative to each other.

Some blockchains share the same standards so their tokens are compatible with each other. In this case, a bridge would ‘literally’ transfer the tokens from one blockchain to the other. This works by “burning” the tokens on the first blockchain and then minting the same amount on the second blockchain. This is necessary since once tokens are created on a blockchain, they cannot be deleted, which is why they are “burned”: burning is sending the tokens to inaccessible wallet addresses so they cannot be retrieved.

Transferring Matic token from ETH (Ethereum blockchain) to BSC (BNB Smart Chain) on Multichain.

Bridging should not be mixed with swapping that is done through DEXs, or ‘Atomic’ swapping.

Bridging is moving assets from one blockchain to another, while keeping ownership of the original assets.

Swapping is exchanging one cryptocurrency for another through a decentralized exchange as an intermediary.

Atomic swapping is exchanging one cryptocurrency for another without any intermediary (i.e. no person, institute or smart contract). Atomic swapping takes place between 2 wallets, such as in this example: Bob’s cryptocurrency-A leaves his wallet directly to Alice’s wallet. While Alice’s cryptocurrency-B leaves her wallet directly to Bob’s wallet. This operation is facilitated via a Dapp, and neither Alice nor Bob need to deposit their cryptocurrency in a liquidity pool or a centralised exchange.

Allowing the transfer of different types of assets between different blockchains expands the capability of each blockchain. Also, the ability of blockchains to monitor and verify operations on another blockchain links the different applications of blockchains together and allows for a comprehensive ecosystem of on-chain activities.

--

--