BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Comparative study of different Layer 2 paths and introduction of Raydius

星球君
Odaily资深编辑
This article is about 3693 words, reading the full article takes about 6 minutes
Layer 2 has received more attention at this stage, and has also made great progress.
AI Summary
Expand
Layer 2 has received more attention at this stage, and has also made great progress.

With the continuous expansion of usage requirements, the performance bottleneck of Ethereum has gradually become prominent, and the problem of insufficient underlying scalability greatly limits applications and affects user experience at the same time. In recent years, many studies and works have been devoted to solving this contradiction, including the first-layer extension technology (Layer 1) that upgrades the Ethereum core protocol and the second-layer extension technology (Layer 1) built on the basic Ethereum protocol. 2). Although Layer 1 and Layer 2 solutions are not mutually exclusive, and the two work together to provide better development prospects for the Ethereum community, but under the structural constraints of the Ethereum mainnet and Eth 2.0 has not yet been launched, Layer 2 is in At this stage, more attention has been devoted to it, and great progress has been made.

Compared with the direct solution of Layer 1 upgrading the core protocol, Layer 2 adopts a roundabout way to solve the current throughput and transaction speed constraints. The core idea is to transfer transactions that should be processed on the main network to Layer 2. , use Layer 1 only when necessary to ensure the smooth progress of the transaction. Although this technical concept makes most of Layer 2 improve throughput and cost at the expense of certain security and versatility, it balances transaction costs, transaction speed, user experience, etc. Therefore, the Layer 2 expansion technology is very attractive to many applications with relatively low security and deterministic requirements.

After several years of hard work, a variety of Layer 2 solutions using different technical paths have emerged in the Ethereum community. As time goes by and more and more technical paths join the competition, the advantages and disadvantages of different solutions are gradually exposed. in front of users and investors.

As the state channel technology of the first-generation Layer 2 solution, it is very suitable for applications where the number of participants is determined and the state needs to be exchanged and updated multiple times within a period of time. It adopts the setting of "challenge period" to meet the needs of security. Occurs inside the channel, which can provide users with good privacy. However, due to the active assumption introduced by the existence of the "challenge period", users or their delegates need to monitor Layer 1 all the time to prevent the counterparty of the transaction from doing evil when submitting status updates, and being online for a long time is very unfriendly to users of. At the same time, since the judge contract of the state channel needs to be modified each time the transaction members change, this is very unsuitable for applications with a large number of one-time transactions and short-term transactions.

Like state channels, Plasma is a technology for managing off-chain transactions while relying on the underlying Ethereum blockchain for its security. But the difference is that Plasma provides a scalability framework that can create "sub" blockchains attached to Ethereum's "main" blockchain, making it possible to perform many complex operations on the subchains, in contrast to the main chain Run entire applications with thousands of users with minimal interaction. However, Plasma still introduces the same liveness assumption as the state channel, and also introduces the data availability assumption, that is, users need to trust that the operator will provide all transaction data so that they can be used to verify the correctness of the transaction when needed, which requires Layer The checkpoint communication data between 1 and Layer 2 is required, so the exit time is very long. Furthermore, neither state channels nor Plasma support smart contracts, which severely limits the applications that require EVM compatibility.

Due to the inherent defects of state channels and Plasma and the limitations in application scenarios, projects using these two technical paths are basically at a standstill. A small number of teams are still pushing forward, and the overall vitality is not strong. In this case, another new Layer 2 technology path that can take into account capacity, speed, security, availability, etc. is urgently needed to solve the problems existing in state channels and Plasma. Rollup is the general term for the concept of the latest generation of expansion solutions after the two. The core idea is to package and process Dobby transactions in batches to achieve as little interaction with Layer 1 as possible to significantly reduce gas costs. At the same time, because Rollup uses calldata in Ethereum to summarize transactions on Layer 2, this allows any user to obtain Layer 2 transaction information from Layer 1 at any time, thus avoiding the data availability assumption that restricts Plasma applications. defect.

The current Rollup project can be divided into ZK Rollup (ZKR) and Optimistic Rollup (OR) in terms of specific implementation schemes, which use zero-knowledge proofs in cryptography and fraud proofs in game mechanisms to ensure network and data security. Security, and security is crucial to expansion technology, which is one of the most important reasons why Rollup is currently the most promising Layer 2 technology. The concept of ZKR is very simple. It uses the separation of calculation and verification, that is, all funds are held by smart contracts on the main chain, while calculation and storage are performed off-chain. Each Rollup block will generate a state transition zero-knowledge Proof and verification through the main chain contract to increase throughput and reduce transaction costs. OR draws on the design of Plasma and ZKR at the same time. It makes an "optimistic" prediction of the state of Layer 1 based on the data of Layer 2, and keeps the transaction forward, unless someone publishes an incorrect state transition, other operators or Users can point out invalid transactions and rollback incorrect blocks, punishing malicious validators.

Although Rollup technology is currently recognized as the best Layer 2 solution, and even called "the only option in the short term", ZKR and OR also have their own limitations. Although ZKR is fast and highly secure, there are still technical difficulties in achieving compatibility with smart contracts. Although OR can achieve compatibility with smart contracts, there is still a "challenge period" problem. If the challenge period is set too short, it will affect security, while if it is too long, it will affect transaction efficiency. But in general, in terms of security and realizability, Rollup technology is still the best solution at present, and it is very likely that in the future, there will be a technology path that takes advantage of the Layer 2 ecosystem. project.

In addition to the above three technical paths, side chain solutions have also been placed with certain expectations. The essence of the side chain is to build another chain on the base layer, and use another set of verification methods on this chain, so the security of this technology is separated, that is, the main chain has the security policy of the main chain, and the side chain There is a security policy for sidechains. Therefore, this has become the biggest original flaw in the current sidechain technology path, that is, the security is very dependent on the security strategy adopted by the sidechain itself, which is considered to be an expansion solution obtained by sacrificing security to a certain extent. However, if the security damage can be controlled within a certain range by improving the side chain security strategy, with its high transaction efficiency and compatibility with smart contracts, it has the opportunity to become a better Layer 2 solution after Rollup.

Through the above analysis, it is not difficult to see that when examining various Layer 2 solutions, the main measurement indicators include security, versatility/compatibility, cost, transaction time, throughput, user experience, etc., and the existing technical paths are above Various performance aspects are more or less deficient. In this case, not only is the Layer 2 technology path constantly being updated and upgraded, but there is also competition among multiple projects in the same Layer 2 technology path. Therefore, the current Layer 2 track is “blossoming”, making different Layer 2 solutions The solution was naturally divided into many differentiated ecosystems, and a situation of fragmented liquidity appeared, which seemed to run counter to the original intention of Layer 2 to expand and connect the Ethereum community. In this case, there are two solutions: one is to use Layer 1 to conduct cross-Layer 2 transactions, that is, to use Layer 1 as a transit to realize asset interaction in two Layer 2 projects; the other is to build cross-layer 2 projects Liquidity solutions, including projects utilizing state channels, intermediary token bridges, and more. The first solution will face higher gas fees and longer settlement time, which is very unfriendly to most users and more frequent transactions, and does not fundamentally solve the problem of insufficient scalability of the Ethereum community, so cross-Layer The liquidity solution of the 2 project has become an inevitable choice.

In addition to being able to build a bridge between different Layer 2 projects, an excellent liquidity solution also needs to meet the requirements of security, versatility, low cost, low time consumption, and better user experience, so that Layer 2 of Ethereum 1. Layer 2 and liquidity solutions together form a safe, efficient and user-friendly ecological whole. Driven by the above goals, the team developed a Substrate-based liquidity solution——Raydius. On the basis of satisfying different Layer 2 ecosystems and Layer 1 connections that can be connected safely, efficiently, quickly, and cheaply, it also supports customizable, scalable The implementation of a compatible and developable universal liquidity solution.

For Layer 2 liquidity solutions, security is a very important measure. By introducing Substrate as a framework based on decentralized protocol technology, Raydius avoids the potential transaction risks that exist in centralized liquidity solutions. At the same time, since transaction data is recorded on Ethereum, it is frequently synchronized in blocks A higher level of system security can be achieved under certain circumstances. In terms of chain bridge design, when verifying the transactions between Raydius and other blockchains or synchronizing data, the verifier needs to pay a certain security deposit. By dynamically controlling the threshold of the deposit, another layer of security is added to Raydius.

In addition, versatility and compatibility are also crucial for the promotion and application of liquidity solutions. Raydius provides a developable and extensible interface, using the compatibility with EVM and eWasm and the general features of supporting general smart contracts, it can support developers to build applications independently, solving the problem that many current liquidity solutions can only realize assets Diversion dilemma. At the same time, Raydius can also support multiple programming languages, so that developers who are familiar with different programming languages ​​can easily expand the application boundary and realize more diverse functions.

The current Layer 2 liquidity solutions always have trade-offs and trade-offs between cost and security, and Raydius gives users the right to choose when facing this problem, by allowing users to choose fast channels independently according to transaction needs and application characteristics Or standard channels, which can provide greater flexibility for dApps with different needs.

Through the above analysis of security, versatility, efficiency, etc., it can be clear that Raydius puts security first when designing and developing, and at the same time attaches great importance to versatility and compatibility. In addition, it also takes into account cost and user needs, etc. On the one hand, it provides an excellent liquidity solution to promote the formation of a safe, efficient and user-friendly ecological whole. Raydius expects that with the continuous advancement of Layer 2 technology in the future, it will be able to cooperate with more outstanding Layer 2 projects and jointly establish a rich, diverse, convenient and fast ecosystem.

ETH
Layer 2
Plasm
Welcome to Join Odaily Official Community