How do leading DeFi players such as Uniswap, Aave, and Synthetix choose the Layer 2 solution?
Original title: “DeFi+Layer 2 has become a trend, who is more popular with Layer 2? What are the opportunities? 》
Author: Jing Kai
The DeFi battle is in full swing, and the leader opens up another battlefield. The leading DeFi players such as Uniswap, Aave, Synthetix, etc., unanimously began to explore the feasibility of Layer 2 + DeFi. The reason is obvious: Ethereum’s high gas fee is so high that it can block the network without paying attention. More importantly, Ethereum 2.0 is officially launched and available, and it will not be unavailable in two or three years.
For DeFi applications, there are not many options: either choose other public chain multi-line operations, or use Layer 2 on the existing basis. For the new DeFi team, the former may be worth considering, but old DeFi players naturally prefer the Layer 2 solution: it is still a familiar operation, the performance is improved several times, and users hardly need to learn anything.
So what is the Layer 2 second layer solution? What are the Layer 2 plans to choose from? Let’s take a look at which Layer 2 solutions the top DeFi projects have chosen.
Layer 2 expansion plan: the main road is congested and the winding path is quiet
Source: Block123
The transaction processing power of Ethereum is like the typewriters of the last century. If you are not careful, you will get stuck. In order to ensure the priority processing of high-value transactions on Ethereum, the transaction processing method is the same as that of Bitcoin: the higher the price, the historical time of the transaction is taken into account.
Ethereum adopts the gas mechanism. If the transaction volume is higher, the gas fee will soar, and small transactions are no longer expected to be completed: often the fee for an ordinary transaction exceeds the transaction volume itself. This is especially true for transactions in DeFi. After all, an operation in Uniswap or AAVE involves higher complexity and higher handling fees.
Ethereum creator Vitalik once stated on Twitter: “Project parties and users should migrate to a Rollup-type two-layer network as soon as possible, and this may be a trend in DeFi in the second half of the year.” Vitalik also commented on other solutions, if only Token transfer transactions, Loopring, OMG can also be used.
The problems exist objectively, but the solutions are different.
Ethereum 2.0 uses the PoW mechanism to migrate to the PoS mechanism to increase transaction throughput. Coupled with the fragmented transaction processing mechanism, it is expected that the status quo can be greatly improved. But the near thirst cannot be quenched by the far. Ethereum 2.0 is upgraded, step by step, and now it is not halfway there. When Ethereum 2.0 fully supports complex applications such as DeFi, your new cutie may be able to make soy sauce.
On the other hand, Layer 2, building a second layer on the existing Ethereum network as an extension solution, has become a more practical and accessible choice. Especially for DeFi, which is popular and eager to get more users, the reality lies ahead: For the giant whale, the transaction fee is just an extra luxurious lunch; but for retail investors, the high fee is like a high wall. , It is prohibitive. This is also one of the reasons why DeFi, which is on the rise on Ethereum, is gradually overflowing to other public chains.
Layer 2 is expected to add fire to DeFi with a smoother transaction experience and lower transaction fees. Of course, the Layer 2 solution is not unified, and each solution has its own advantages and disadvantages, depending on the choice of the project party. Knowing the use of the Layer 2 extension plan, you might as well imagine yourself as the project party: the banquet opens, what can I order on the Layer 2 menu? I have to read how each family feels.
Layer 2 players, are you ready?
Since you want to use Layer 2 in hand, there must always be a distinction between which is better. This article starts with the requirements of DeFi applications for Layer 2 and sees what Layer 2 solutions are currently available. However, limited to the author’s knowledge and vision, it is inevitable that there are too many subjective factors, and readers are also invited to give their criticisms and corrections.
We start with a table.
Matter Labs integrated information from various sources and compiled a document that evaluated 6 mainstream solutions from four perspectives and 19 detailed rules. As shown below.
Source: MatterLabs, Chinese translation: Jingkai
According to the above menu, assuming you are the creator of DeFi, what type of Layer 2 might be considered?
First of all, DeFi applications need to support smart contracts, and preferably smart contracts with strong flexibility.
According to this, the two schemes of State Channel and Plasma, if not necessary, will not be the first choice. Because they have limited support for smart contracts.
Secondly, the security of funds is considered.
DeFi is an asset-heavy application, which means that if the Layer 2 solution is to be competent, it must have better certainty and fewer risk factors. The creators of DeFi also have spare capacity to continue to improve the security of funds in other areas. Layer 2 often needs to rely on verifiers to act as an intermediary role, which brings the risk of an intermediary. Does the verifier have the authority to freeze the funds or even divide the user’s funds to make money and run away? This is particularly important for DeFi.
According to the evaluation of MatterLabs, the two types of solutions such as SideChain and Validum are more dependent on intermediate validators. DeFi needs to be carefully considered when choosing the Layer 2 solution. According to the evaluation criteria listed by MatterLabs in the above figure, the potential risks of side chain solutions are higher in terms of the risk of hot wallet leak attacks and the risk of attacks on the token design mechanism.
Some evaluators believe that SideChain’s side chain method cannot be considered as Layer 2 strictly speaking. Although the side chain solution has such possible problems, SideChain is more flexible and wider in scope, so the specific security and practicality depend on the specific implementation.
What needs to be reminded is that although MatterLabs lists several mainstream solutions, the specific implementation is not one or the other. For example, MaticNetwork is a Layer-2 expansion solution that combines Plasma and sidechain solutions.
According to CoinDesk’s report on August 3, MaticNetwork has created a $5 million DeFi incubation fund to attract DeFi projects to create solutions on maticNetwork. It has also attracted a number of DeFi projects. WazirX, the largest exchange in India, created the AMM Swap DeFi project on Matic; based on Matic Network’s Layer 2 DeFi lending agreement, there is also an example of EasyFi.
Third, the Layer 2 solution will involve the efficiency of asset processing after all.
This is classified as usability. The withdrawal time and whether the transaction can be confirmed instantly are two aspects worthy of attention. For Plasma and Optimistic rollups, as seen from the table, the withdrawal time is expected to be longer. However, if a liquidity provider is introduced, the corresponding withdrawal time will be greatly reduced, and DeFi solutions currently usually have LP designs, so the one-week withdrawal time shown in the figure may seem strangely long, but it is only a theoretical prediction. It is estimated that the actual time to achieve will be much less than this value.
Finally, we look at the performance aspects.
The reason why I put it at the end is not because performance is not important, but because this is a problem that the Layer 2 solution must solve, so the difference between each company is not big. Whether based on ETH or ETH2.0, several Layer 2 solutions can be significantly improved. The indicators in this area do not have much reference in excluding the Layer 2 plan. Of course, the evaluation angle here is different, and Layer 2 is only viewed from the perspective of implementation.
To summarize briefly, with the help of the list summarized by MatterLabs, we have initially evaluated different Layer 2 solutions from the perspective of the DeFi project. On the whole, the solutions of zkRollup and Optimistic Rollup are relatively more advantageous, while the two solutions of State Channel and Plasma, due to the limited support for smart contracts, will not become the first choice of DeFi.
Two solutions, zkRollup and Optimistic Rollup, are mentioned here, and a brief introduction. Later, we will see several DeFi projects that use the rollup scheme.
You can think of Rollup as a side chain because it generates blocks and periodically sends snapshots to the Ethereum main chain.
The reason why Rollup is favored by many project parties is inseparable from its efforts in de-trusting: Rollup’s plan assumes that operators are untrustworthy, they will cheat, they will be lazy to disconnect, or share For malicious behaviors such as forks, the Rollup solution prevents them from affecting the operation of the protocol. In addition, the important point is that as long as they can cooperate, nodes or validators on Rollup can exit instantly.
Due to space limitations, we won’t do in-depth exploration of these two rollup solutions (zkrollup and Optimistic Rollup), but let’s take a look at how Vitalik thinks.
Vitalik’s view on Rollup as a Layer 2 solution
On September 2, Vitalik discussed the transaction supply and demand mechanism of Ethereum and some solutions to improve performance on Twitter. In Vitalik’s view, transaction fees are high and can only be solved by expansion. There are two types of solutions to improve performance:
- rollup scheme
- Fragmentation mechanism
Tether, Gitcoin and other applications have chosen zkrollup to improve performance. The new Optimistic Rollup solution, which will be launched soon, provides a more general solution because it provides comprehensive support for EVM contracts.
Optimistic and zero-knowledge proofs that zkrollup can increase the performance by about 20 times by processing most transactions in Layer 2, from 15 tps to about 3000 tps. In this way, the gas fee on the chain will not be reduced, but because most transactions are in rollup, the actual fee paid by the user has been reduced by hundreds of times. In the long run, there is also the sharding mechanism of Ethereum 2.0 that can improve performance and increase scalability.
Rollup: the preferred choice for DeFi projects
Above, we compared multiple Layer 2 solutions, and focused on the analysis of Rollup (zkrollup, Optimistic rollup). In theory, rollup wins out of a variety of options, and from Vitalik’s point of view, he himself is optimistic about Rollup’s solution as a realistic choice for Ethereum expansion.
Next, let’s take a look at the current hot DeFi projects, such as Uniswap, AAVE, Synthetix, etc., how to plan to apply the Layer 2 solution to improve performance.
Synthetix’s Layer 2 solution: Using Optimistic Rollup, the test network enters the first phase
Synthetix is the first synthetic asset management and trading platform on Ethereum. Recently Synthetix has cooperated with the Optimism team to promote the application of Optimistic Rollup on the Synthetix platform, creating a Layer 2 solution to bring a better user experience. Specifically, the bottom layer relies on the OVM (Optimistic Virtual Machine) created by Optimism as a virtual machine that supports all Layer 2 protocols.
On September 25, Synthetix launched the Optimistic testnet for the second-tier expansion plan of Ethereum, where users can conduct fast transactions on the second-tier network. Stakeholders with 1 to 2500 SNX can be eligible to participate in the test and receive rewards. SynthetixDAO will provide 50,000 SNX every week as a mortgage reward for participating in the testnet, and the reward will last for a total of 4 weeks.
According to Synthetix’s blog, the use of SNX on OE (Optimistic Etherum, that is, the side chain that adopts the Optimistic Rollup solution) is a key step for the fast-growing DeFi ecosystem to achieve full scalability, allowing anyone anywhere in the world to access Use DeFi without high gas cost.
In short, Synthetix uses Optimistic Rollup to achieve Layer 2 expansion, and it is making good progress. The current stage is called Fomalhaut. At this stage, the aim is to test and reduce the cost of receiving rewards for SNX small mortgagers. The second upgrade called Deneb is expected on September 29 to reduce gas costs.
Unipig: When Uniswap meets Layer 2 expansion plan
Uniswap is developing its V3 version. Uniswap founder Hayden Adams stated on Twitter that V3 will “solve all problems.” Some commentators believe that Uniswap V3 will implement the Layer 2 solution. However, the official did not have more introduction.
As an example demo of Uniswap Layer 2, Unipig ‘s solution was launched in October 2019, showing the basic operation of Uniswap + Layer 2.
Unipig, like Synthetix, also uses Optimistic Rollup to expand its capacity, demonstrating the possible UX improvements that can be achieved by using Layer 2. It was jointly created by Uniswap and Plasma Group.
In the current Demo, Layer 2 recharge and withdrawal functions have not been implemented. Instead, users can participate in it by airdropping test tokens. Unipig has a statistics page that lists the performance improvement brought by the current Demo’s OR solution:
AAVE: Layer 2 will be adopted, but the details are not yet known
AAVE is a popular asset lending DeFi platform on Ethereum, currently ranking top. Last month, AAVE stated that the interest-bearing tokens “aTokens” (used to represent encrypted mortgage assets on the platform) obtained by users collateralizing assets on its platform will be integrated with Ethereum Improvement Proposal (EIP) 2612, so that authorization does not need to consume gas. .
In DeFi applications on Ethereum, it is often necessary to initiate a transaction authorization in advance to allow the next operation. AAVE also stated that the team is actively studying to introduce aToken into the Layer 2 solution.
Compound: Consider transferring to Layer 2 or other public chains
According to the Block Rhythm report, on August 21st, David Kajpust from the Graph team said on Twitter that Compound is secretly considering transferring to Layer 2 or other public chains because the gas fee is too high.
So far, there has not been any further reports showing what plan Compound will adopt. However, the EasyFi mentioned above, as an imitation of Compound, can be used as an example to show what the experience of Compound + Layer 2 will be.
According to the EasyFi blog, EasyFi is a universal second-tier digital asset lending protocol. DeFi system built on the Matic network. The Matic network went live on May 31, 2020, using Plasma as an expansion plan. The goal of EasyFi is to focus on credit agreements so that borrowers can easily and reliably obtain various types of credit assets.
At the beginning of EasyFi, V1 was created as a fork of Compound Finance, from the Ethereum main chain to the Matic network, realizing the mortgage secured loan agreement combined with the Layer 2 solution.
Curve: Layer 2 will be adopted in the future
On August 17th, Charlie of the Curve team mentioned in the telegram group when replying to netizens’ information:
In the future (Curve), Layer 2 solutions and expansion will be used, but it has not been completed yet. We know that high gas fees are not fair to retail investors, which is frustrating for us, at least for me.
summary
From the analysis of several head DeFi projects in this article, it can be seen that it is only a matter of time that the DeFi project adopts the Layer 2 solution. Although we don’t see the whole picture in the tube, after comparing multiple Layer 2 expansion plans, we can draw a preliminary conclusion from multiple considerations. The Optimistic Rollup (or zkRollup can also be considered in it) plan may become a Layer 2 plan. First choice for DeFi projects.
The DeFi midfield battle is indispensable for the important role of Layer 2. What are the potential investment opportunities in the various solutions of Layer 2? May as well leave it as an open topic and discuss it together.
Source link: mp.weixin.qq.com