IOSG Ventures_EN

Posted on Dec 31, 2021Read on Mirror.xyz

Scaling Summit 2021 Keynote Recap | Now and Future in L2 — from Wallet’s Perspective

OnDecember 18, 2021, at the 8th Old Friends Reunion Scaling Summit, we are pleased to have invited Chang-Wu Chen, the Chief Scientist of imToken to give us a thought-provoking keynote speech!

Overview

This keynote is about the L2 ecosystem, the present and future of the DeFi protocol, and how these technologies will be combined to build the next generation of wallets. Chen first pointed out that L2 provides a secure extension solution with high TPS and low transaction fees, through which wallet products can have more users and assets, and further compared Arbitrum, Optimistic, ZK-rollups, and StarkWare in terms of developers-friendly, composability and user experience. Chen introduced the three types of application scenarios respective solutions of cross-chain bridge, and imToken’s efforts in universality from both the developers and users perspectives, including EIP-3668 standard method which allows developers to obtain off-chain data from different L2s and the need to define standards to have a universal wallet access interface to improve user experience.

Hello everyone, thanks for having me here at the IOSG Scaling Summit. Today I’m going to talk about now and future in L2 ecosystem from wallet’s perspective.

I am Chang-Wu from imToken. Currently, I lead imToken Labs doing the research in Taiwan, including our next-generation wallet design, DeFi protocol, L2 solutions and see how to apply these technology to make our product even better. Our mission and vision is to build the most reliable and intuitive digital wallet that gives everyone equal access to the tokenized world. So that is why we think L2 solution is extremely important for us to build an environment with high performance and low transaction fees for the users without sacrificing security.

Especially today, users can’t afford the expense to perform the operations on the Ethereum mainnet. Though we can see lots of new users starts coming to crypto space to try DeFi, GameFi, and DAO applications, high transaction fee becomes a barrier to make them turn to other blockchains. Fortunately, L2 solution becomes more mature and evolves quickly in recent years.

Let’s dive into some numbers.

Here is the data from defillama.com. We can see the top 1 to top 5 of the total value locked on all chains are Ethereum, Binance, Terra, Solana, Avalanche accordingly. What do you think when you see the numbers? Why Polygon is not there since it’s popular in June? The answer is the blockchain market is so competitive nowadays and changes so fast.

For the TVL on the L2, currently, it’s around 5.8 billion, 1/30 of Ethereum, which still has the potential to grow in the future. And if we see the L2 numbers, we can find that the TVL starts to grow up by the end of August when Arbitrum launched their mainnet. With the advantage of EVM compatibility, more and more DApps are deployed on the Arbitrum, such as UniSwap, Curve, Balancer and so on. In addition, from StarkEx’s weekly statistics, millions of transactions happened on the StarkEx. Compared to the last year, more application comes to L2, not merely token swap. For the transaction fee, the data is from l2fee.info website, fee on L2 is cheaper than the mainnet. ETH transfer is ¼ cheap, and the token swap saves 95% transaction fee.

However, there are many rollup solutions, which one should we choose and what is the difference?

There are two main rollup solutions: zk-rollups and optimistic rollups. For these two rollups, they both move computation off-chain, and store compressed transaction data on-chain. The only difference is zk-rollup uses validity proof, which means that zk-rollup not only stores data on-chain but comes with cryptographic proof to verify transactions, which is more secure. On the other hand, optimistic rollups use fraud-proof under the assumption that all transactions are valid without verifying the correctness of data until a fraudulent transaction is detected. So the challenge period is required for users to withdraw their funds back to L1.

For now, Arbitrum and Optimism are EVM-compatible. From the usability perspective, they are friendly for developers to deploy smart contracts. Because developers don’t need to rewrite the code and can leverage existing dev tools. Besides, DApp composability is preserved so we still can have DeFi lego. Only the challenge period is a problem. So optimistic rollup can become a short-term solution. For zk-rollups, it’s more secure and has a shorter withdrawal time compared to optimistic rollup. However, it’s not EVM-compatible now. Developers need to learn a new language to write smart contracts. Also generating validity proof is time-consuming, so optimization is required for the hardware. But we still can look forward to this technology once it’s more mature.

Recently, StarkNet, which is developed by StarkWare, is on mainnet and can provide DApp composability. Despite contract development needs to be written in Cairo, openzeppelin has already provided some contract templates, and they are open-sourced. Developer tools are updated frequently and have complete documentation. I would suggest, if you’re a developer, maybe you can go and get it a try. This also can become a viable solution. To date, there are many DeFi projects have already been deployed on L2. Like Perpetual, Synthetix, Uniswap are deployed on Optimism. For Arbitrum, it has Sushiswap, Chainlink, Curve, Uniswap. Tokenlon, which is incubated by imToken, also tests on Arbitrum. Besides, dYdX, DeversiFi, Immutable X are running on StarkEx.

In my view, some projects might become the indicator as to the reference for those who haven’t decided where to deploy yet. For example, Uniswap and Chainlink are building blocks for DeFi protocol; projects need them to do token swap or token listing. But for those projects which don’t rely on others, they can choose anywhere they want if the wallet support interacting with or becoming an independent ecosystem.

Next, we will explore some topics related to wallets on L2.

As we know, the first step for the user to onboard L2 is to deposit some tokens from L1. A user only needs to sign the transaction and wait for it to be confirmed. For all L2 solutions, it’s all same. The step is easy and then the user will see the balance in his wallet. Due to the help of EIP-3085, it’s easy to interact with multiple networks so the user can have a better experience. Then, users can do anything until they want to exit L2. Once a user wants to get his fund back to L1, he will make a request for withdrawal.

Because of the different properties between zk-rollup and optimistic rollup, the time is different. Especially for optimistic rollup, the challenge period is 1 week for users to get his fund. For zk-rollup solutions, it takes minutes to hours. Compared to the user experience on L1, withdrawal time takes longer. Besides, the user experience on different L2 solutions is not consistent. Therefore, bridge becomes an important role in L2 ecosystem. A bridge is responsible for holding the assets on a blockchain while the same assets are released on another.

There are three cases we need the bridge

  • Transfer from L1 to L2
  • Transfer from L2 to L1
  • Transfer from L2 to L2

Let’s see the first case, transfer from L1 to L2 is just deposit, so each L2 solution provides its native bridge. Looks like that this is not necessary to have a bridge. But with the bridge, users can have a consistent user experience on different L2.

For the second case from L2 to L1, since withdrawal takes longer in optimistic rollup, if there is a bridge that helps users to do fast withdrawal from different L2 solutions, that would be better. So we need a role as a bonder to provide the capital for users to get their assets instantly, in exchange, they take a small fee for taking pricing risk.

For the third case, transfer from L2 to L2. It’s just like a user having funds distributed across different banks. If one day the user wants to buy a house or something but doesn’t have enough funds. Then he needs to do rebalancing between different banks. We called this as Liquidity Fragmentation problem. And this will happen when we are in a multi-rollup world. For a general user, if he can’t move funds easily between different L2, then he might stay with one L2.

Nowadays, there are many bridge solutions like hop protocol, cBridge, or cross-chain swaps like AnySwap or XY Finance. Recently, Binance announced to support deposit/withdrawal on Arbitrum. So I think there will be more CEXs like Binance acting as a bridge in the future.

In addition to L2 solutions, EIP-4488 and EIP-4490 are proposed to reduce calldata gas costs. As we mentioned before, rollup solutions need to store data on-chain but block has its gas limit. Vitalik and some researchers suggest reducing calldata gas cost, so the block can accommodate more data. This is just like having a box with the same size if you can fill more stuff inside without higher than the volume. The problem is the box will become much heavier than before, and only a few workers can carry the box. So a bigger block is an issue for nodes to process and sync if we want to store more data. This introduces the overhead for the client to have bigger disk space so EIP-4444 suggests pruning historical data.

Besides, if we have a multi-rollup world, we need to consider how to retrieve off-chain data in a universal way, especially there are several L2 solutions. Imagine you are a developer, you need to read different documentation to know how to get data from different rollups. EIP-3668 provides a standard way for offchain data retrieval.

At last, let's go with a brief summary.

L2 is wonderful and is an ideal world we can have more users and assets. It provides a secure scaling solution with high TPS and low transaction fee. But the infrastructure is under construction, we need a bridge to make withdraw fast or do cross-chain swap without exit L2. In the meantime, we need to define the standard to have a universal interface for wallet access. So the user experience will be improved. Abstract account is less touched, but it can provide more features to users, like social recovery or having customized verification scheme. But it also needs a standard for wallet to know how to verify the transaction. Even we do all of these, we still need a new wallet to onboard new users.

And this is the goal for imToken wallet to build the most reliable and intuitive digital wallet that gives everyone equal access to the tokenized world.

Thank you for listening, and I hope you enjoyed the talk. Thank you!