Mundus Security Technical Blog
Web3 New Tech Overviews

What You Need to Know About Popular zkEVM Solutions

The landscape of blockchain technology has witnessed significant growth, with Ethereum at the forefront of this expansion. However, the issue of scalability persists, and novel solutions such as zkEVMs, namely Scroll, Polygon zkEVM, zkSync, and StarkNet, are emerging as potential solutions. It is critical to precisely understand these terms and their implications in the world of blockchain technology.

Check out our website and please join our community!

Twitter

Telegram

Website

Looking for audit, let's talk

The Semantics of 'zk' in the Context of Blockchain Technology

The realm of web3 is laden with industry-specific terminology, some of which might lack the precision required for clear communication. For instance, 'zk' in the context of zkTech typically refers to the succinctness property of zero-knowledge proofs, often used synonymously with 'validity rollups'. Notably, Aztec is the sole zk solution that integrates privacy as a feature. While 'zk' has become a consensual term in the web3 domain, the term 'validity' is inherently more accurate. You could find more details about Aztec in our overview of LEO and NOIR language .

An Overview of zkEVMs

zkEVM, an abbreviation for Zero-Knowledge Ethereum Virtual Machine, is a term that has gained traction in recent times. It is pivotal to understand that no current zkEVM solution fully achieves Ethereum/EVM equivalence or compatibility. These are solutions that are striving towards this goal. The primary contenders in this space include Scroll, Polygon zkEVM, zkSync, and StarkNet.

The Pursuit of EVM Compatibility: A Comparison of Bytecode and Language Level Approaches

Scroll and Polygon zkEVM have chosen the path of bytecode compatibility, while zkSync and StarkNet have opted for language-level compatibility.

Bytecode Compatibility: An Overview of Scroll and Polygon zkEVM

Bytecode compatibility aims to replicate the bytecode level of the Ethereum Virtual Machine (EVM). This methodology allows developers to transpile Solidity or Vyper code into bytecode, following which they can confirm the validity of execution within the zk circuit. The primary advantage of this approach is the elimination of the need for additional tools or specialized compiler versions.
However, this process is not without its challenges. The EVM is intrinsically slow and not particularly friendly to zk, requiring substantial computational resources to validate a zk circuit. However, this issue can be mitigated using ZKP hardware such as GPUs, FPGAs, and ASICs.

Language-Level Compatibility: An Overview of zkSync and StarkNet

In contrast, language-level compatibility targets the LLVM as opposed to the EVM. This approach necessitates the use of an interpreter or compiler that emulates the functions of EVM bytecode but does not wholly equate to EVM equivalent bytecode. Consequently, language-compatible zkEVMs compile Solidity or Vyper into bytecode targeting an LLVM. This compatibility level is essential due to its implications on security and tooling, which often face trade-offs due to the added complexity inherent in language-level compatibility. If you are looking for more information about zkSync, you could find it in our article "Everything you need to know about zkSync".

The Trade-offs: A Delicate Balance Between Performance and Compatibility

As with many aspects of technology, the pursuit of EVM compatibility involves trade-offs. An increase in EVM compatibility often results in a corresponding decrease in performance. This relationship can be attributed to the EVM's inherent unresponsiveness to zk and its relatively slow speed. Increasing compatibility often means compromising on performance. However, as previously mentioned, certain hardware can help mitigate this issue.
bytecode vs llvm comparison
It terms of comparison between Compatibility and Performance Vitalik Buterin created the following scheme.You can see that StarkNet is the least compatible with EVM and has the best performance.
zksync compatability

The Importance of Smart Contract Auditing, Particularly for the LLVM Approach

As we delve deeper into the world of blockchain technology and specifically, into the realm of zkEVMs, one aspect that cannot be overlooked is the importance of smart contract auditing, especially for solutions taking the LLVM approach.
Smart contract auditing is a critical step in the development and deployment of blockchain solutions. It involves a thorough review of a smart contract’s code by experts to ensure that it is free of bugs, vulnerabilities, and inconsistencies. The purpose is to verify the contract's functionality, confirm that it behaves as intended, and identify any potential security issues.
For solutions employing the LLVM approach, such as zkSync and StarkNet, smart contract auditing becomes even more crucial. The LLVM approach involves additional layers of complexity due to the use of an interpreter or compiler that mirrors all the functions of EVM bytecode. This complexity increases the potential for errors and vulnerabilities.
In this context, a smart contract audit can serve as an essential checkpoint. It can help uncover any discrepancies or vulnerabilities in the early stages, thus allowing developers to rectify them before deployment. This proactive measure significantly reduces the risk of security breaches and the resulting financial and reputational damage.
Moreover, smart contract audits can contribute to transparency and trust in the blockchain ecosystem. By demonstrating that a smart contract has undergone rigorous testing and inspection, developers can assure users and stakeholders of the contract's reliability and security.
In an industry where security breaches and hacks can result in significant financial loss and damage to reputation, smart contract auditing emerges as an essential practice. It is a proactive measure that can save countless hours of damage control, financial resources, and most importantly, maintain users' trust.
If you are looking for support with deployment, check out our proprietary service: Deployment Check. We would be happy to discuss any of your security audit and deployment requests. Let's talk

Conclusion

To summarize, zkEVMs represent the forefront of solutions seeking to resolve Ethereum's scalability issue. However, it is of utmost importance to differentiate between ETH equivalence, EVM equivalence, bytecode compatibility, and language-level compatibility—distinct concepts that are often confused.
Bytecode-compatible zkEVMs, such as Scroll and Polygon zkEVM, employ a direct approach, enabling developers to leverage existing tools. Language-level compatible zkEVMs, like zkSync and StarkNet, while less EVM-compatible, offer unique features.
In the critical arena of blockchain scalability, these zkEVM solutions are leading the charge. However, as in any complex field, strategies, trade-offs, and challenges abound. One such challenge, especially pertinent in the LLVM approach, is the increased complexity, which makes the role of smart contract auditing all the more critical. Auditing not only ensures that smart contracts function as intended, but also boosts the transparency and trust in the system, thereby contributing to the growth and stability of the blockchain ecosystem.
The web3 sector is evolving rapidly, and staying informed requires not only knowing the key players but also understanding the intricacies of the technologies they employ. For developers, investors, and observers alike, it is important to critically assess these developments. While the future of this field holds great promise, it is not without potential pitfalls. Staying informed, vigilant, and ready to adapt is crucial in this dynamic space.

Check out our website and please join our community!

Twitter

Telegram

Website

Looking for audit, let's talk