An article discussing how to solve the L2 liquidity fragmentation issue.

CN
1 year ago

Original Author: Tim Robinson

Original Compilation: Luffy, Foresight News

Why Do We Need Seamless Liquidity?

Last weekend, all my friends on Farcaster were talking about a hot new coin on Base: $DEGEN. FOMO led me to check my Rabby wallet to see how much I could invest:

An article discussing how to solve the L2 liquidity fragmentation problem

Well, I could invest $500 in this token, but I would need to sell some other assets. What does my investment portfolio look like?

An article discussing how to solve the L2 liquidity fragmentation problem

It's terrible, almost every token is on a different L2. To get $DEGEN, I have to perform multiple cross-chain and trading operations. Even though the fees are low, the time it takes for cross-chain and exchanges is still frustrating.

We need to solve this problem, our goal is to make the entire Ethereum ecosystem feel like a network. Let's see how unified liquidity combined with wallet upgrades abstracts cross-chain and makes the cross-chain L2 experience feel like using a single chain.

No Need for Cross-Chain

Why are cross-chain bridges currently so bad? They have many flaws:

  • You have to visit a separate website, connect your wallet, approve, transfer, and pray it reaches the other end…

  • Cross-chain transactions usually take 5-30 minutes to complete, which is too slow, ideally less than 10 seconds.

  • Most cross-chain bridges require locking liquidity on two networks. The more L2s we have, the more fragmented the liquidity becomes. Low liquidity makes it difficult to transfer large amounts of funds between chains, resulting in worse prices.

  • Only certain tokens with liquidity can be cross-chained, for most networks, these tokens are ETH and stablecoins.

  • Some wrapped tokens do not require locked liquidity and can support any token. However, after cross-chain, you will receive a non-native version of the desired token and must exchange it for the real token to use in any DApp on the new network, which requires liquidity, so we end up falling into the same trap.

Most importantly, if there is no need for cross-chain, why are we wasting millions of hours doing this?

Wallets and applications should handle cross-chain automatically

When you use a DEX or lending protocol, it should track your tokens on all chains. When you deposit tokens from another chain, it should automatically cross-chain them to the correct chain in the background, so the user experience of this process should be exactly the same as using the Ethereum mainnet alone.

Applications and wallets aim to achieve this goal, but the underlying infrastructure is not good enough yet. If cross-linking takes 10 minutes and you lose 1% of your tokens during this process, most users will be dissatisfied.

Let's delve deeper into the infrastructure layer and see how to solve this problem.

How to Achieve Seamless Liquidity Flow

There are 3 main methods for L2 network unified liquidity, each with different trade-offs but complementing each other.

  • Shared ecosystem cross-chain bridges: Achieve seamless aggregated liquidity across the entire chain ecosystem.

  • Token minting/burning: Unlimited transfer between any supported chains.

  • Interoperable native cross-chain bridges: Achieve cross-ecosystem aggregated liquidity.

Shared Interoperability Layer

When you cross-chain from the Ethereum mainnet to any L2, the process looks like this:

An article discussing how to solve the L2 liquidity fragmentation problem

Current cross-chain bridge operation

Each cross-chain bridge is a smart contract on Ethereum, which we call "native bridge". When you cross-chain to L2, your assets will be locked on L1 and a copy will be minted on L2. These networks have the ability to mint any asset supported by their native bridge without limit.

Although they have the same name and are not called wrapped assets, assets cross-chained from Ethereum to any L2 through the native bridge of the chain are actually wrapped assets because their contract addresses are different. USDC on Ethereum starts with 0xa0b8, on Arbitrum with 0xaf88, on Optimism with 0x0b2c, and on Polygon zkEVM with 0xa8ce.

These assets look the same because wallets and applications have an official asset list and display official icons, so users will never know the difference.

What if instead of each L2 having its own cross-chain bridge, they all shared one? Assets could be minted on a shared chain called the interoperability layer and then minted on the target L2.An article discussing how to solve the L2 liquidity fragmentation problem

Aggregated blockchain bridge operation

Polygon refers to this new design as an aggregated blockchain.

What is the use of this design? When transferring assets from one chain in this ecosystem to another, for example from Polygon zkEVM to OKX X1, it does not have to go back to Ethereum through traditional cross-chain bridges first. Instead, you can burn the assets and have the interoperability layer mint the exact same amount of assets on the target chain.

An article discussing how to solve the L2 liquidity fragmentation problem

Transferring funds on the aggregated blockchain

And now, assets cross-chained through the interoperability layer are exactly the same on every chain in the ecosystem. Assuming the interoperability layer can be used for free and is fast (Polygon claims their finalization time is less than 20 seconds), you will be able to cross-chain assets of any scale between any L2 in the ecosystem for free in seconds.

Both Polygon and zkSync are developing this interoperability layer for their ecosystems, and from the design documents that include shared cross-chain bridges from Optimism, it seems they are also exploring this area.

The downside of the interoperability layer is that it can only operate within one ecosystem and requires all chains to use a single cross-chain bridge, which increases risk, but the benefits of making liquidity flow seamlessly between all chains in the ecosystem are enough to offset this.

Since all tokens can be exchanged across ecosystems, your wallet does not need to display the chain where the assets are located or categorize tokens by chain. Instead, your wallet might look like this:

An article discussing how to solve the L2 liquidity fragmentation problem

When executing transactions across multiple chains, your wallet can simply show that you are using the "Polygon" network and automatically execute all cross-chain operations in the background.

Why wasn't this design completed earlier if it's so wonderful? ZK Proofs have only recently become fast and cheap enough to make this scheme possible. The interoperability layer uses ZK Proofs for all minting/burning, so it can be completed in seconds without any challenge period.

Advantages

  • Fast, simple, and standard way to transfer tokens between chains
  • Cross-chain any amount of tokens without slippage
  • Possible to use completely for free

Disadvantages

  • Only applicable to a single ecosystem
  • A single cross-chain bridge is a single point of failure for the entire ecosystem
  • Must be designed from scratch and cannot be added to an existing ecosystem without significant changes

Cross-Chain Tokens

Chains can delegate cross-chain to the tokens themselves, rather than relying on shared ecosystem cross-chain bridges. Tokens need to implement minting/burning functionality and allow users to burn tokens at any time to mint them on another chain. An article discussing how to solve the L2 liquidity fragmentation problem

Transferring DAI from zkSync to Polygon without using the Ethereum mainnet

These minting/burning messages can be passed through middleware (such as Layer Zero or Chainlink CCIP). Layer Zero is developing a project called Omnichain, which will allow tokens to implement this functionality.

Some tokens have already implemented this. Circle recently launched their Cross-Chain Transfer Protocol (CCTP) and implemented it on 8 different networks.

Since USDC has high liquidity on many networks and available liquidity is unlimited, it may be the perfect intermediary for transferring assets between chains. Wallets can exchange the tokens you want to cross-chain into USDC, cross-chain that USDC using CCTP, and then exchange it back into the desired tokens on the target chain. This can be achieved with minimal fees or slippage and handled automatically by your wallet.

The downside of delegating liquidity to tokens is that wallets and applications must know which tokens can be automatically cross-chained and which cannot, to simplify the user experience.

It also requires tokens to wait for finalization before sending, which may take minutes to hours, depending on the frequency of data being written to Ethereum. If tokens do not wait for final confirmation, double spending may be achieved by minting on the target chain and then recovering the sending chain's reorganization.

Another risk to consider is that token security depends on the security of each chain and relay system. If an L2 is compromised, it can mint new tokens by sending malicious messages to other chains (e.g., claiming it burned tokens when it did not). The same could happen if token relayers or oracles are attacked. This would result in the collapse of tokens on all chains.

Cross-chain tokens have been implemented in the Cosmos ecosystem through ICS-20. It solves the problem of "one chain breaking all tokens on all chains" by allowing tokens to track the path they took to the current chain. If token X is sent through chains A -> B -> C, and some X tokens are sent through A -> C, then if chain B is attacked, the first group of X tokens will be worthless, but the second group of the same X tokens will still have value because they did not cross-chain through B. This creates an additional issue of token interchangeability that wallets and applications must address.

Advantages

  • Tokens can freely transfer on any L2 chain
  • Can transfer any amount of tokens without slippage

Disadvantages

  • Chains must be secure, and a compromised chain may break all tokens on all chains
  • Wallets must know which tokens can be automatically cross-chained to simplify the user experience
  • Tokens must wait for final confirmation before transfer, which may take minutes or hours

Interoperable Native Cross-Chain Bridges

L2 chains with ZK cross-chain bridges can allow fast, free token transfers by trusting the native cross-chain bridges of other L2 chains. This can be achieved by burning tokens on one chain and then using the burn proof to mint the tokens on the native cross-chain bridge of another chain.

For example, if Scroll checks the Linea cross-chain bridge and deems it secure (and cannot be made insecure through upgrades), they can set up a service to monitor the L1 state root of the Linea cross-chain bridge, allowing any user on Linea to submit proof of burning Linea tokens, with this burn transaction included in the L1 state root, and equivalent tokens minted on Scroll.

An article discussing how to solve the L2 liquidity fragmentation problem

Transferring tokens between two L2s without using the Ethereum mainnet

Vitalik's article provides a more detailed explanation of the process of chains checking each other's state.

This is similar to cross-chaining back to Ethereum and then cross-chaining to another L2, but this method saves the high L1 Gas fees.

The current risk is that the locked token amount in these native cross-chain bridges may not match the token amount minted on L2, which is a core property of L2 that has not been broken so far. In the example above, if a user transfers $1 million of DAI from Linea to Scroll, the Scroll cross-chain bridge will lack this $1 million of DAI, and if a user wants to withdraw a large amount of tokens from the native Scroll cross-chain bridge, there may not be enough available tokens. Cross-chain bridges can coordinate these differences by batch L1 token transfers between them or by always maintaining bidirectional trust between them, so even after the Scroll cross-chain bridge is emptied, large holders can withdraw funds through the Linea cross-chain bridge.

Advantages

  • Tokens can freely transfer between trusted chains
  • Can transfer any amount of tokens without slippage

Disadvantages

  • If a cross-chain bridge is compromised, it may affect all cross-chain bridges that trust it
  • Cross-chain bridges may lock and mint different amounts of tokens on their networks, which may cause withdrawal issues

Fast Finality Layer for Economic Security

These three methods have excellent scalability and security, but one drawback significantly slows down the transfer speed: waiting for finality. Completing a block requires the sending network to write its data to Ethereum, which may take up to an hour, and then Ethereum mainnet to finalize, which may take an additional 15 minutes.

Through economic incentives, we can create "soft finality," where the economic value of a transaction is higher than its actual value. This can be achieved by nodes staking on services like Eigenlayer, where their stake can be slashed and prove that the transaction has been completed. If the transaction is somehow reverted, the nodes will be slashed, and the slash may be used to fill the gaps caused by the rollback.

The benefit of this is that transactions can be soft confirmed within seconds, greatly speeding up the transfer of all cross-chain tokens.

This is something Near is researching. Proofs of sending/burning do not need to be written to Ethereum L1 and finalized, but instead the proof is written to a fast finality chain, where finality is guaranteed by Eigenlayer stakers, and if there is a rollback or recovery, they will be slashed. This tweet further details how it works.

Let's see how this fast finality layer improves all 3 token transfer methods:

  • The interoperability layer is already a fast finality layer managed by ecosystem teams (Polygon, zkSync, etc.). It allows transfers within the ecosystem to be completed in just a few seconds.

  • When tokens are cross-chain minted/burned, the fast finality layer can prove that the transaction has been completed and will not be reverted, instead of waiting for the transaction to complete on Ethereum (which could take up to 20 minutes). Then, the target chain can trust this layer and mint immediately after verifying the transaction.

  • Similarly, when L2s trust each other's cross-chain bridges, they can settle token transfers through this fast finality layer instead of waiting for Ethereum.

Advantages

  • Token transfers can be completed in seconds.

Disadvantages

  • It is not yet clear how a slashing mechanism can be used to fix potential double spending vulnerabilities.

  • Reliance on non-Ethereum chains to ensure security.

Future Wallet Experience

After implementing these new unified liquidity improvements, what steps are needed to make cross-L2 wallets feel like using a single chain? The remaining two biggest issues are cross-chain gas and integrating applications with the system.

Cross-Chain Gas Sharing

If a user is constantly crossing multiple chains, how do they obtain gas on all these chains to pay for transaction fees?

This issue is being addressed through account abstraction AKA EIP-4337 and paymasters. Paymasters are addresses you can request to pay your transaction fees. Some wallets (such as Avocado and Ambire) allow you to preload a gas balance and then use that gas on any chain, similar to a prepaid debit card.

Another simple solution is Bungee Exchange Refuel, which gets gas on one chain and provides a little gas for you on another chain. This is a worse user experience than paymasters and leaves a little gas on many chains for the user, but it works for EOA accounts (standard non-smart contract accounts).

Gas-Free Applications

Paymasters also unlock the ability for the application itself to run a paymaster and pay all user transaction fees. This will allow anyone to use the application on their own chain without the need for cross-bridges. The application can monetize in other ways, such as selling goods, or providing a free demo mode, but you have to pay for the full experience.

Enabling Applications to Easily Utilize Unified Liquidity

Many applications load user token balances by calling balanceOf, which is a slow process and does not work cross-chain. They are usually unaware of tokens that may have crossed from other networks.

This issue should be addressed at the wallet level so that each application does not have to reinvent the wheel to support a multi-chain future. EIP-2256 introduces standard functionality that wallets can implement, allowing all token balances to be loaded at once, although currently this is only single-chain.

If the wallet is multi-chain aware and knows how to move tokens from one chain to another, it can inform the application that the user can immediately use these cross-chain tokens, and the wallet will cross-chain them before executing the operation when the user interacts with the application.

Conclusion

Hopefully, you now have a better understanding of how liquidity between L2s in the future will flow more seamlessly, and how wallets will use these new technologies to fully abstract the blockchain, making using Ethereum as simple as it was in 2020, without the need for high fees.

Thanks to Chad Fowler, Alejo Salles, Mike B, Montana Wong, and Centauri.eth for their feedback on this article.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

中奖率100%,每日可抽iPhone 17
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink