Hermez is gearing up to be the most efficient way to make any transfers on Ethereum. It doesn’t matter whether you want to pay your groceries with a stablecoin or to deposit ETH into an exchange: by using the Hermez Network, anyone can transfer Ethereum or any ERC20 at a fraction of the cost it would have to do so in mainnet - and with the same security assurances!
But what exactly will this look like? Let’s follow the user flow step-by-step. For that, we will follow the story of Marta, who wants to send some money to her friend Jessica on the other side of the world.
Do you have a Metamask account? Marta already has one, so she can just use it to log into the Hermez web wallet. She will also be able to use other wallet providers, including hardware wallets for extra security.
In the future there will be use cases where the complexity of using both L1 and L2 is abstracted. That’s why we will also have a native wallet in order to facilitate creation of Hermez accounts without an existing Ethereum wallet!
Next thing Marta needs to do is to deposit some funds in the rollup so she can start transacting. Clicking on “deposit”, she chooses the type of asset (ETH or any ERC20), the amount she wants to use within the Hermez Network, and signs the transaction via their wallet provider. This is still a L1 -mainnet- transaction. Marta is depositing funds in the Hermez smart contract and only she can withdraw the remaining balance once she is done transacting in Hermez.
Paying or transferring assets
Now Marta is ready to transact cheaply in the Hermez Network! With Jessica’s Hermez address she can already send her as much USDT as she has deposited.
For Marta it looks exactly like a transaction in mainnet, minus the outrageous gas fees. She has to introduce Jessica’s address, select how much of which token she wants to send, and sign the transaction with her private keys. The only difference is that instead of being sent to the miners, it will get sent to the coordinators.
But this small change -coordinators instead of miners- makes the whole difference. While miners can only include a limited amount of transactions in an Ethereum block, Coordinators can collect thousands of transactions, verify that they are valid and “roll them up” so they take almost no space. Once this “rollup” process is complete thanks to the magic of zero-knowledge proofs, they submit the proof that all transactions are valid to the Ethereum network.
Poof! We have compressed potentially thousands of transactions into one neat proof in the Ethereum blockchain, saving lots of gas and space! And, to make sure that anyone can verify the state of the Hermez Network and keep track of who has the money, coordinators also post the transaction data: Marta and Jessica’s addresses and the value transferred.
Now that Jessica has the funds in L2, she can transfer freely with anyone with a Hermez address. She could transfer to friends, or pay her coffee (when transaction fees are so cheap, Hermez makes sense as a payment network!), or offramp to fiat through a service that receives crypto in the Hermez Network. Eventually, she might want to withdraw from the Hermez network into L1, so let’s see how this would look like.
Withdrawal to L1
When Jessica needs, for whatever reason, to move her funds back to the Ethereum mainnet, she can tap on the “withdraw” button. After choosing how much to withdraw, she will be sending a transaction to the coordinator, which will update the smart contract with the balance that she can withdraw from it. She is then free to withdraw that amount from the SC in L1.
A view of what happens during these operations from the smart contract’s side can be found in this section of the docs for Hermez. These docs are a work in progress and will be updated according to any progress with the implementation.