The fragmentation of DeFi composability will be inevitable.
For DeFi farmers on Ethereum, farming should not only pay attention to the yield (yield), but also the gas fee. However, as long as huge economic value can be obtained in Ethereum transactions, the gas price will remain high.
For the team dedicated to providing expansion solutions for Ethereum, the high transaction fees caused users’ troubles, which is good news. Ethereum 2.0 is late to come and is half-hidden, while the Layer 2 solution is in full swing and progress is good.
In “DeFi+Layer2 has become a trend, who is more popular with Layer2? What are the opportunities? In “, we compared a number of Layer 2 solutions, and each group of solutions has strengths and weaknesses in many aspects such as security, versatility, and performance. In this article, we focus on the other side of the Layer 2 solution: its impact on DeFi composability.
DeFi is called financial Lego, and composability is the most basic feature of DeFi. On the Ethereum network, the aggregation and interaction of different DeFi applications is very common. Aggregated transactions, lightning loans, liquidity mining, LPtoken (liquidity certificate) mining, and even NFT combined with DeFi platform gameplay are gradually appearing . This is because everyone is based on the bottom layer of Ethereum, and multiple smart contracts can be called at the same time in a single transaction.
However, when we turn our attention to Layer 2, the problem will be much more complicated. In the future, as more and more DeFi adopt the Layer 2 solution, can the composability of DeFi still exist?
DeFi+Layer2 three scenarios
Suppose there are two DeFi applications: A and B. When the Layer 2 solution comes on stage, we will encounter these scenarios:
Scenario 1: Application A and Application B both adopt the same Layer 2 solution;
Scenario 2: Application A adopts a Layer 2 solution, while Application B adopts another solution;
Scenario 3: Application A adopts the Layer 2 solution, while Application B is still a native Ethereum application.
In the three scenarios, what is the composability between application A and application B?
Scene 1: Brothers are in the same frame, everything is easy to discuss
If different DeFi applications use the same Layer 2 solution, the problem is relatively easy. However, the premise is that the adopted Layer 2 technology supports interoperability between different DeFi, and the Layer 2 solution must support smart contracts. The compatibility of EVM must be strong enough to support the implementation of DeFi applications. Combinatorial.
If these standards are listed, many Layer 2 solutions are excluded. This is also the focus of this article: How to achieve composability for DeFi applications that use the same Layer 2 solution? Below we will focus on understanding the impact of the OR (Optimistic Rollup) solution on DeFi composability, which may also be the most likely solution to achieve two-layer composability.
Scene 2: Reliable translation is very important
Due to the limitation of the author’s field of vision, I have not noticed a better solution for the time being, which can solve the problem of Scenario 2 and enable DeFi applications that use different Layer 2 solutions to be combined with each other in an elegant and credible way and interoperable. Readers are also welcome to advise.
The difficulty mentioned in Scenario 2 is that because different Layer 2 solutions have different implementation mechanisms, the difference between DeFi applications and other applications is that they are asset-heavy and have more stringent requirements for fund security. If the incompatibility of the Layer 2 solutions causes financial security problems, the meaning of the Layer 2 solution will be lost.
However, it is not entirely impossible. After all, even if the Layer 2 solution is different, the bottom layer is based on the bottom layer of Ethereum. How to build a mutually compatible underlying component to make the interoperability between Layer 2 solutions more common, and to facilitate the compatibility of DeFi under different Layer 2 ecosystems in a protocol-based way is also a direction that requires continuous efforts.
Scenario 3: It may be solved by a one-way channel
In this scenario, application A adopts the Layer 2 solution, while application B is still a native Ethereum application. Then the flexibility of the Layer 2 solution to support complex operations becomes very important. It is relatively easy to support simple transfer operations, and to interact with the native underlying Ethereum network, it is necessary to test the design of Layer 2 in terms of smart contract support and transfer completion confirmation efficiency.
It is worth reminding that there are not too many actual discussions, documents, and practical cases on how the Layer 2 solution affects the composability of DeFi applications. Therefore, this article is more of a stimulus, and it is inevitable that the author himself Readers are also invited to criticize and correct the limitations of cognitive limitations.
The above is a brief introduction to the three scenarios. Below we focus on the situation of scenario 1, that is, if different DeFi applications adopt the same Layer 2 solution, what will be the impact on composability. Before that, we must first understand the realization principle of Optimistic Rollup.
Optimistic Rollup
Realization principle
Optimism released the testnet, which was the big news in the Layer 2 field last week.
The Chinese name of Layer2 is the second-layer expansion solution. In view of the limited processing capacity of Ethereum and the high gas cost, the project of Layer2 has recently risen in popularity. Among many solutions, the Optimistic Rollup developed by Optimism has been included. Compliments or cooperation from Vitalik, Uniswap, Synthetix and other parties.
On the same day that the Optimism testnet was released, the well-known synthetic asset platform Synthetix also announced the Layer 2 version of the demo, using Optimism’s Layer 2 solution for SNX casting management.
In the eyes of many people, OR’s solution is excellent and reliable. It not only has the security features of Ethereum, but also does not require issuing coins. OVM (Universal Virtual Machine created by Optimism) is also perfectly compatible with EVM (Ethereum Virtual Machine). In this way, a universal solution is provided, allowing many Ethereum applications to be easily migrated and upgraded, and Layer 2 is used to increase application scalability. In the previous article, we also gave a more detailed introduction to this.
Here is an explanation of what is Rollup? To put it simply, multiple transactions are aggregated and then compressed into one transaction and sent to Ethereum. In this way, the second layer network is used to share the transaction pressure of Ethereum, thereby saving transaction costs.
In order to ensure that the transaction is effective, so that the transaction on Layer 2 has the same security as the transaction on Ethereum, different teams have also proposed different solutions, the common ones are ZK Rollup and Optimistic Rollup. The former uses zero-knowledge proof to ensure security, while the latter refers to Plasma’s penalty mechanism.
OR: Share the load of Ethereum
In an article published in banless in April 2020, Daniel Goldman discussed multiple aspects of OR and DeFi applications. This article discusses the issue of composability, and most of the thinking comes from this article.
In Rollup’s solution, the side chain shares the transaction pressure of the Ethereum network. From the user’s point of view, it can be divided into two parts.
First, the user deposits funds into the smart contract on Ethereum, and the funds are transferred to the rollup chain on the second layer. How to ensure that funds will not be misappropriated by rollup operators or users? How to ensure that users do not need additional trust in transactions? This will test the design of the rollup chain.
Secondly, if users want to return their assets to Layer1’s Ethereum, they need to initiate a special withdrawal operation. Under OR’s security model, a grace period will be designed to prevent fraud. To put it simply, users need to wait for a certain amount of time to retrieve assets to Layer 1. Some researchers think that about 3 hours is enough. Through the existence of liquidity providers, waiting time can be reduced.
However, there are also different opinions.
Matter Labs CEO Alex Gluchowski believes that OR is not the best DeFi expansion solution. He prefers ZK Rollup. “How will Optimistic Rollups succeed in fulfilling its promise of 100% composability? We don’t know yet. So far, we have not discovered the hidden traps. This technology is not as simple as it seems.”
In addition, Alex is also worried about the long waiting period for users in the OR scheme. Although it can be alleviated by introducing liquidity providers, it needs to be matched separately in a manner similar to the decentralized transaction using the order book. Quick divestment may become a problem.
The challenge of composability
The Layer 2 solution implemented by Rollup technology is equivalent to creating one or more side chains, and technical means are used to ensure that transactions on the side chains are equally effective.
There are multiple DeFi scenarios on the same rollup chain
This is the simplest case in Layer 2: Different transactions exist on the same rollup chain, and the processed results will be sent to the underlying Ethereum network. In this way, the complexity of cross-chain operation communication disappears, and the use of different DeFi for assembly and assembly is almost the same as on Layer 1. The only difference is that when assets need to be converted to native accounts, users need to spend time waiting. This is a situation that all Layer 2 solutions will encounter.
Although the composability between DeFi will not be affected too much, there are also problems: if a large number of DeFi applications and transactions are concentrated on the same rollup chain, then the advantages of Layer 2 will be discounted. Although the Layer 2 solution can improve performance, as a large number of users enter the same Layer 2 chain, no matter which solution is adopted, they will also face this problem.
However, this is actually nothing to worry about. Because in the future, the same situation will occur after Ethereum 2.0 goes online. Although different shards are used, in different shards, just like the scattered spaces in the city, there will also be financial districts, and DeFi will be clustered. In the financial district/financial shards, compared to other shards, the transaction volume is more concentrated and the fees are higher. This is consistent with what we will see in the future in the Layer 2 field.
Due to the DeFi head effect of Ethereum, it is not surprising that the future DeFi applications will be concentrated on a certain Layer 2 ecology or even a certain special chain. At present, Optimism is creating a universal OVM, and is also promoting cooperation with the head Uniswap and Synthetix, which is the embodiment of this kind of effect.
Between different rollup chains or different Layer schemes
DeFi is on the Ethereum of Layer 1, just like a roommate in the same room, eating, drinking, playing and making trouble, and it’s intimate. And if a different Layer 2 scheme is adopted, or the same scheme is adopted but on different rollup chains, then they are like neighbors living on the same street and in different houses, and have more space for activities, but they communicate with each other. Compared with collaboration, there are more barriers than before.
Different operations have different complexity. Since it is difficult to say whether DeFi with different Layer 2 schemes can operate with each other, we will mainly look at examples of schemes such as OR.
If it is just a simple transfer of assets, such as transferring DAI from one DeFi application to DeFi located on another rollup chain, there is nothing too difficult. But if it involves complex operations, it’s hard to say.
In Daniel Goldman’s article, he cited the example of PoolTogether’s lossless lottery.
Users deposit funds to PoolTegether, and users deposit funds PoolTogether will be deposited in DeFi platforms such as Compound to earn interest. Once the platform draws a prize every other time, the winners can get the income of the platform during this period of financial management, and those who do not win can also get back the principal. During the whole process, the platform does not draw commissions, and users only need to pay the handling fee when initiating a transaction.
Assuming that PoolTogether, Compound, and Dai are on three different rollup chains, and PoolTogether wants to deposit Dai assets on Compound, this transaction is not that simple.
There is one-way monitoring: the rollup chain where PoolTogether is located (a chain of Layer 2) needs to have the ability to access and “listen” to the update information of the rollup chain where Compound is located. There is a more complicated situation: two-way dialogue. In some cases, both parties need to know the status of each other’s Layer 2 chain.
How to achieve cross-rollup chain communication, similar to the cross-region communication of sharding in Ethereum 2.0, requires the help of a set of system architecture protocols, and whether the Layer 2 solution provides such support, it is impossible to generalize.
In short, when there is one more chain or multiple solutions, the complexity increases rapidly, and the areas where the complexity increases are often easier to hide errors, which need to be treated with caution.
Combining DeFi applications across Layer 2 solutions can be a tricky problem. Even in the same Layer 2 solution, if different side chains are involved, it also depends on the underlying support provided by the Layer 2 solution such as OR.
Layer2: a long spectrum
After the above discussion, we may be able to get some enlightenment: Since the method of concentrating all on one Layer 2 chain will bring congestion, and communication based on Ethereum, different Layer 2 schemes, or different rollup chains is also troublesome, can we change Combine the two?
this is possible. Going back to the previous example, financial districts, entertainment districts, and shopping districts are inevitable in cities. In the Layer 2 field, as time goes by, there will also be Layer 2 chains focusing on DeFi and Layer 2 chains focusing on games. However, it can be connected to residential areas via subway and CBD, just as different Layer 2 solutions can communicate with each other by means of communication protocols.
Considering the particularity of DeFi, the author believes that it is not surprising that the head DeFi is concentrated in a certain Layer 2 ecology. And don’t forget, the same DeFi can still set up “divisions” on different layer2s to form synergy. Focusing and decentralization, using the communication protocol or the underlying Ethereum to achieve intercommunication or one-way monitoring, will be a phenomenon that simultaneously exists in the Layer 2 ecosystem.
summary
Ethereum is blocked and blocked, and Layer 2 hopes that the winding path will be quiet, and it will find another way. Layer2 promises a better future. Applications and users can get better services and experience as needed, with smoother networks and lower costs.
As far as the current Layer 2 solution is concerned, although some evaluations believe that the current test network performance is not as good as expected, OR (Optimistic Rollup) provides a set of promising solutions, which is also the focus of this article.
With the progress of the second-layer network (Layer2) related projects, we should have more options to choose from; and as the head application gradually favors the combination of DeFi+Layer2, how to achieve interoperability between DeFi, we Will see more interesting ideas.
The author believes that observing the development of Layer 2 is to a certain extent prying into the future of Ethereum 2.0. As far as Layer 2 is concerned, does DeFi converge and live together? In what way will the gathering and dispersion appear in different Layer 2 solutions, and what effort will be spent to improve the user’s experience of using DeFi. These are all left for time to give us the answer.
But one possible result is that with the gradual development of Layer 2, the composability of DeFi may become fragmented in a short period of time.