Posted 8 months ago | by Catoshi Nakamoto

In the 6+ years since its launch, Ethereum — the world’s largest smart contract-compatible Layer 1 blockchain — has consistently faced issues of scalability. Current transaction times and gas fees make Ethereum entirely unsuitable for many use-cases, like blockchain games. The need for a scaling solution is clear yet this solution cannot come at the expense of decentralisation or reduce the security of the Layer 1 blockchain network.

Powered by Wanchain: fast and secure decentralised L2L2 bridges

While potential solutions like sharding, sidechains, parachains, and hashgraphs all purport to solve Layer 1 scalability in some way, Vitalik Buterin, co-founder of Ethereum, has recently been advocating for a particular type of Layer 1 scaling solution to solve scalability issues on Ethereum: Layer 2.

Introducing Layer 2

Layer 2 is a fascinating approach aimed primarily at solving scalability problems on Layer 1 blockchains like Ethereum. Layer 2 solutions are, in essence, secondary blockchains built on top of Layer 1s blockchains. Using this approach, heavy duty computations, state storage and the sequencing of transactions are processed on the Layer 2 blockchain while the Layer 1 blockchain continues to provide a security and consensus framework.

Recently, several Layer 2 solutions, such as Optimistic Rollups and Zero-Knowledge Rollups, have undergone tremendous growth. These developments have clarified a few things about the future of Layer 2:

  • First, although every approach to Layer 2 has its fans, multiple Layer 2 approaches will coexist.
  • Second, multiple Layer 2 solutions will concurrently service the same Layer 1 blockchain. For instance, there will be many Layer 2 blockchains built on top of Ethereum.
  • Third, Layer 2 solutions will be applied to other Layer 1 blockchains such as Bitcoin, Polkadot, Litecoin and XRP Ledger. The specific pain point these Layer 2 solutions aim to address will differ per Layer 1.
  • Finally, Layer 2 blockchains will need to allow assets, data, and even commands to transfer directly from one Layer 2 blockchain to another Layer 2 blockchain in order to preserve the value of their scaling solutions.

As the world’s world’s premier decentralised blockchain interoperability solution, the prospect of Layer 2 to Layer 2 bridges is of particular interest to Wanchain. As such, the Wanchain team is ecstatic to reveal that a new innovative L2L2 bridging solution has been developed and is currently entering the final stages of testing.

L2L2: Layer 2 to Layer 2 direct bridges

The advantages of a L2L2 direct bridge are obvious as both Layer 2 blockchains exhibit high transaction throughput and relatively low gas fees. Notably, Wanchain’s new L2L2 direct bridges are designed to be:

Asset transfers from one Layer 2 blockchain to another Layer 2 blockchain do not need to pass through the Layer 1 blockchain. This greatly improves the efficiency of asset transfers. Wanchain’s L2L2 direct bridges do not suffer from the low transaction throughput speed and high gas fees of Layer 1 blockchains that necessitated the creation of Layer 2 solutions in the first place.

Wanchain’s L2L2 direct bridges are not bound by the limitations of a particular Layer 1 blockchain. Rather, they are a hybrid solution that can be used to connect different Layer 2 blockchains. There are no strict requirements on EVM compatibility dictating the use of a standard Lock-Mint-Burn-Unlock or Liquidity Pool approach to bridging. More on this below.

Wanchain’s L2L2 direct bridges leverage Wanchain’s existing Storeman Group architecture to ensure that the bridges remain fully decentralised and permissionless. The innovations of Wanchain’s Storeman Group, such as the use of secure multiparty computing which effectively eliminates the risk of single-point failure while transferring assets, are present in the L2L2 bridges.

L2L2 use cases & advantages

Wanchain’s L2L2 bridges enable numerous use cases. For example, a stable coin project like MakerDao can have $DAI stable coins on both Arbitrum and Polygon. Using a L2L2 bridge, a user can move their $DAI from Arbitrum to Polygon without passing through the Ethereum Layer 1 and incurring high gas fees and suffering slow transaction processing speeds. Other stable coins such as $USDT and $USDC would all benefit from L2L2 direct bridges.

Imagine the following scenario: you own $USDT on Arbitrum but not on Polygon. There is a hot new NFT auction being held on Polygon and you are dead-set on purchasing one. Without a L2L2 bridge, you would need to first bridge your $USDT from the Arbitrum Layer 2 blockchain to the Ethereum Layer 1 blockchain. This will incur fees and take time. You will then need to bridge your $USDT from the Ethereum Layer 1 blockchain to the Polygon Layer 2 blockchain. This will incur even more fees and take more time. By the time you’ve moved your $USDT to Polygon, you may have spent hundreds of dollars in gas. Worse still, it is likely that the NFT you wanted is no longer available. Not only did this tedious Layer 2 to Layer 1 to Layer 2 flow cost you time and money, but you didn’t even get to purchase the NFT you wanted in the first place! You will also incur even more fees moving your unspent $USDT back to Arbitrum. Needing to pass through the Layer 1 blockchain when moving from one Layer 2 blockchain to another is self-defeating and completely undermines the improved scalability promised by Layer 2 solutions.

While the need for direct L2L2 bridges is established, technical design questions remain. Just how does one go about building a direct L2L2 bridge?

L2L2 technical design

When designing the L2L2 direct bridge, the Wanchain R&D team took a hybrid approach. They were inspired by many established asset transfer mechanisms including but not limited to relayer, secure multiparty computing, atomic swaps, oracle nodes, and direct crosschain command execution. Ultimately, three feasible technical solutions emerged:

  1. Lock-Mint-Burn-Unlock (LMBU)
  2. Liquidity Pool
  3. Crosschain Function Call

LMBU is a well-known asset transfer mechanism used in many of the blockchain industry’s most popular crosschain bridges. For L2L2 direct bridges, three primary smart contract groups are deployed. The first is deployed on the source Layer 2 blockchain and handles the source assets. The second is deployed on the target Layer 2 blockchain and handles target assets. The third is deployed on a managing blockchain and handles matters relating to the L2L2 bridge nodes.

When a user initiates a L2L2 transaction, they specify the target Layer 2 blockchain and target address. The source Layer 2 blockchain smart contracts then lock the source tokens and issue a “Lock” event. The L2L2 bridge nodes see the “Lock” event and instruct the target Layer 2 blockchain smart contracts to mint the same value of tokens on the target Layer 2 blockchain. This results in a direct transfer of assets from the source Layer 2 blockchain to the target Layer 2 blockchain: a direct Layer 2 to Layer 2 transaction!

To bring assets back from the target Layer 2 blockchain to the source Layer 2 blockchain, the user sends a “Redeem” transaction. The target Layer 2 blockchain smart contracts then burn the tokens on the target Layer 2 blockchain and issue a “Burn” event. The L2L2 bridge nodes see the “Burn” event and instruct the source Layer 2 blockchain smart contracts to unlock the source tokens. The L2L2 bridge nodes all stake assets as collateral and use secure multiparty computing to prevent collusion. This approach is similar to the approach used by Wanchain’s Storeman Group, which manage crosschain transactions between heterogeneous Layer 1 blockchains.

This asset transfer mechanism combines secure multiparty computing and liquidity. It is built around liquidity pools on both sides of a L2L2 bridge. Instead of locking and minting assets, the source asset is sent to a liquidity pool on the source Layer 2 blockchain before a liquidity pool on the target Layer 2 blockchain releases the same value of tokens to the target address.

1*kZgeosKTCu46lI3PjaC9JA Powered by Wanchain: fast and secure decentralised L2L2 bridges

The liquidity pools on both Layer 2 blockchains are controlled by the L2L2 bridge nodes using secure multiparty computing to ensure the security of assets and maximum decentralisation. Just as importantly, asset transfers are simple and efficient using this approach.

The major challenge with this approach is the need to ensure sufficiently robust liquidity pools at all times. One potential method to address this issue is to implement a dynamic crosschain cost model. If the liquidity pool in Layer 2A decreases, then the transaction cost to move an asset from Layer 2A to Layer 2B increases. Similarly, if the liquidity pool in Layer 2A increases, the cost of a transaction from Layer 2A to Layer 2B decreases.

This asset transfer mechanism uses matching smart contracts deployed to both Layer 2 blockchains. Smart contracts on the source Layer 2 blockchain can call functions in the smart contracts on the target Layer 2 blockchain. When a L2L2 transaction is initiated, the source smart contracts lock the source asset and then calls the mint function in the smart contracts on the target Layer 2 blockchain to mint the same value of token to the target address.

At a glance, this approach seems straightforward. However, it requires a crosschain function call framework, the details of which are beyond the scope of this article. Crosschain function call frameworks and their underlying technology will be introduced in future articles.

A layered approach: Wanchain’s decentralised crosschain architecture

Wanchain has a proven track record building non-custodial decentralised crosschain bridges. Till now, the focus has primarily been on connecting Layer 1 blockchains with other Layer 1 blockchains. By extending Wanchain’s crosschain infrastructure to include L2L2 bridges, users, developers, and the ecosystem as a whole benefit from the unique advantages of Layer 2 blockchains. Because both ends of a L2L2 bridge have high transaction throughput and relatively low gas fees, crosschain implementations that were not possible with Layer 1 blockchains are now feasible.

The following diagram shows an overview of Wanchain’s crosschain infrastructure including L2L2 bridge.

1*uIOzROnBrfcO5Z3j SacBg Powered by Wanchain: fast and secure decentralised L2L2 bridges

From bottom-to-top:

  • The bottom layer includes all the Layer 1 blockchains connected by Wanchain’s non-custodial decentralised crosschain bridges, such as Bitcoin, Ethereum, Wanchain, Binance Smart Chain, Litecoin, XRP Ledger, Moonriver and Avalanche.
  • The vertical connectors are Layer 1 to Layer 2 bridges built by Layer 2 solution providers such as Arbitrum, Polygon, and Optimistic.
  • The middle layer is Wanchain’s L2L2 direct bridges, connecting the various Layer 2 solutions.
  • The top layer includes all the tokens, applications and other DeFi projects built or hosted on Layer 2 blockchains.

The importance of Wanchain’s L2L2 bridges increases alongside the number of viable Layer 2 solutions. L2L2 bridges are bound to play an important role in the future of crosschain interoperability for the following reasons:

  • There will not be a single Layer 2 solution. Many Layer 2 solutions will co-exist. Just as a lack of interoperability limited the adoption of Layer 1 blockchains, so too will Layer 2 blockchains need decentralised crosschain bridges to thrive.
  • Multiple assets and DeFi applications will exist across different Layer 2 blockchains. This creates a need to transfer data and assets from one Layer 2 blockchain to another.
  • Users will want to keep their assets on Layer 2 blockchains. This is due to the scalability improvements made possible by Layer 2 blockchains. The higher gas fees and slower transaction throughput of Layer 1 blockchains like Ethereum create a disincentive to move assets from a Layer 2 blockchain to a Layer 1 blockchain.

More details about Wanchain’s L2L2 direct bridges coming soon!

0*h13zoMn8b9 XGds9 Powered by Wanchain: fast and secure decentralised L2L2 bridges

About Wanchain

True DeFi is interoperable — Wanchain, the Wide Area Network chain, is the world’s premier decentralised blockchain interoperability solution. Our mission is to drive blockchain adoption through interoperability by building fully decentralised bridges that connect the world’s many siloed blockchain networks. This crosschain infrastructure empowers developers to build truly decentralised crosschain applications to power the future of DeFi.

Website | Documentation | Telegram| Twitter | Newsletter | Blockchain Explorer | Developer Portal

Original article published on Wanchain’s Medium.

About Catoshi Nakamoto

c6ea0c3794492f30883e516d39b2597a?s=90&d=blank&r=g Powered by Wanchain: fast and secure decentralised L2L2 bridgesActivist/Journalist, former writer - We Are Change, The Mind Unleashed, Coinivore, others. Currently writing for - Activist Post and Bitboy Crypto. Not Right or Left Apolitical. I Care About Truths (CATS.) Cryptocurrency enthusiast, I mined and lost 100+ BTC in 2010-2011. I work with - Bitboy, SoMee, CEEK, Presearch, and W3BT aka FMW Media Group. Friend of mostly everyone who isn't a dick. Just A Cool Cat.