We're delighted to announce the development of a new feature in the Hermez zk-rollup that improves inter-L2 communication for the whole rollup ecosystem.

Hermez will release the first version of the zk-rollup network in early 2021, including implementing a mechanism for Massive Migrations of L2 transactions for the first time.

Why Massive Migrations Are a Game Changer

Most people are aware of the current usability problem of switching between L1 and L2 and the high gas fees usually attached to it.

As more and more L2 solutions are implemented for different use cases, this usability problem would worsen, as users will have to pay high fees when transferring tokens from one rollup to another or alternative L1 smart contracts. This scenario could create a lock-in situation for user funds, limiting the interest in L2 solutions.

Under the current paradigm, when Bob wants to move funds between L2 solutions, say RollupA to RollupB, he has to withdraw funds from RollupA to L1. Then, he'll deposit the funds from L1 to RollupB. Bob would have to pay twice for gas, so he might think it is not worth it.

Introducing Massive Migrations

The solution to this problem is simple but complex to implement. Hermez implementation follows very closely the concepts introduced by Barry Whitehat.

With Massive Migrations (MM), users will be able to deal with external L1 Smart Contracts in the same way that they transfer tokens to another Layer 2 network user.

These L1 Smart Contracts will need to be registered in L2, and the users will need to know the L2 address to transfer funds to it.

The Hermez protocol will offer a way to group and extract a set of L2 transfers with the same Smart Contract L2 destination address.

The destination rollup smart contract then withdraws the aggregated amount of funds in L1 using the standard Hermez functions. Although it will need to pay the funds' withdrawal fees, it will be very effective since the cost can be distributed between all the transfers included in the batch.

Hermez zk rollup massive migration mechanism

The recipient L2 network coordinator will need to process the L1 withdrawal transaction and decompose the funds from this information into the aggregated original accounts mapped to the new rollup.

All of this is possible because the Hermez protocol includes in the aggregated withdrawal transaction the information required to reconstruct at the destination the original transfers in Hermez L2 and the corresponding account information. This could be done as a circuit processing in the destination L2 (if supported).

Let's say that a group of users (including Bob) want to execute a similar transaction to move tokens to another rollup. Right now, each of them would have to pay an L1 withdrawal fee for each transaction. With our Massive Migrations mechanism, Hermez can process many transactions in a single L1 transaction. All the transfers were executed, paying L2 fees in Hermez, and probably the destination rollup will charge some low fees for the inbound. Bob is now pleased.

By the Hermez Network launch, there will not be any L2 solution with the inbound processing implemented, but it will be available in the next release. In fact, this mechanism will be useful for users to migrate between versions of the Hermez Network and in the same way it could be used to connect to other L2 solutions.

This novel mechanism proposes new possibilities that could unlock loads of value for the L2 ecosystem and the Ethereum community.

If you want to delve deeper into the tech behind Hermez, check out the recent publication of our smart contracts. We've also released our Circom circuits on Github. Read more on that in this blog post. We're currently looking for code reviewers to collaborate with our Technical Lead, Jordi Baylina. Reach out for more info.

Stay on top of Hermez-related news by following us on Twitter at @Hermez_network and joining our new Discord server.