Layers and Bridges: A Fundamental Discussion

TL;DR

• Following closely on the heels of the first blockchains of Bitcoin and Ethereum, there has been proliferation of activity to build out the infrastructure for blockchains. This discussion will cover the motivation behind and the breadth of the infrastructure development while skimming over many of the technical details.

• The explosive growth in competing blockchains is to pursue better functionality along the critical lines of scalability, security, and decentralization. Attempting to simultaneously solve for these three characteristics is known as the blockchain trilemma.

• As value accrued on different blockchains and gas fees (transaction costs) rose on the Ethereum chain, developers and users sought ways to port assets (and their associated value) across chains. Bridges provide this transport facility to allow for blockchain interoperability.

• The same motivation led to the development of side chains and rollups to ease the congestion on the main blockchain.

• The attacks on the Solana Wormhole and Ronin Bridge, in the first quarter of 2022, underscore the difficulties of solving the blockchain trilemma, the complexity of this ecosystem, and potential points of failures and attack vectors.

• Blockchains are ultimately tools for humanity to collaborate. We may very well be offered a world of multiple chains and bridges. The wealth accumulated on and the usage of the various blockchains may likely follow a power law distribution where the largest, most vibrant economies attract the largest inhabitants.

After One, Came Many

When the Bitcoin whitepaper was released in October 2008 by Satoshi Nakamoto, it was complex, yet at the same time, simple and elegant. It was complex due to its integration of various disciplines including cryptography, game theory, computational theory, and financial accounting. And yet, the outcome was simple and elegant in that it allowed for peer-to-peer transactions and recording (decentralized and permissionless) of value without a trusted intermediary (trustless). The first blockchain was born when the bitcoin genesis block was created in January 2009.

Human ingenuity never seems to plateau. Ideas sprung forward for other use cases for blockchains ranging from recording physical assets and governing organizations, to smart contracts. Just about five short years after the creation of the first bitcoin, a young gentleman named Vitalik Buterin proposed to extend the properties of a blockchain by adding a Turing complete programming language to generalize blockchain applicability in a manner that remains trustless, permissionless and decentralized. Buterin’s Ethereum whitepaper was released in 2014.

The launch of Ethereum in mid-2015 spawned the development of many decentralized applications (dapps). Finance applications were among the earlier popular applications. For example, Maker (MKR) established itself as an important foundation for decentralized finance by allowing a user to take out a loan in the form of a stablecoin (DAI) that is overcollateralized by the user’s own assets, say ether (ETH). Meanwhile, an example of a non-financial dapp is the Basic Attention Token (BAT). BAT, through the use of its token and Brave browser, attempts to balance the dynamics of incentivizing users to view, charging advertisers to push, and rewarding publishers to create content. The growth of these dapps, activities of these users, and attraction of more developers pushed Ethereum, alone, to a market cap of over $400 billion by the end of Q1 2022 and the market cap of the related projects in its ecosystem to [over $450 billion] over the same period.

Ethereum’s success laid the seeds for competition. High demand for transactions and blockspace on the Ethereum blockchain caused transaction fees to rise precipitously through 2021 and heading into 2022. Developers sought to build alternative blockchain solutions that tried to improve scalability without sacrificing security or decentralization. The careful act of balancing among these three competing characteristics became known as the blockchain trilemma.

Source: Bitinfochart.com

Alternative blockchains, or more widely known as alternative Layer 1s (alt-L1s), offered ingenious solutions to the consensus segment of the blockchain software technology stack. Stepping back a bit, one can abstract the different segments of what generates a blockchain into its data model, execution engine, consensus, and application components.

·       The data model describes what information is to be stored on the ledger. In the case of Bitcoin, it is simply a ledger describing the state of digital addresses holding unspent transactions of that digital currency.

·       The execution engine determines what transactions will take place to change the states of the accounts from one instance to the next. The Bitcoin script allows for credit/debit transactions, checks to avoid double spending, and where implemented, allows for multiple signatures. Solidity, Ethereum’s smart contract language, allows for more complex transactions.

·       The consensus segment provides the mechanism to allow a decentralized group of validators and miners to determine how new blocks are to be added to the chain and validated. Different consensus mechanisms (e.g., Proof-of Work (PoW), Proof-of-Stake (PoS), Proof-of-Authority (PoA)) offer differing tradeoffs on the competing characteristics in the blockchain trilemma.

·       The application component provides the user interface.

Solana, an alt-L1, implements a Proof-of-History on top of its PoS consensus mechanism by cryptographically time-stamping transactions to determine the order and validity of transactions, thereby simplifying and speeding up the validation process. Compared to Ethereum’s throughput of 20 transactions per second (tps), Solana claims to allow up to 65,000 tps although this claim has been controversial, and some researchers seemed to have measured it at just below 1,000 tps.

Source: Delphi Digital

Binance Smart Chain (BSC), another alt-L1, implements the Ethereum Virtual Machine (EVM), thereby offering Ethereum compatibility, and can process around 160 tps. It accomplishes this by using a Proof-of-Staked Authority. That is, the consensus uses a combination of delegated Proof-of-Stake and Proof-of-Authority and relies on 21 elected validators. In short, rather than solving for the blockchain trilemma, BSC traded off decentralization for the sake of scalability.

With the increase in the number of alt-L1s, wouldn’t it be wonderful if one could take assets in one blockchain and use them on another blockchain? Whether one applies a mental model of using, say, Euros, to spend in Canada, or using a Starbucks rewards card to buy Peet’s Coffee (no, you can’t actually do that), blockchain interoperability became highly sought after. In addition to building dapps for use on the blockchains, developers worked on bridges to transfer assets across the chains.

While blockchain interoperability offers many benefits, the design and implementation is relatively new and complex, and not without risks. The Solana Wormhole hack in Feb 2022 illustrated the smart contract risk of trying to bridge ETH onto the Solana protocol. The hacker was able to steal around $325M in ETH by minting “wrapped ETH” on Solana without depositing the equivalent amount of ETH as collateral. The hacker subsequently was able to exchange the wrapped ETH for actual ETH and move that out of the Solana Wormhole.

Layer 1s and Layer 2s – The Rewards and Challenges

SOL and BSC are just two of the many alt-L1s that came along to challenge Ethereum’s dominance as a smart contract platform. Indeed, before its ill-fated death spiral in May 2022, the Terra chain was the number 2 alt-L1 at the end of Q1 2022, capturing 12.64% of the total value locked or just under $29 B. As of the writing of this article and with the market uncertainty and drawdown, Ethereum has recaptured some of its dominance, accounting for just under 60% of the total value locked on smart contract platforms. That leaves over 100 alt-L1s competing for the remaining 40% and the right to nip at Ethereum’s heels.

 Source: All Chains TVL - DefiLlama

“Necessity is the mother of invention”. The push for more transactions at lower fees on blockchains led not only to the design of alt-L1s but to vastly interesting solutions that enabled transactions to be processed off the Layer 1 blockchain. These off-chain solutions come in the form of side chains and rollups, of which the latter is commonly referred to as Layer 2 solutions or simply L2s.

Side chains are themselves blockchains, and while they use the native token of a corresponding L1 blockchain, they do not use the L1 execution capacity or consensus protocol. Instead, side chains rely on their own mechanisms. Users on the L1 chain send and lock their tokens to the side chain, carry out their transactions on the side chain, and may decide to settle back on the main L1 chain. Popular side chains are the Bitcoin Lightning Network and the Ronin chain for the Axie Infinity game that uses ETH and USDC (an Ethereum compatible ERC20 token) for payment.

It's worth diving into the Ronin chain a bit to remind ourselves how the trilemma of scalability, security, and decentralization is truly hard to manage. Ronin is the side chain to the game Axie Infinity. Axie is a blockchain based game, created by Sky Mavis in late 2020, that runs on Ethereum. The game pioneered the play-to-earn (P2E) model. Users are incentivized to purchase (as non-fungible tokens, NFTs), breed, and battle monsters to earn more game tokens and trade their NFT game monsters. This proved to be lucrative for many players and as the fees on Ethereum grew more expensive, developers sought ways to reduce transaction costs. The Ronin network was launched in early 2021 for this express purpose.

As a side chain, the Ronin network uses validators appointed by Sky Mavis to provide POA consensus. (Hmm, what did we say before about POA and centralization?) A majority of the validators are required to approve the transfer of assets to and from the Ronin network. These assets were in the form of NFTs (ERC721 tokens), ETH, and USDC. Unfortunately, in March 2022, the bridge that allowed assets to be transferred on and off the Ronin network was hacked, leading to a loss of around $625 M, most of which was in stolen ETH and some $25M in USDC. At that time, 9 validators secured the transfer of assets and only 5 were needed to approve asset transfers. Investigators revealed that a malicious actor used social media to access the private keys of the 5 of the validators, thereby controlling the approval process for the illicit asset transfers.

In contrast to side chains, rollups use their own execution engine to ease the burden on the main blockchain to process transactions but settle the transactional results back to the L1 to rely on the L1’s consensus protocol. Optimistic and zero-knowledge (zk) rollups are two promising rollup technologies. Optimistic roll-ups are less computationally intensive by assuming transactions are valid but may take longer than zk rollups to settle in the event that settlements are challenged and a fraud proof is required. Zero-knowledge rollups require zero knowledge proofs that ascertain that transactions and settlements are valid. Arbitrum and Optimism are two separate projects that implement optimistic rollup. StarkWare implements zk rollup while DYDX is a decentralized exchange (DEX) that built its earlier versions on the StarkWare’s zk rollup.

Layer 0s – Meta Blockchains and Their Raison d’ Être

Faced with multiple blockchains, scaling solutions, and dapps, someone was bound to ask, can we do better and how? Imagine a ecosystem in which individual blockchains are optimized to more efficiently process the family of dapps on the chain, where assets are truly interoperable, and yet consensus and security is shared by all. Enter the Layer 0 solutions (L0s).

It is hard to discuss L0s in the abstract, so we’ll draw on Polkadot’s (DOT) vision. DOT is the most developed and largest L0 by market capitalization. It was founded in 2016 by Gavin Wood (a co-founder of Ethereum) publishing the Polkadot whitepaper. DOT seeks to provide the minimum functionalities of security and transport, while allowing heterogenous blockchains to develop the data model and execution mechanism in a way that is most efficient for the dapps on that particular chain.

Architecturally, at a high level, DOT allows for multiple blockchains to run in parallel (parachains). Each Parachain is allowed to have its own native token. The parachains are centrally connected using a Relay Chain to share the consensus mechanism for security and to allow for token interoperability. DOT’s Relay Chain is secured by Nominated Proof-of-Stake (NPOS). We advise the reader to visit DOT’s technology website for a much fuller description of the architecture.

In contrast to the L2s previously discussed whereby execution is pushed off-chain to improve scalability, DOT, as an L0, seeks to improve scalability (both transactional throughput and interoperability) by pulling the consensus mechanism to a lower level to allow security to be shared by its various blockchains. In essence, it serves as the blockchain to blockchains.

This added level of flexibility then allows for greater customization of the individual parachains. For example, parachains can be created with parameters tailored to suit a specific use case.  A parachain designed to handle higher frequency transactions may have a faster blocktime or make tradeoffs with respect to decentralization. Other chains might provide greater privacy by default by leveraging methods in cryptography or specialized hardware, e.g. Phala. Others may mimic other popular smart contracting platforms to allow developers to port over smart contracts and existing tooling with ease – e.g. Moonbeam, which is compatible with the Ethereum EVM.

Web 3’s Bright Future

It’s hard to wrap one’s head around the frenzied construction that is taking place on the infrastructure of Web 3. Capital expenditure requirements are low to build this infrastructure, compared to say, building out the infrastructure for a city, province, or nation. As a result, experimentation will be high, as will be failures and scams.

Sure, bitcoin seems to have a cult following. Stable coins seem to throw out the lessons that economists and central bankers have been trying to teach us for decades. DeFi platforms allow minimally experienced investors to be their worst selves. Jpeg NFTs magnify the inequities we see in society today and blockchain games seemed to have knocked gaming back a few years.

But recall that the prototypes of the past look nothing like the products we have today. Alexander Graham Bell would not recognize the smart phones we have today. The Pong game of yesteryear is nothing like the Call of Duty type of MMORPG games of today. Nikola Tesla would be amazed at the electric vehicle company named after him and the technology based on the fundamental work that he pioneered. Etc.

Progress is real. Blockchains allow for value to be transferred like a text message and in a trustless manner. Smart contracts allow for that value to be programmable. Zero knowledge mathematics provides for scalability by reducing data requirements. Game theory embedded in consensus mechanisms allow for decentralized and trustless peer-to-peer interactions. All this, in the thirteen short years since the Bitcoin genesis block.

Humanity has always evolved ways to collaborate whether it was the tribe, state, church, corporation, or nation. The infrastructure that is being built now lays the foundation for Web 3 to offer a new way for humanity to transcend traditional borders and collaborate on truly global issues. We live in different cities and associate in different societies, so it makes sense that we have a multi-chain future. When we move locations or simply transition from work to family or leisure, we bring the things we need with us, so interoperability is highly desirable. Many infrastructure projects will fail along the way. But a few are percolating to the top and will likely follow a power law distribution in terms gathering mass adoption and accruing value. These leaders are likely to be the ones that allow people to effortlessly collaborate while hewing true to the promises of Web 3. The future looks bright for Web 3.

References

·       Dinh, Liu, et al. “Untangling Blockchain: A Data Processing View of Blockchain Systems”, Aug 2017

·       Maker Dao, “What are bridges and why they important for DeFi”, Mar 2021

·       L.H. Newman, “Blockchain has a bridge problem and hackers know it”,  Wired, Apr 2022

·       R. Stevens, ”What are blockchain bridges and how they work“, Coindesk, Mar 2022 

Previous
Previous

The Merge, Part II

Next
Next

Valuing a Cryptocurrency Network