The latest Layer 2 scaling solution scaling Ethereum dapps on zkEVMs
Nowadays, zkEVMs are coming up in the Blockchain space. This is the latest happening Ethereum layer 2 scaling solution that uses ZK rollups to achieve scalability.
Let’s understand how zkEVMs work to bring about scalability to L1 Ethereum Blockchain.
L1 Ethereum’s execution environment is EVM, the Ethereum Virtual Machine. zkEVM is a Virtual Machine that is compatible to EVM. This means that Ethereum Smart Contracts, developer tools, wallets and token standards that work on Ethereum will also work on zkEVM.
So, Smart contract codes written using solidity programming language will execute on zkEMV. Developers who use Ethereum developer tools to create dapps, can deploy those dapps on zkEMV without requiring to make much modifications. The benefit of using zkEVMs is that Ethereum dappsjust as they are without modifications become scalable on zkEVMs!!
Ethereum’s major computational load of processing transaction executions removed by zkEMV
zkEMVs free up load on Ethereum as transactions get executed on zkEVM, so Ethereum’s computational power resource and Block space is saved from this performing this major task. Execution of transactions on zkEVM happens on its run time/ execution environment.
Proof of Executed transactions on zkEVM are send to Ethereum for settlement
zkEMVs send proof of executed transactions to Ethereum via Roll Ups
However, the transactions that are executed here are settled only on L1 Ethereum. So, zkEVM’s proving circuit produces ZK proof or validity proof that would prove with cryptographic certainty that transactions were executed correctly following protocol rules.
Now, all the executed transaction data will be bundled along with the corresponding validity proofs to be submitted to L1 Ethereum.
Thousands of compressed executed transaction data along with validity proofs will be batched together and attached into a ZK Rollup. This ZK Rollup will be sent to the LI Ethereum Verifier Smart Contract, which will verify the contents on the ZK Rollup.
Here the validity of the transactions is verified and confirmed, for final settlement of transactions. Finality of transactions happens instantly. So, transactions get executed faster without making any compromise on security as L1 Ethereum remains the settlement layer for all transactions that happen on zkEVMs.
State transition of zkEMV happens only when transactions are settled on Ethereum
*Whenever, new data in form of new blocks is added to EVM or zk-EMVs they undergo State Transitions, where the virtual machines transition from their old initial State to their updated new State. *
Here, the virtual machines undergo changes with updates taking place to their core components of memory, storage and stack as new data is written on to them.
So, these validity proofs that’s submitted by zkEVM recommend State change which will happen only after the L1 Ethereum verifier Smart Contract confirms the validity of submitted ZK proofs and other data which as explained form the contents of the ZK Rollups.
State Change would then happen both on Ethereum and zkEVM this way.
Storage of executed transaction data on zkEVMs save EVM’s storage space
Now, we have evaluated how zkEVMs increase the scalability of Ethereum by taking on the computational load of processing transaction executions. However, they also save up storage space of Ethereum’s Virtual Machine as storage of full executed transaction data is taken off Ethereum and is stored on zkEVM.
Whatever data which is written on Ethereum Virtual Machine is in a compressed form and stored as CALLDATA. Ethereum Smart Contracts will fetch data making external calls to zkEVM and publish the function of the called Data publishing all inputs. This stored compressed data is light but is sufficient to re-evaluate the State of the Rollup.
Since, the submitted ZK proofs in the ZK Rollup provide sufficient evidence to prove that transactions were executed on zkEVM, the ZK Rollups can afford to submit just final States to Ethereum Blockchain.
In contrast, optimistic rollups have to publish all transaction data processed off chain on to the Ethereum main chain because they don’t provide validity proofs like ZK Rollups do.
Therefore, ZK Rollups reduce costs of posting data on-chain, as it’s done in a compressed fashion. So, dapps developed here are cheaper for users to use.
Summing up the benefits of using zkEVM for Ethereum ecosystem users and developers
zkEVM makes it possible for existing Ethereum dapps to function in a scalable fashion with low fees.
This grows the Ethereum Ecosystem and multiplies Ethereum’s Network effects as users instead of exiting Ethereum Ecosystem due to high fees would opt to stay there using those dapps on zkEVMs instead.
Besides, Ethereum developers can continue to develop dapps using the same Ethereum Smart Contract code and tools, as they will function on zkEVM in a scalable fashion.
On zkEVM’s there is instant transaction finality without compromising on security as Ethereum remains the settlement layer for executed transactions.
This is a huge advantage over scaling solutions like Optimistic Rollups that has slow transaction finality of a 2 week period.
During this delay period anyone can dispute the validity of a submitted transaction. Users will not be able to withdraw their funds from Optimistic Rollups until this challenge period gets over.
Besides this as already discussed Optimistic Rollups have to write all details of executed transactions on Ethereum Chain, taking up EVM’s storage space.
The End…
Thankyou for reading!!
You can read my Articles in these platforms -:
Publish0x - https://www.publish0x.com/@greenchic
Medium - https://medium.com/@kikctikcy