It may not make much sense to add the element of Optimistic to the ZK Rollup, but it makes sense to add the element of zero-knowledge proof to the Optimistic Rollup.
The expansion of Ethereum is imminent, and Layer 2 has become a battleground. Crypto Tonight invited the top teams in the Rollup direction, Matter Labs co-founder Alex Gluchowski and Offchain Labs co-founder Harry Kalodner , as well as researchers deep in this direction to discuss topics such as interoperability, MEV, incentives, and native tokens.
The information we have obtained is that the world’s top blockchain investment institutions with the most financial resources are hunting the core Ethereum Layer 2 expansion program development team, hoping to invest heavily in them. Among them, the relatively mature Rollup program development team is the most coveted prey of these investment institutions. Many negotiations are underway, and investment institutions are not hesitating to invest heavily to take these teams under their command.
According to the previous ” How does the Ethereum Layer 2 ecology stand?” 》Research and analysis, from the perspective of the number and quality of ecological applications of general solutions, Matter Labs , Optimism and Offchain Labs may be the three teams that have received the most attention.
Matter Labs’ zkSync expansion technology that only supports transfers has been launched on the mainnet . Its advantage is that ZK Rollup proves that zk-SNARKs ‘ cryptography technology ensures security with zero knowledge , so the security can be almost equivalent to the Ethereum main chain.
Ed Felten, the co-founder and chief scientist of Offchain Labs, is a professor of computer science at Princeton University and the Chief Technology Officer and Senior Advisor of the White House during Obama’s tenure. Its Arbitrum Rollup plan may be the earliest plan to go on the main network. In addition, smart contract support is relatively easy, and the exit period is more friendly.
Wonderful argument:
- Before Ethereum 2.0 is fully online, Rollup can provide a lot of help, because Vitalik Buterin also stated that Ethereum will move towards a Rollup-centric network.
- Compared with Optimistic Rollup, ZK Rollup has more advantages in interoperability across Layer 1 and Layer 2, but there is also a solution using state channels, Connext, to explore to increase liquidity between different networks.
- The large-scale asset migration program explored by StarkWare and Hermez is also very interesting. Offchain Labs believes that Hermez’s solution can be used for them after fine-tuning, and Matter Labs has designed a large-scale migration of zkSync (assets and smart contracts), and the details will be disclosed later.
- The ZK Rollup solution requires a lot of calculation, and Matter Labs will provide a variety of solutions such as CPU, GPU and FPGA.
- In response to the problem of miners’ obtainable value (MEV) , the Layer 2 solution is already studying feasible solutions. Offchain Labs will explore new consensus algorithms, and Matter Labs will use zero-knowledge proofs and VDF (Verifiable Delay Function) to hide the content of transactions.
- Offchain Labs believes that zero-knowledge proof is a very powerful technology, so in the future Optimistic Rollup may also use zero-knowledge proof to achieve specific functions.
- Matter Labs stated that a native token is needed in the zkSync system to reach the consensus of Layer 2; Offchain Labs stated that it is also necessary for nodes that provide finality for the network to use a token form of economic incentives.
host:
- Yama, Crypto Tonight
Guests:
- Harry Kalodner: Co-founder of Offchain Labs
- Alex Gluchowski: Co-founder of Matter Labs
- Yao Xiang: Chief Researcher of MYKEY Lab
- Pan Zhixiong: Research Director of ChainNews
If you still don’t know the latest ecological layout, technical features and advantages of Layer 2 and Rollup technologies, you can refer to the following contents:
To view the complete program video, you can click here to review it ( YouTube recording ). The following is a transcript of the entire program of this issue, and the content has been edited.
Question 1: Phase 0 of Ethereum 2.0 is finally online. What is the relationship between ZK Rollup, Optimistic Rollup and Ethereum 2.0?
Harry: Congratulations to Ethereum, after so many years of research and development, finally launched the 2.0 network, but there is still some time before the smart contract can finally be executed. But more importantly, Rollup technology can take advantage of the features of Ethereum 2.0 earlier than other smart contract-based (capacity expansion) solutions.
Recently, Vitalik Buterin also stated in the latest roadmap that the Rollup technology will be used in the first phase of Ethereum 2.0. Because Rollup requires a very large amount of data throughput, but does not need (smart contract) execution (that is, calculation). So before Ethereum 2.0 has entered the final stage to add smart contract execution capabilities, Rollup can provide great help.
Alex: In his speech, Vitalik mentioned the changes in the roadmap, allowing Ethereum to move towards a Rollup-centric network. Applications adapting to Rollup in advance can make the process of migrating to Eth2 easier. Therefore, for most applications and protocols, deploying on Rollup and waiting for Rollup to migrate to Eth2 may be the most convenient path. Unless you have any special requirements that need to rely on the bottom layer, or you need to design Rollup yourself, you only need to consider adapting to the low-level features of Eth2. As Vitalik said, “This may be the easiest path for everyone.”
Question 2: If a developer develops an application on Layer 2, will this lose the advantage of composability or interoperability? How does this app interact with Layer 1 apps? How to interact with other Layer 2 applications?
Harry: In this question, Optimistic Rollup has more complexity than ZK Rollup. In the Optimistic Rollup scheme, (for the interaction between Layer 2 and Layer 1) there is a challenge period. During this period, anyone can question the transaction, and the transaction can be fully confirmed after the challenge period.
Therefore, the interaction between the Layer 2 smart contract and the Layer 1 smart contract does have some interoperability difficulties. Fortunately, in practice, we can still support the improvement of liquidity. There is also the Connext solution, such as the use of state channels for capacity expansion, to provide a transfer mechanism between various Layer 2 and Layer 1.
In addition, we can minimize the need for interoperability, such as providing only a subset of interoperability, such as supporting behaviors such as transfers. Because for a large number of transfers, it is more suitable to use Rollup.
Alex: I want to talk about the impact of this on users and developers. If you are on Layer 2 Rollup, whether Optimistic Rollup or ZK Rollup, the interaction of any application deployed in the same Rollup is as smooth as the application interaction on Ethereum Layer 1. In the same Rollup, the A application can call the B application, and the B application can call the C application. Everything is very simple, and it is no different from the application interoperability on Ethereum.
If the application of Layer 2 wants to interact with the application of Layer 1, then Layer 2 must send a message to Layer 1. This is divided into two situations: message delivery and value delivery. For value transfer, that is, the transfer of tokens, instant interoperability can be achieved through liquidity providers. Of course, NFT cannot do this. And more interoperability refers to message delivery. We not only transfer money, but also need to call some methods of the contract, including the delivery of some status information.
For Optimistic Rollup, the withdrawal time may take a week or more, while ZK Rollup only needs to wait for a zero-knowledge proof time, which may be as short as one minute. To give another example, if you deploy a smart contract wallet contract on ZK Rollup, you can call the Layer 1 contract with a short delay and low cost. In addition, protocols deployed on Layer 1 can be smoothly migrated to Layer 2, which is very important work.
However, the current Rollup protocol is still very new. ZK Rollup was only launched this summer, and Optimistic Rollup is still being tested. They will take some time to be verified to gain people’s trust. There may be some bugs, or special cases that have not been tested.
Time will tell everything. Just like the situation faced by MakerDAO, MakerDAO’s first year was a small agreement with not many users and little liquidity, but it gradually grew into a multi-billion dollar agreement. I believe that this kind of thing will happen again on Rollup. I believe that the DeFi protocol will have different versions and be deployed on Layer 1 and Layer 2. Most users may still choose to stay in Layer 1, but some users start to try Layer 2. , But there will be more and more end users, because Layer 2 is cheaper and can attract more new users. These users try to use the Layer 2 version of the DeFi protocol, such as Uniswap and Balancer on Layer 2. Through governance, these protocols can decide to slowly migrate liquidity from Layer 1 to Layer 2. Of course, these liquidities may migrate back due to liquidity mining on Layer 1.
I want to emphasize that the mutual migration of Layer 1 and ZK Rollup is feasible, as long as a short time, while the migration of Layer 1 and Optimistic Rollup can only be one-way, because it takes a week and longer to migrate back to Layer 1 .
Question 3: Does this mean that all Layer 2 protocols are independent? If you want to migrate assets in different Layer 2, you must go through Layer 1?
Alex: If a Rollup wants to interact with another Rollup, it must use Layer 1 as a transit. Even if it is a state channel, its fluidity is also established on Layer 1. Therefore, the interaction delay is the “Layer 2 to Layer 1 delay” plus Go to “Layer 1 to Layer 2 Delay”. Of course, you can alleviate this delay by establishing liquidity between each Rollup, but this means that liquidity will be very fragmented, and managing liquidity is a new challenge.
Harry: Actually, the model of most Layer 2 protocols such as Rollup is very similar to the sidechain model. Rollup is like a blockchain in many ways. So just like the interoperability issues encountered between other blockchains, there are also such issues between Rollup and Layer 1. For example, interoperability can be increased through more general atomic swaps.
Question 4: StarkWare has launched a conditional transfer function to provide interoperability, and Hermez has also launched a large-scale migration function. Do you have any opinions on these solutions? Do you currently have any similar plans?
Harry: The ability to migrate across Rollups is very useful. However, some of the solutions currently seen may be more concerned with transfer functions. Because it is more difficult to support smart contract migration. We have been exploring various strategies to solve this matter, but it seems that this set of solutions may not be universal, nor may it meet everyone’s needs.
I looked at Hermez’s plan this morning, and I feel that this plan can also be used for Arbitrum Rollup after fine-tuning. The essence of this solution is to create a series of related smart contracts, aggregate a bunch of assets, and these assets can be migrated together.
Alex: I agree. Large-scale migration is a very critical issue for Rollup, and its importance is similar to Layer 1 Fork. Why do you say that? The security of Ethereum is more based on thousands of full nodes, who can choose to fork when validators do evil.
But for Rollup, the fork cannot be done because its state is based on the state of Ethereum. I think large-scale migration is still possible. We designed the large-scale migration of zkSync. Although it is not easy to deal with general smart contracts, we still support smart contracts written by Solidity, so that these existing smart contracts have migration To the ability on zkSync. We don’t want developers to need to modify the contract when deploying applications on zkSync, but to make existing contracts directly available. We will announce these details when we are ready.
Question 5: There may be multiple Layer 2 networks in the Ethereum network. For the wallet team, there are many different network standards. Is it possible to launch an EIP (Ethereum Improvement Proposal) standardization?
Harry: The wallet is an important part of the interaction between users and the blockchain. Both Arbitrum Rollup and zkSync are using the same address and transaction. In the near future, we may be able to use another signature type, such as the BLS signature in Ethereum 2.0, which may greatly reduce costs.
Barry Whitehat of the Ethereum Foundation is currently in charge of the BLS signature standard. For the Rollup system, we hope to use it in the Ethereum 1.0 system as soon as possible. I think the EIP system can organize everyone together and focus on standardization. In this way, the wallet can be more flexible and long-term focus on integrating various expansion solutions. We are currently actively exploring the best way and are happy to participate in the development of standards.
Alex: I agree. Standardization is a very important thing and requires some effort. Ethereum users can use different wallets to access services with standardized protocols. Through the Web3 protocol, both jaxx wallet and MetaMask wallet can seamlessly connect to Ethereum. MetaMask also supports snaps, which is a customized extension wallet to MetaMask (Note: MetaMask web3 plug-in system MetaMask Snaps uses 3Box as the initial identity and user data plug-in, allowing MetaMask to directly integrate with 3Box IdentityWallet SDK). But we use a different cryptographic protocol (Note: EdDSA), which is cheaper to implement the zero-knowledge proof circuit. We have found a solution for any wallet to support this signature algorithm.
You can go to the homepage of Curve and find the link to its testnet on zkSync, you can experience this solution. This is similar to the traditional open authentication protocol Google Connect or Facebook Connect. You click “Connect Wallet” and a separate application page pops up in the browser. This page is maintained by zkSync. Every time you sign, it will First enter this page to confirm, and then return to the previous page. Its security is similar to the open authentication protocols of Google and Facebook. Please note that this will be more secure because the key does not exist in the browser and never leaves the wallet. This is important for large-scale applications, and you can now use it unimpeded.
Question 6: There are many nodes in the Layer 2 network, and validators need to consume computing resources. How to decentralize this computing resource?
Alex: The zero-knowledge proof system is a “self-certified validity” system. The legality of transactions does not need to rely on “nodes” to endorse. So, why do we need to “decentralize”? This is not to decentralize for the sake of “decentralization”, but to resist institutions with strong power; for the fairness of the agreement, to avoid single-point risks; for anti-censorship, to prevent an institution from reviewing transactions, making certain users unable Use the network.
We can start a decentralized network, but delegate the task of “generating proofs” to some independent roles. These roles may not guarantee the response, but once the response is made, we can always verify their response. If this proof is wrong, it will not be verified by the smart contract. Therefore, there is no need to worry too much about the proof being generated by the “cloud” or a small group of users.
Of course, there is another important reason for decentralization, which is the reliability of the system: Assuming that all the roles that generate proofs are shut down by the authority, the system will be unusable. In order to prevent this from happening, systems like golem can be simply modified and used in all systems that require “Proof of Generation”. However, the nodes of these calculation proofs are completely different from the “consensus” and “full node” services. They can all be calculated off-chain, and then these proofs can be synchronized with the node that submitted the proof.
Pan Zhixiong: Do you mean that the process of generating the proof can be “centralized”?
Alex: Not centralized. Anyone can do this, and no permission is required to generate and submit a certificate. What I mean is that as a verifier of the second-tier network, you can generate a certificate yourself, or you can delegate this to an outsourcing service, whether it’s Google, AWS, Baidu…you don’t need to trust these services, this Very important. There is no need to establish any long-term cooperation with them, but when necessary, submit the task and retrieve the generated certificate.
I think that “decentralization” of this matter is not that important at this stage, but it can be considered in the next stage. Don’t let these platforms control our behavior. However, these platforms are now very powerful. Look at Ethereum. Most of its nodes are deployed on AWS. This is similar to what we discussed. There are so many applications on AWS, and they cannot control all behaviors at a certain time.
Pan Zhixiong: Is the current calculation process for generating proofs CPU-friendly or GPU or ASIC-friendly?
Alex: We have CPU-based solutions and GPU-based solutions, but the cost is higher. We also have an FPGA-based solution, which is about 1/3 of the cost of a CPU solution, but more importantly, it takes about 1/10 of the CPU to generate a certificate, which is very fast. And you can also try to combine recursive proofs. You can use some methods to generate proofs in parallel. You can generate a proof for tens of thousands of transactions in one minute. The CPU can also do it in parallel, but the time will be 10 times that of the FPGA. FPGA is also friendly to cloud services. Google Cloud and AWS both provide FPGA cloud services. This is similar to the CPU cloud service, you only need to submit the task, wait, and receive the calculated proof.
Harry: Optimistic Rollup has no such problem at all. A node running an Optimistic Rollup network is similar to a node in the Ethereum network. It is relatively lightweight and does not require a lot of calculation, so it is relatively easy to decentralize.
Alex asked Harry: I have a question, do you want every user to be able to run Optimistic Rollup nodes? The more transactions in a single OR, the higher the requirements for running a full node. Do you think it is possible that each application will deploy an independent OR?
Harry: We certainly hope that all core participants can run full nodes on their own to improve security. Moreover, running nodes is not expensive and it is easy to set up. However, we don’t expect everyone to run full nodes, just as a small number of people now run Ethereum full nodes, and more people will rely on Infura, so it may be similar in the Optimistic Rollup network.
Question 7: MEV (Miners Extractable Value) is currently a hot topic. Is it possible to prevent this from happening in Layer 2?
Harry: This is a big topic. There are many forms of MEV, the most important one is front running. That is, when you see a transaction in the network, you can design two transactions before and after it (because the transactions are sorted by Gas), and you can make money without loss.
In the current Ethereum ecosystem, miners have the ability to fully control the order of transactions to be packaged, so they can view each transaction and then stuff their own set of special transactions into the block.
What can we do? Currently everyone is exploring how to do it. There is currently a project (Flashbots) participated by Phil Daian, one of the authors of previous MEV academic papers. The MEV function is provided in a decentralized way to prevent a single miner from performing similar transactions.
There are other solutions. For example, the Optimism team (another Optimistiv Rollup team) has launched the “MEV auction” proposal. I won’t mention more details here because I don’t like that solution very much. It may make the MEV situation worse. serious.
We at Offchain Labs are also exploring a relatively novel solution, which may not be provided at the beginning. Many consensus systems do not provide ordering guarantees, such as Tendermint. The overall system is decentralized, but transaction ordering is not entirely because it is not part of security.
Steven Goldfeder, co-founder and CEO of Offchain Labs, also one of the authors of MEV academic papers, recently jointly published a new consensus algorithm paper ” Order-Fairness for Byzantine Consensus “, which decentralizes the ordering , Many of our core technologies may be involved here, but the ultimate goal is to greatly reduce the MEV situation.
A very important factor is that MEV can be realized because you have enough time to calculate and execute. If we can limit the time that any party can calculate MEV, we can greatly reduce the probability of MEV.
Alex: You just said that the effect of MEV can be reduced on Layer 2, but I am a little worried. The degree of “decentralization” of Layer 2’s network is much worse than that of Layer 1, because the current value of Layer 2’s network is still relatively low and there are fewer users. If you do nothing on Layer 2, things will only get worse.
The problem is that the interval time of each block must have a basic granularity, because you have to consider the delay of transmitting data from Australia to Beijing and New York, and the delay is still two-way. The result of calculating the transaction is very fast, so when a miner discovers a Uniswap transaction, it is easy to immediately judge whether it is “with extractable value”.
Matter Labs believes that from the perspective of information theory, to prevent this situation, the content of the transaction must be hidden. This is achievable through “zero-knowledge proof”! Silver Bullet! This can be achieved through a time lock. The transaction can be placed in an encrypted envelope and sent to the miner, so that after the transaction is packaged, a promise has been made on the blockchain. The specific content of the transaction is gradually revealed through the slow solution of the VDF (Verifiable Delay Function) puzzle over time. VDF can be set to 30 minutes, which can completely avoid MEV. We think this is the way to solve the problem.
Harry: I haven’t seen time lock technology based on Verifiable Delay Function (VDF) that can be so accurate. VDF realizes a function through serial computing instead of parallel computing, that is, no one can achieve faster calculation results through heap computing resources. Although VDF is also used compared to the current Ethereum 2.0, it has not been fully confirmed that it cannot be attacked. What will happen in the formal scenario is still unclear. But I hope it is effective.
Alex: It’s very simple. First of all, this is a very critical link in ETH2. You can use the same VDF function as ETH2. In this way, we have shared a large amount of ETH2’s funds, research, and the results of testing VDF. I have also heard some proposals to produce VDF hardware, carry these chips with VDF functions, or even place them on satellites to provide services to ensure the decentralization of this service. You can even imagine someone has a huge advantage, for example, his computing power is 10 times that of others. This is already difficult, but it is still difficult to achieve MEV.
Similarly, VDF can be realized by ASIC and FPGA, and the efficiency of FPGA may be higher. I am very confident in this technology. If you don’t believe it, you may have to doubt the security of ETH2, because the random number of ETH2 may be easily manipulated, causing validators to join forces to do evil, and ETH2 will also become vulnerable. Therefore, the success of ETH2 can also greatly increase the credibility and feasibility of this time-locking technology, so that MEV can be solved.
Harry: I very much hope that VDF technology is effective. And Optimistic Rollup can also fully adopt this scheme, and this scheme should also be compatible with all Rollup systems.
Alex: Yes, you have to generate a zero-knowledge proof to prove that the encrypted transaction in this envelope can indeed be decrypted, not a spam transaction. Some hardware experts may also be needed.
Harry: And this plan may become a standard plan. Maybe we are not as fast as Matter Labs to support this plan, it may be a few months later.
Zero knowledge proof is a very powerful technique. So in the future, Optimistic Rollup may also use zero-knowledge proofs to achieve specific functions. In summary, adding Optimistic elements to ZK Rollup may not make much sense, but adding zero-knowledge proof elements to Optimistic Rollup makes sense.
Question 8: How to design an incentive mechanism for a Layer 2 system to ensure that nodes and validators can provide high-quality services? Is it necessary to have native tokens in this system?
Harry: In the Arbitrum Rollup network, there are many types of participants. Among them, validator nodes are those who verify transactions, and they are completely decentralized. They can be motivated, but it may not be necessary, because the cost of running validator nodes is very low. What needs to be motivated is to allow them to continue to provide services and provide “liveness” for the network. There may be a way to motivate them to verify, but it may not be very significant economically.
The second type of participants are ordinary nodes that obtain all data but do not verify the data. Similar to the service provided by Infura, these nodes should not be motivated. Infura can earn income by providing data services.
The third type of participants is very much in need of motivation, that is, how to provide finality for Rollup. This is a big topic, and I will introduce it roughly. How to make the finality of Layer 2 faster than the Ethereum mainnet can be done because some people (staker) need to sort orders (after all the stakers have no dispute, the results will be published to Layer 1, but the transaction is sorted and confirmed Finality is very powerful, so it needs to be done through the economic system), which is why incentives are important here. Therefore, some governance methods can potentially be adopted. This part may be a place where tokens are used for incentives, which can be further explored later. The ultimate goal must be complete decentralization. The more decentralized the project, the less these fancy incentive mechanisms are needed. The incentive mechanism itself is a bit centralized.
Alex: Let me talk about some aspects of zkSync. In ZK Rollup, someone has to serialize the transaction and calculate the corresponding proof. This is a task that must be completed. We consider using a decentralized approach to solve the problem of avoiding transaction review and improving the reliability of the system. Therefore, we adopt a “permission-free approach” to manage the distribution of these tasks.
Our approach is that we will have zkSync tokens, which are used to reach the consensus of Layer 2 and also allow transactions to be confirmed faster. Users definitely don’t want the transaction to be confirmed in 30 seconds. With the token of zkSync, the transaction confirmation may be completed in 3 seconds. The consensus protocol will negotiate the producer of each block, generate a proof by it, and submit it to the Ethereum network. This is the most direct way to govern the permissionless two-layer protocol, so we do need such tokens. The transaction fees of Layer 2 transactions can be used to motivate these block producers. We believe that the fees are sufficient to motivate them, because in the summer of this year, the transaction fees of Ethereum reached 200 million US dollars per month, and this is only a small Contributed by users. For those who have not yet entered the cryptocurrency world, these potential hundreds of millions of users may contribute more handling fees. Once Rollup succeeds and attracts these users to enter, the fee income is very considerable.