Keywords

1 Multidimensional Mutually Exclusive Choices as the Source of Blockchain Limitations

The limitations of blockchains have been repeatedly highlighted by some of the most accredited members of the decentralized community and summarized by the popular term blockchain trilemma [1]. While this trilemma is an oversimplification of the multidimensional mutually exclusive choices made by developers, users, and markets alike, it reveals, in an intuitive manner, why dissimilar networks must necessarily exist. Various iterations of this trilemma have been proposed: Vitalik Buterin views the blockchain trilemma as the balancing act between decentralization, security, and scalability [1], while Trent McConaghy considers decentralization, consistency, and scalability part of the trifecta [2]. For the purposes of this chapter, we will adopt the former approach. As the blockchain trilemma suggests, blockchains can only satisfy two of three trilemma dimensions and thus by definition can be one of the following: (1) secure and scalable but lack decentralization, (2) scalable and decentralized but lack security, and (3) secure and decentralized but lack scalability [1]. The various attempts at striking the perfect balance in the trilemma along with the ever-growing use cases for blockchains effectively translated in the creation of entirely new systems and cryptocurrencies, in an attempt to satisfy additional requirements. This further aggravated the problem of incompatibility between systems and in itself gave birth to a second type of dilemma: Choosing an innovative, dormant blockchain enables new technologies and state-of-the-art features; however, the risk of software bugs, security breaches, and potential loss of funds is considerably higher when compared to that of an established system. On the contrary, mature blockchains reduce this risk but at the same time limit access to innovative novel features. Blockchain interoperability is a direct response to those dilemmas, and an attempt at capturing the upsides that the technology has to offer, while minimizing the downsides.

2 First Attempts at Interoperability

2.1 Anchoring

One of the first implementations in blockchain interoperability came in the form of anchoring. Anchoring describes the process of storing data from one blockchain to another. This approach is usually employed by chains that adopt a faster and more efficient model that want to benefit from the inherent security of a less flexible system, without compromising on performance. In practice, this is done by producing a unique fingerprint of all the information deemed meaningful at determining one system’s current state and storing it on the primary anchor (the less efficient more robust chain) in the form of a hash. In this sense, the primary anchor serves a trusted immutable timestamp log that can be used to verify the true state of the secondary chain. The hash can be generated in a number of different ways, with the most common being that of a Merkle treeFootnote 1 with the Merkle root serving as the anchor. As a rule of thumb, hashed data from the secondary chain is stored in the primary chain in periodic intervals to represent its updated state. Systems that employ proof of work are preferred as primary anchors for their inherent connection to physics, vast deployment, and proven reliability. While immutability is difficult to measure precisely, with anchors, efficient chains can achieve an otherwise unlikely degree of security.

2.2 Pegged Sidechains

Another approach that facilitated communication between otherwise isolated systems came in the form of a layer 2 solution coined pegged sidechains. Pegged sidechain is a technology that allows ledger-based assets of one blockchain to be transferred and used freely in a separate blockchain and even moved back to the original if necessary [3]. The secondary chain, or sidechain, is fully independent meaning that its potential compromise will have no impact on the main or parent chain. One early implementation that didn’t allow for such flexibility was that of a one-way pegged chain. This term refers to the practice of destroying assets in a publicly recognizable way on the parent chain which, when detected by the sidechain, would initiate the creation of new assets, effectively “transferring” them. With the introduction of the symmetric two-way peg, the “destruction” of assets is no longer necessary. Instead, they are sent to a special output on the parent chain that can only be unlocked by a simple payment verification (SPV) proof of possession [4] on the sidechain. Once locked on the parent chain, assets are allowed to move freely on the sidechain and can always be sent to an SPV-locked output so as to produce SPV proof and unlock funds on the parent chain. In the case of an asymmetric two-way peg, SPVs are no longer needed as users of the sidechain are simultaneously full validators of the parent chain and, thus, are at all times aware of its state.

2.3 Cross-Chain Atomic Swaps

A promising development in the space of blockchain interoperability is cross-chain atomic swap. Cross-chain atomic swaps allow peers to exchange different ledger-based assets directly, without the need of a custodian third party or trusted intermediary. Those exchanges are atomic in the sense that they completely either occur as described or have no effect at all. This is essential for the security of the exchange, as it ensures that a scenario in which – either through manipulation or human error – a single entity that is counterparty to the transaction cannot control both assets at the same time. To initiate an atomic swap, funds from two chains are initially deposited in hashed time-locked smart contracts (HTLCs) that can be publicly inspected on the blockchain. Those contracts can only be unlocked through a special key called a preimage, a combination of a key and a code. The code is set by the initiator of the swap and is initially kept secret, while the key part of the preimage corresponds to the keys held by the two peers enmeshed in the swap. If the initiator deems funds to be deposited as agreed, they publish the secret code, unlocking assets for both parties, and thus the cross-chain atomic swap occurs. At any time and for any reason, any of the two parties can walk away from the exchange, effectively canceling it. HTLCs are programmed to expire when enough time elapses, returning funds to the original owner’s address, and by doing so they fulfill their premise at an atomic exchange. While the proposition of fast and nearly feeless asset exchanges between blockchains, without the need for a trusted intermediary, seems attainable, in practice, such deployments face many obstacles. As atomic swaps are built on the technologies of time and hash locks, they can only be employed by chains that adopt both. At the same time, assets that are exchanged must have the same hash algorithm. Arguably, the most important limitation toward mainstream adoption is that the initiation of cross-chain atomic swaps currently involves prohibitive levels of proficiency with the aforementioned technologies.

2.4 Solution Design

Technical incompatibilities are not exclusively responsible for the fragmentation of the blockchain space. As with all dormant technologies, the pursue of “all possible roads,” the urge to discover the limitations of the technology, the sheer curiosity of human nature, and the notion that the “next big thing” lies in the next line of code contribute to the infinite complexity that characterizes today’s blockchain ecosystem. Lacking a focal point, this complexity is just noise, serving as an obstacle to greater adoption and deterring end users from utilizing blockchains to achieve their goals. Conversely, multiple benefits could be obtained if developers were to utilize interoperable solutions to “tame” the chaotic blockchain space. We deem that the technology available currently is enough to employ (1) a user-friendly, zero-fee, multicurrency micropayment network, (2) a publicly verifiable archive of critical information on private blockchains, and (3) “modules” that extend the functionality of less flexible systems.

To begin with, given a wide enough employment and sufficient liquidity, atomic swaps can allow any cryptocurrency to “transmogrify” itself into any other almost instantaneously. This could in practice eliminate the high switching costs imposed by incompatible technologies and maintained by centralized exchanges. For most use cases, save that of exchanging cryptocurrencies for fiat, such implementation might render those centralized exchanges unnecessary. At the same time, exchanges that employ questionable practices or high fees will be forcefully discontinued. This could further add to the security and make the blockchain space more attractive overall.

In a similar manner, atomic swaps when used in conjunction with a Lightning Network [5] and other layer 2 solutions could reform payments, by making them cross-chain and extremely efficient, economic, anonymous, or secure depending on the user needs. Wallets that utilize both technologies can, by looking at a list of available cryptocurrencies, determine the one that will allow for the fastest possible transaction, with the lowest possible fees, effectively creating an almost zero-fee multicurrency micropayment network. Similarly, users can choose to optimize their transaction for anonymity, by selecting paths that obscure the origin of sent coins through mixing.Footnote 2 When transactions require more security or finality, a blockchain with large amounts of computational resources dedicated to its upkeep could be preferred. Lastly, the use of atomic swaps has additional implications for the use of cryptocurrency as a medium of exchange between customers and retailers. Even with the current state of the technology, customers would be able to pay in any cryptocurrency they desire, with retailers receiving a stablecoin, ensuring that they are protected against extreme price fluctuation. At the same time, by bypassing third-party payment verification services that charge fees, businesses save money and – if they so choose – can pass those savings on to the consumer. In conjunction with the above, anchoring can be leveraged in creating a publicly verifiable archive of blockchain checkpoints. Businesses that use blockchains in a private or consortium setting can publish information for auditing and transparency purposes. By the use of the same technology, blockchains that aim at being extremely efficient could mitigate reorganizations and achieve a relatively higher level of finality by “checkpointing” their latest block on a public blockchain and then building the next one on top of that. Lastly, layer 2 solutions with pegged sidechains can be utilized in extending the functionality of less flexible main chains. Projects like BitPay’s ChainDb builds a peer-to-peer database system on top of the Bitcoin blockchain, treating it like a secure database [6]. Counterparty brings user-created tradable currencies, a decentralized exchange, and most importantly the ability to run Ethereum smart contracts and decentralized application on top of Bitcoin through the counterparty protocol [7]. Through the use of pegged sidechains and pegged sidechains on top of sidechains, virtually any feature available in the blockchain space can be added to almost any chain, naturally with questionable usability.

3 Later Attempts at Interoperability

Even when utilizing present interoperable solutions, the limitations of the decentralized space have begun to show [8]. Many projects, with the most notable being Polkadot, Cosmos, and Interledger, are working toward building an Internet-like network infrastructure that will combat present limitations by allowing any blockchain to seamlessly communicate with another in an Internet-like network infrastructure. In this final part of the chapter, we provide a brief overview of the aforementioned projects and present an idealistic solution design, disregarding the dormant stage of the technology and present limitations.

3.1 Polkadot

The Polkadot protocol was introduced in 2017 and was followed by a successful initial coin offering (ICO) that raised more than 145$ million. Polkadot is one of the most ambitious interoperable projects and was originally conceived by the co-founder of Ethereum and creator of the Solidity programming language, Gavin Wood. It aims at alleviating the primary pain points [9] of current blockchain implementations with the use of a heterogeneous multichain framework. If successful, this would allow for seamless cross-chain interaction, as smart contracts, applications, value, and data will be able to flow freely [10]. Additionally, networks connected with Polkadot will be able to make use of each other services and harness their unique advantages with near-native efficiency. To achieve this, the core of the Polkadot structure consists of three main elements, the relay chain, the parachain, and the bridge chain. The relay chain serves as the main chain or hub, where all parachains connect. It is responsible for coordinating consensus, providing pooled security for the network, and transferring data between parachains. A parachain is any blockchain or other data structures, public or permissioned, that connect to the relay chain. For scaling purposes, they are responsible for processing their own transactions but are secured by the network consensus. The last main element is that of the bridge chain, which is responsible for connecting completely sovereign blockchains that do not comply with Polkadot’s governance protocols to the relay chain. One such example is the Ethereum blockchain. To support the network of connected chains described above, a structure of adjacent roles is put in place. Validators are responsible for submitting valid finalized blocks to the relay chain. To qualify, they are required to stake Footnote 3 a significant bond Footnote 4 in the form of the native DOT token. They receive candidate blocks from collators and are approved by nominators. Nominators are parties that hold a significant stake in the network and are responsible for electing trustworthy validators. Collators, on the other hand, are essentially the validators of each individual parachain. Lastly, fishermen are responsible for seeking out malicious behavior to report to validators in exchange for a one-off reward. Bad actors have their stakes slashed,Footnote 5 and parts of their assets are used to fund the bounty-like rewards given to fishermen.

3.2 Cosmos

Cosmos is an upcoming Tendermint-based [11] framework, which similar to Polkadot aims at standardizing cross-blockchain communication for interoperable purposes. It raised more than 4870 Bitcoin in 2017. Building on the foundation we laid in the previous paragraph, we can easily interpret the various elements of Cosmos. Hub is the chosen name for the main chain of the network, and it serves an almost identical role to that of the relay chain in Polkadot. The Hub is built on top of a Tendermint engine, which is comprised of two main parts, the Tendermint core, which offers a BFT proof-of-stake consensus engine, and an ABCI (application blockchain interface),Footnote 6 which replicates dApps Footnote 7 deployed in multiple programming languages. Similar to Polkadot, Cosmos utilizes parachains, called zones, which connect to the Hub. Validators commit blocks originating from zones to the Hub. Lastly, a native digital currency called ATOM serves as a license for holders to vote, validate, and delegate other validators. ATOMs are also used for antispam protection, in a similar way to Ethereum’s Gas, and slashed in case of bad acting. Cosmos aims at bringing together cryptocurrencies by offering a more robust, scalable, and faster model for distributed asset exchange compared that is possible with a cross-chain atomic swap. At the same time, it aims at solving Ethereum’s scaling problems, by providing faster commit times by utilizing its Tendermint consensus and having Ethereum contracts run on different zones in a form of sharding [1].

3.3 Interledger

Similarly, Interledger is an open protocol suite that aims at enabling seamless exchange of value, across different payment networks or ledgers. It is a revised and open-source implementation of the cross-chain atomic swap protocol. Interledger positions itself as an “internet of money” and intents to route packets of value similar to how packets of information are routed on the Internet. To achieve this, it operates on a stack of four layers, (a) the application layer, which is responsible for coordinating the atomic swap sender and destination addresses; (b) the transport layer, which serves the function of an end-to-end protocol between the sender and receiver of value; (c) the Interledger layer, which actualizes the transaction data; and, lastly, (d) the ledger layer, which is used for payment settlement. At the same time, peers on the Interledger network are nodes that can have any or all of the following roles: senders, routers, or receivers. Senders are essentially the initiators of a transfer of value, while receivers are the receivers of that. Routers, on the other hand, serve as intermediaries in the transaction and are responsible for applying currency exchange and forwarding of the packets of value.

3.4 Idealistic Solution Design

Disregarding any present limitations, we speculate that blockchain interoperability will facilitate the frictionless data flow between systems. An exhaustive categorization of all possible derivate applications is impossible, but we opt to highlight three specific use cases that we feel encapsulate the magnitude of changes that one can expect. Blockchain interoperability could (1) allow for a state-of-the-art, fully automated, and multi-asset financial system accessible anywhere and by anyone in the world, (2) provide a new model for consumer-business relationships by rendering traditional Know Your Customer practices and the monthly subscription scheme obsolete, and (3) enable efficient, scalable, and secure IoT and AI applications. To start, completely frictionless flow of information between blockchains when coupled with existing digital identity protocols as those proposed by Consensys,Footnote 8 Bitnation Footnote 9, or Evernym Footnote 10 can lead to a state where any application connected the interoperable blockchain network can be aware of the identity of anyone. To facilitate for privacy, data minimization techniques such as zero-knowledge proofs Footnote 11 can be utilized. This could enable individuals to verifiably prove their identity, without necessarily revealing sensitive information. In the context of an online service, this would mean that a traditional registration with the input of an individual’s personal data will no longer be necessary. By making payments efficient, new opportunities for alternative business models emerge. As an example, the prominent scheme of monthly subscriptions and the accompanying subscription fatigue can be replaced with a pay-as-you-use model, which has the potential to yield multiple benefits for consumers and businesses alike. Up until now, subscription services operated under educated assumptions about monthly use of their services, reflected in a monthly fee. This approach necessarily leads to overcharging or undercharging of individuals as it is not tied to use. Additionally, and due to the periodic nature of payments, it exposes companies to credit risk. By making transactions efficient, a network of interoperable blockchains could allow for constant streaming of funds, as long the user streams video and audio or in other terms uses a service. This intermediate network ensures that no party can “cheat.” By the same principles, the use of otherwise prohibitively expensive enterprise-grade programs could become more widely accessible. Users will be able to pay only for their use instead of the full price, and businesses would attract otherwise unattainable customers.

By utilizing interoperable blockchains, modern cryptocurrency wallets could extend their functionality beyond what is possible today. To begin, the sheer efficiency of cryptocurrency exchange will allow for any user or application to use any token that best fulfills their needs as it could be transmogrified to any other instantly and for free. At the same time, wallets could seamlessly make use of the growing network of decentralized finance (DeFi) to provide multiple benefits for their users. Deposited funds could automatically be lent out through a network of services similar to CompoundFootnote 12 where the on-wallet software would determine the combination that will yield the highest returns. This will allow for asset holders to enjoy industry’s high interest rates, with immediate access to their funds. At the same time, borrowers could have instant access to liquidity on fair and transparent terms. Taking this above concept a step further, funds could be automatically hedged or stored based on behavioral patterns. On-wallet software could monitor the spending habits of the financial profile of the user and make decisions to their best interest. For example, a wallet could determine that the best use of its funds is to be traded on one of the many token sets provided by the Set ProtocolFootnote 13 or invested long term in Bitcoin. Additionally, the growing popularity tokenization and non-fungible tokens (NFTs) [12] could enable additional novel applications. For example, a user could pay for their morning coffee with one-millionth of their tokenized home value or even opt to use part of it as collateral for a loan, if they so choose.

Artificial intelligence (AI) is another transformable technology. Interoperable blockchains and Internet-native money can be utilized in making AI efficient, secure, and scalable. To start, AI built on top of interoperable blockchains will be able to exchange information and learning models for free or even in exchange for digital assets. In this machine-to-machine economy, thousands of machine learning agents could simultaneously share and improve their knowledge. On the topic of security, a network of interoperable chains can also be used to provide a truly explainable AI.Footnote 14 As humans are not aware of the inner workings of deep learning, there is no certainty as to what inputs result in what outputs. As a result, such systems are treated as black boxes. By offering an immutable ledger and precise access to information, blockchains can be used to record specific events and thus offer accountability and explanations in an unbiased manner. Finally, blockchain-backed AI could unleash the full potential of IoT devices [13]. Billions of connected devices around the world record our universe of data, serving as a nervous system for the a distributed on-chain master brain that would process this wealth of information.