In the Layer 2 era, how to save the broken liquidity?

BeginnerJan 07, 2024
This article analyzes the liquidity dispersion problem in the Layer 2 era, lists various industry solutions, and analyzes each other’s advantages, disadvantages, and development trends.
In the Layer 2 era, how to save the broken liquidity?

Introduction: The coexistence of multiple chains and the vigorous development of Layer 2 have brought more choices to users and developers, but it has also caused a serious fragmentation of liquidity.How can users make full use of global liquidity to optimize the trading experience? How can developers of multi-chain applications deploy and guide liquidity to maximize utility?This article will list a variety of industry solutions and analyze their pros and cons and development trends.

Text: Today’s Crypto is a chaotic world composed of multiple chains. In the past, Ethereum gathered most of the liquidity and DeFi applications in the crypto world, but now its TVL ratio has dropped to less than 60% and is still declining.

Some EVM compatible chains and new public chains continue to encroach on market share. Faced with this situation, Ethereum is also revolutionizing itself to improve performance and ecological capacity. Various Layer 2 have become the biggest competitors of new public chains. Once again Stealing assets and users from Alt chain.


Image Source:defillama.com/chains, the blue part is the Ethereum TVL market share

This world where multi-chains and L2 coexist provides more possibilities for dApps and DeFi financial innovation. dApps do not have to be built on the expensive and congested Ethereum main network to avoid limiting their own adoption rate due to gas fees. While Layer 2 brings high performance, it can still interact with assets in Layer 1 and even the entire EVM ecosystem. dApps can even choose to independently build their own dedicated L2 application chain.

Predictably,The decentralization of applications and liquidity will intensify in the future, and this decentralization brings new challenges to both developers and users.

For users, no matter which chain they trade on, it is almost impossible to mobilize global liquidity, which will bring higher price impact and make large transactions easily affected by insufficient liquidity. Some assets don’t even have liquidity on some chains, and users have to cross to other chains to trade.

From a developer’s perspective, in order to satisfy users on different chains, liquidity needs to be guided on different chains, which brings additional costs. If limited liquidity is directed to different chains, the liquidity of all chains will be very thin and the transaction experience will be worse. However, if some chains are abandoned, some users and business income will be given up.

Faced with the dilemma of liquidity fragmentation,Some solutions try to start from the user’s perspective, allowing users to utilize the liquidity on different chains as efficiently as possible when trading and reduce transaction losses.Generally speaking, there are two ways - Liquidity Router and Trading Agency

liquidity routing

Liquidity routing manifests itself as a transaction aggregator-like application.When users conduct transactions in it, the system does not just use local liquidity to complete transactions for users, but looks for optimal transaction paths from different chains.Liquidity routing can serve local transactions and cross-chain transactions.

We use Chainhop and Chainge Finance as examples to illustrate how Liquidity Router works. Both are cross-chain exchange aggregators.

On ChainHop, if a user wants to exchange asset A on the X chain for asset B on the Y chain, but the main liquidity of A/B is on the Z chain, then ChainHop will execute a multi-hop transaction to help the user send asset A. Go to Z chain, replace it with asset B, and then send it to Y chain.Through this “multi-hop” method, despite the increased gas expenditure, comprehensive calculation can still provide users with better transaction results.

For example, when a user requests to exchange a large amount of ETH on Fantom for USDC on Optimism. Chainhop will first bridge ETH to Ethereum, then complete the ETH-USDC swap on Ethereum (usually with a much smaller price impact), and finally bridge USDC to Optimism.


Chainge Finance goes one step further. On the basis of multi-hop,Support splitting orders to liquidity pools on multiple chains to complete transactions together.For example, if a user needs to exchange a large amount of ETH on the Fusion chain for USDT on the Tron chain, the system may be split into Ethereum and Polygon. After completing the exchanges respectively, the USDT will be transferred to the Tron chain for the user.


Through the “multi-hop” and “split order” mechanisms, the “liquidity routing” method can make full use of dispersed liquidity on multiple chains more intelligently, complete transactions for users, and effectively reduce the overall price impact.

trading agent

A transaction agent refers to a transaction agent that helps the user complete the transaction after the user issues a transaction request.Trading agents will form a bidding market, and users can choose the agent that can provide the best price to complete the transaction.This method is a bit like an order book, but the difference is that these trading agents do not necessarily reserve their own liquidity in advance, but can help users find the best trading path and complete the transaction after receiving the order, earning commissions from it. . In the process, trading agents can even take full advantage of the liquidity in CEX and use available liquidity anywhere as long as it can provide users with better prices.

Like the liquidity routing solution, the trading agent solution can also provide users with local trading services and cross-chain trading services at the same time.A typical case that adopts this solution is Uniswap X.Uniswap X is a new product released by Uniswap Labs in July 2023. In the official description, Uniswap X is a new type of permissionless, open source, based onDutchbeat’s aggregation trading protocol is used to provide services to users across AMMs and other liquidity sources. It has the advantages of no gas, no slippage, and resistance to MEV.

The trading agent in Uniswap X is called “Filler”. After the user initiates a transaction request through Uniswap X, Filler will respond. There is a competitive relationship between Fillers. The system determines who will take the order through Dutch bidding. The Filler who finally gets the order will help the user complete the redemption. In a nutshell, Uniswap X allows many Fillers to provide users with the best transaction prices through bidding, and Fillers gain competitive advantages by discovering better transaction paths.


Image source: Uniswap X official introduction

During the entire process, Gas is paid by Filler, so users experience a Gas-free experience. As for the risks of MEV attacks and slippage, they are actually passed on to Filler, and users can get a “what you see is what you get” transaction experience.

The Uniswap official website interface already has a button to open Uniswap X. Users can click the small gear in the upper right corner to manually open it. Currently, it only supports the Ethereum network.


Now,Whether it is the “liquidity routing” or “trading agent” model, the core is to focus on outputting results to users - the optimal transaction price, hiding the complex process,Whether it is an intelligent algorithm or a bidding market, it is completed on behalf of the user. In this way, there is actually a more fashionable and more appropriate concept to describe it, that is, the “intent layer”. Whether it is liquidity routing or trading agents, they can be considered as different forms of Intent Solver. Of course, Intent-Centric’s narrative is grand and includes many other aspects.

How to better deploy liquidity?

What we discussed above is how to help users better utilize the liquidity of multi-chains.So from the perspective of the deployment and guide of liquidity, that is, the DeFi project side, how to improve the efficiency of liquidity utilization?

For DeFi projects, liquidity is its core, and even liquidity is the service itself provided by DeFi projects. Dispersed and fragmented liquidity will prevent the liquidity of each part from exerting its maximum effectiveness, and the overall liquidity efficiency will be at a low level, hindering the establishment of its competitive advantage. If liquidity is concentrated on one chain, users and opportunities on other chains will be lost. There are two feasible ideas to improve this problem.

The first way of thinking isSLAMM (Shared Liquidity AMM), its basic idea is to set up a role called “forecaster”.They are responsible for predicting the distribution of trading volume in the future and based on this, scheduling liquidity in advance. The closer the forecast is to the real situation, the more rewards the forecaster will receive.

Ideally, the forecaster can transfer the liquidity of other chains to that chain in advance before the transaction volume of a certain chain explodes to prevent transaction failures caused by insufficient liquidity, and can also prevent the transaction volume of a certain chain from shrinking. Beforehand, transfer excess liquidity to places where it is more needed in advance to avoid wastage of liquidity.

However, the shortcomings of this method are also significant. First, even if the scheduling is reasonable, each chain still cannot use global liquidity. Second, changes in transaction volume are often traceless, and forecasters lack the basis to make reasonable predictions. Forecasting and scheduling, third, users must pay for the forecaster.

Although SLAMM has been proposed for more than a year,But so far, the author has not seen any practical cases of SLAMM, which shows that developers are not optimistic about this method.

Remote call liquidity

This is a simpler way.DeFi project parties deploy and guide all liquidity on one chain and provide remote access modules on other chains. When users initiate transaction requests on other chains, the liquidity will actually be used remotely through cross-chain methods.

This approach has many advantages, including

  • On any chain, users access global liquidity
  • The guidance and deployment of liquidity have become very simple, and there are no problems of allocation and scheduling.
  • Better cross-chain integration, applications on other chains can also use the global liquidity of the project through remote calls. For example, loan projects can be liquidated remotely using global liquidity to reduce losses during liquidation.

    The full-chain LSD project Bifrost is practicing this approach, and the author 0xmiddle has previously worked on it.“The future of cross-chain bridges: full-chain interoperability is inevitable, and liquidity bridges will decline”has been explained in . In fact, this is not only a fluid deployment method, but also a brand-new application architecture. We can describe it as a “head office + branch” structure.

Under this structure, the application does not need to repeatedly deploy instances on all chains. Instead, it only deploys the core module (head store) on one chain and deploys a lightweight remote module (branch store) on other chains. . Users of any other chain can remotely access applications and obtain services through cross-chain methods.


In other words, what is unified on one chain is not only liquidity, but also the main part of the application.

Of course, this model also has challenges. During the remote call process, a cross-chain bridge needs to be used. Performing one and two cross-chain transmissions will incur additional costs. If the cross-chain bridge infrastructure is not secure enough, there will also be Making such an operation carry additional risks.

But what the author sees is that the cross-chain bridge infrastructure is constantly developing and improving, a new generation of safer cross-chain bridges is growing, and the unsafe impression caused by cross-chain bridges will be eliminated. You can refer to the author’s articles”The fall of Multichain may become an opportunity for the transformation of cross-chain bridges”。

Let’s analyze the cost of cross-chain asset transmission.This cost is divided into two parts: first, the Protocol Fee charged by the cross-chain bridge for users to maintain the operation of Bridge Nodes and Relayers, which is generally very small and almost negligible. Some cross-chain bridges even fully subsidize this, such as Wormhole and Zetachain; second, It is the Gas fee generated by the cross-chain process, which is the main part.

Compared with local exchange, remote exchange will cost an additional 282,000 Gas (taking EVM as an example). The cost of this Gas is roughly between 0.005 and 0.2 US dollars on Arbitrum, Polygon, BSC, and Optimism, although this price will vary with the price. Network congestion and token prices fluctuate, but they are all within an acceptable range. Ethereum L1 is more expensive and exceptions can be made.


Notes on the table: Data interception time: November 30, 2023;

Price data source:coincarp.com;

gas price data source:gasnow.io,bscscan.com/gastracker

About the calculation of gas fees:

A cross-chain Token transfer includes one on the source chain and one on the target chain, a total of 2 Token Transers (may be lock-mint, burn-unlock, or burn-mint), and one Gas fee for ERC20 Token transfer Generally, it is 60,000 Gas, and for two transactions, it is 120,000 Gas.

In addition, there is a signature verification cost for cross-chain transmission. The purpose of signature verification is to confirm that cross-chain messages are confirmed by Bridge Nodes. BridgesNodes can jointly sign through MPC technology. The resulting signature is a single signature, which is different from the signature of a normal address. However, the Gas required to verify the signature is the same as verifying the signature of a normal address, which is about 21,000 Gas (for the application of MPC technology in cross-chain bridges, please refer toThis articlelearn more).

Therefore, the Gas fee for a cross-chain transmission can be considered as:

120000+21000Gas=141000Gas,The gas fee for two cross-chain transfers is 282,000 gas.。

Picture notes: The picture uses lock-mint as an example. In fact, there are two situations of asset transfer: burn-unlock and burn-mint.

Therefore, we weigh the pros and cons from a cost perspective and can also draw the conclusion:Compared with the troubles caused by liquidity fragmentation, the cost of cross-chain interoperability is not high. The liquid remote calling model is more feasible than the dynamic scheduling model.

Viewpoints and Summary

Above, we elaborated on the reasons for the emergence of the multi-chain structure and its inevitability, and by examining the existing explorations in the industry, we provided a solution to the problem of liquidity dispersion.

Generally speaking, there are two points. First, new intent-centered trading methods including liquidity routing, trading agents, etc. are helping users make full use of the liquidity on each chain and reduce transaction losses;

Second, DeFi applications are also pursuing higher efficiency through better deployment of liquidity. Dynamic liquidity solutions are better than static ones, but with the maturity of cross-chain infrastructure, “single-chain deployment of liquidity + remote call “On the contrary, it is a more promising plan.

In the future multi-chain liquidity landscape, the main liquidity of most assets will be concentrated on one chain, and remote exchange will become the norm.The exception is stablecoins (USDT, USDC, and even ETH to a certain extent). They will be distributed on various chains and assume the media function of cross-chain asset exchange.

Disclaimer:

  1. This article is reprinted from [Geek Web3 ]. All copyrights belong to the original author [0xmiddle]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
Start Now
Sign up and get a
$100
Voucher!
Create Account