Vitalik Buterin: The different types of ZK-EVMs

Vitalik ButerinPublicado a 2022-08-05Actualizado a 2022-08-05

Resumen

This post will attempt to describe a taxonomy of the different "types" of EVM equivalence, as well as the benefits and costs of trying to implement each type.

Special thanks to the PSE, Polygon Hermez, Zksync, Scroll, Matter Labs and Starkware teams for discussion and review.

There have been many "ZK-EVM" projects making flashy announcements recently. Polygon open-sourced their ZK-EVM project, ZKSync released their plans for ZKSync 2.0, and the relative newcomer Scroll announced their ZK-EVM recently. There is also the ongoing effort from the Privacy and Scaling Explorations team, Nicolas Liochon et al's team, an alpha compiler from the EVM to Starkware's ZK-friendly language Cairo, and certainly at least a few others I have missed.

The core goal of all of these projects is the same: to use ZK-SNARK technology to make cryptographic proofs of execution of Ethereum-like transactions, either to make it much easier to verify the Ethereum chain itself or to build ZK-rollups that are (close to) equivalent to what Ethereum provides but are much more scalable. But there are subtle differences between these projects, and what tradeoffs they are making between practicality and speed. This post will attempt to describe a taxonomy of different "types" of EVM equivalence, and what are the benefits and costs of trying to achieve each type.

Overview (in chart form)

Type 1 (fully Ethereum-equivalent)

Type 1 ZK-EVMs strive to be fully and uncompromisingly Ethereum-equivalent. They do not change any part of the Ethereum system to make it easier to generate proofs. They do not replace hashes, state trees, transaction trees, precompiles or any other in-consensus logic, no matter how peripheral.

Advantage: perfect compatibility

The goal is to be able to verify Ethereum blocks as they are today - or at least, verify the execution-layer side (so, beacon chain consensus logic is not included, but all the transaction execution and smart contract and account logic is included).

Type 1 ZK-EVMs are what we ultimately need make the Ethereum layer 1 itself more scalable. In the long term, modifications to Ethereum tested out in Type 2 or Type 3 ZK-EVMs might be introduced into Ethereum proper, but such a re-architecting comes with its own complexities.

Type 1 ZK-EVMs are also ideal for rollups, because they allow rollups to re-use a lot of infrastructure. For example, Ethereum execution clients can be used as-is to generate and process rollup blocks (or at least, they can be once withdrawals are implemented and that functionality can be re-used to support ETH being deposited into the rollup), so tooling such as block explorers, block production, etc is very easy to re-use.

Disadvantage: prover time

Ethereum was not originally designed around ZK-friendliness, so there are many parts of the Ethereum protocol that take a large amount of computation to ZK-prove. Type 1 aims to replicate Ethereum exactly, and so it has no way of mitigating these inefficiencies. At present, proofs for Ethereum blocks take many hours to produce. This can be mitigated either by clever engineering to massively parallelize the prover or in the longer term by ZK-SNARK ASICs.

Who's building it?

The Privacy and Scaling Explorations team ZK-EVM effort is building a Type 1 ZK-EVM.

Type 2 (fully EVM-equivalent)

Type 2 ZK-EVMs strive to be exactly EVM-equivalent, but not quite Ethereum-equivalent. That is, they look exactly like Ethereum "from within", but they have some differences on the outside, particularly in data structures like the block structure and state tree.

The goal is to be fully compatible with existing applications, but make some minor modifications to Ethereum to make development easier and to make proof generation faster.

Advantage: perfect equivalence at the VM level

Type 2 ZK-EVMs make changes to data structures that hold things like the Ethereum state. Fortunately, these are structures that the EVM itself cannot access directly, and so applications that work on Ethereum would almost always still work on a Type 2 ZK-EVM rollup. You would not be able to use Ethereum execution clients as-is, but you could use them with some modifications, and you would still be able to use EVM debugging tools and most other developer infrastructure.

There are a small number of exceptions. One incompatibility arises for applications that verify Merkle proofs of historical Ethereum blocks to verify claims about historical transactions, receipts or state (eg. bridges sometimes do this). A ZK-EVM that replaces Keccak with a different hash function would break these proofs. However, I usually recommend against building applications this way anyway, because future Ethereum changes (eg. Verkle trees) will break such applications even on Ethereum itself. A better alternative would be for Ethereum itself to add future-proof history access precompiles.

Disadvantage: improved but still slow prover time

Type 2 ZK-EVMs provide faster prover times than Type 1 mainly by removing parts of the Ethereum stack that rely on needlessly complicated and ZK-unfriendly cryptography. Particularly, they might change Ethereum's Keccak and RLP-based Merkle Patricia tree and perhaps the block and receipt structures. Type 2 ZK-EVMs might instead use a different hash function, eg. Poseidon. Another natural modification is modifying the state tree to store the code hash and keccak, removing the need to verify hashes to process the EXTCODEHASH and EXTCODECOPY opcodes.

These modifications significantly improve prover times, but they do not solve every problem. The slowness from having to prove the EVM as-is, with all of the inefficiencies and ZK-unfriendliness inherent to the EVM, still remains. One simple example of this is memory: because an MLOAD can read any 32 bytes, including "unaligned" chunks (where the start and end are not multiples of 32), an MLOAD can't simply be interpreted as reading one chunk; rather, it might require reading two consecutive chunks and performing bit operations to combine the result.

Who's building it?

Scroll's ZK-EVM project is building toward a Type 2 ZK-EVM, as is Polygon Hermez. That said, neither project is quite there yet; in particular, a lot of the more complicated precompiles have not yet been implemented. Hence, at the moment both projects are better considered Type 3.

Type 2.5 (EVM-equivalent, except for gas costs)

One way to significantly improve worst-case prover times is to greatly increase the gas costs of specific operations in the EVM that are very difficult to ZK-prove. This might involve precompiles, the KECCAK opcode, and possibly specific patterns of calling contracts or accessing memory or storage or reverting.

Changing gas costs may reduce developer tooling compatibility and break a few applications, but it's generally considered less risky than "deeper" EVM changes. Developers should take care to not require more gas in a transaction than fits into a block, to never make calls with hard-coded amounts of gas (this has already been standard advice for developers for a long time).

An alternative way to manage resource constraints is to simply set hard limits on the number of times each operation can be called. This is easier to implement in circuits, but plays much less nicely with EVM security assumptions. I would call this approach Type 3 rather than Type 2.5.

Type 3 (almost EVM-equivalent)

Type 3 ZK-EVMs are almost EVM-equivalent, but make a few sacrifices to exact equivalence to further improve prover times and make the EVM easier to develop.

Advantage: easier to build, and faster prover times

Type 3 ZK-EVMs might remove a few features that are exceptionally hard to implement in a ZK-EVM implementation. Precompiles are often at the top of the list here;. Additionally, Type 3 ZK-EVMs sometimes also have minor differences in how they treat contract code, memory or stack.

Disadvantage: more incompatibility

The goal of a Type 3 ZK-EVM is to be compatible with most applications, and require only minimal re-writing for the rest. That said, there will be some applications that would need to be rewritten either because they use pre-compiles that the Type 3 ZK-EVM removes or because of subtle dependencies on edge cases that the VMs treat differently.

Who's building it?

Scroll and Polygon are both Type 3 in their current forms, though they're expected to improve compatibility over time. Polygon has a unique design where they are ZK-verifying their own internal language called zkASM, and they interpret ZK-EVM code using the zkASM implementation. Despite this implementation detail, I would still call this a genuine Type 3 ZK-EVM; it can still verify EVM code, it just uses some different internal logic to do it.

Today, no ZK-EVM team wants to be a Type 3; Type 3 is simply a transitional stage until the complicated work of adding precompiles is finished and the project can move to Type 2.5. In the future, however, Type 1 or Type 2 ZK-EVMs may become Type 3 ZK-EVMs voluntarily, by adding in new ZK-SNARK-friendly precompiles that provide functionality for developers with low prover times and gas costs.

Type 4 (high-level-language equivalent)

A Type 4 system works by taking smart contract source code written in a high-level language (eg. Solidity, Vyper, or some intermediate that both compile to) and compiling that to some language that is explicitly designed to be ZK-SNARK-friendly.

Advantage: very fast prover times

There is a lot of overhead that you can avoid by not ZK-proving all the different parts of each EVM execution step, and starting from the higher-level code directly.

I'm only describing this advantage with one sentence in this post (compared to a big bullet point list below for compatibility-related disadvantages), but that should not be interpreted as a value judgement! Compiling from high-level languages directly really can greatly reduce costs and help decentralization by making it easier to be a prover.

Disadvantage: more incompatibility

A "normal" application written in Vyper or Solidity can be compiled down and it would "just work", but there are some important ways in which very many applications are not "normal":

Contracts may not have the same addresses in a Type 4 system as they do in the EVM, because CREATE2 contract addresses depend on the exact bytecode. This breaks applications that rely on not-yet-deployed "counterfactual contracts", ERC-4337 wallets, EIP-2470 singletons and many other applications.

Handwritten EVM bytecode is more difficult to use. Many applications use handwritten EVM bytecode in some parts for efficiency. Type 4 systems may not support it, though there are ways to implement limited EVM bytecode support to satisfy these use cases without going through the effort of becoming a full-on Type 3 ZK-EVM.

Lots of debugging infrastructure cannot be carried over, because such infrastructure runs over the EVM bytecode. That said, this disadvantage is mitigated by the greater access to debugging infrastructure from "traditional" high-level or intermediate languages (eg. LLVM).

Developers should be mindful of these issues.

Who's building it?

ZKSync is a Type 4 system, though it may add compatibility for EVM bytecode over time. Nethermind's Warp project is building a compiler from Solidity to Starkware's Cairo, which will turn StarkNet into a de-facto Type 4 system.

The future of ZK-EVM types

The types are not unambiguously "better" or "worse" than other types. Rather, they are different points on the tradeoff space: lower-numbered types are more compatible with existing infrastructure but slower, and higher-numbered types are less compatible with existing infrastructure but faster. In general, it's healthy for the space that all of these types are being explored.

Additionally, ZK-EVM projects can easily start at higher-numbered types and jump to lower-numbered types (or vice versa) over time. For example:

A ZK-EVM could start as Type 3, deciding not to include some features that are especially hard to ZK-prove. Later, they can add those features over time, and move to Type 2.

A ZK-EVM could start as Type 2, and later become a hybrid Type 2 / Type 1 ZK-EVM, by providing the possibility of operating either in full Ethereum compatibility mode or with a modified state tree that can be proven faster. Scroll is considering moving in this direction.

What starts off as a Type 4 system could become Type 3 over time by adding the ability to process EVM code later on (though developers would still be encouraged to compile direct from high-level languages to reduce fees and prover times)

A Type 2 or Type 3 ZK-EVM can become a Type 1 ZK-EVM if Ethereum itself adopts its modifications in an effort to become more ZK-friendly.

A Type 1 or Type 2 ZK-EVM can become a Type 3 ZK-EVM by adding a precompile for verifying code in a very ZK-SNARK-friendly language. This would give developers a choice between Ethereum compatibility and speed. This would be Type 3, because it breaks perfect EVM equivalence, but for practical intents and purposes it would have a lot of the benefits of Type 1 and 2. The main downside might be that some developer tooling would not understand the ZK-EVM's custom precompiles, though this could be fixed: developer tools could add universal precompile support by supporting a config format that includes an EVM code equivalent implementation of the precompile.

Personally, my hope is that everything becomes Type 1 over time, through a combination of improvements in ZK-EVMs and improvements to Ethereum itself to make it more ZK-SNARK-friendly. In such a future, we would have multiple ZK-EVM implementations which could be used both for ZK rollups and to verify the Ethereum chain itself. Theoretically, there is no need for Ethereum to standardize on a single ZK-EVM implementation for L1 use; different clients could use different proofs, so we continue to benefit from code redundancy.

However, it is going to take quite some time until we get to such a future. In the meantime, we are going to see a lot of innovation in the different paths to scaling Ethereum and Ethereum-based ZK-rollups.

Lecturas Relacionadas

Internet celebra la llegada de Noam, pero la factura de pérdidas de OpenAI suma otra página

El cofundador de OpenAI, Sam Altman, anunció la incorporación de Noam Shazeer, coautor del Transformer, como responsable de investigación de arquitectura. La noticia generó entusiasmo, pero coincide con la divulgación de datos financieros auditados que muestran graves pérdidas: en 2025, OpenAI tuvo ingresos de 13.070 millones de dólares, pero una pérdida operativa de 20.920 millones. El primer trimestre de 2026 consumió 3.700 millones en efectivo, más de la mitad de sus ingresos. La llegada de Shazeer sigue a la salida de varios miembros fundadores clave como Ilya Sutskever y Jan Leike, en un contexto donde los puestos de investigación han caído del 23% al 4.4% de las contrataciones desde 2021, señalando un cambio hacia prioridades de producto. El principal desafío de OpenAI no es técnico, sino financiero. Sus enormes costes incluyen 10.590 millones en alquiler de capacidad de cómputo a Microsoft y 7.500 millones en inferencia. Con 900 millones de usuarios semanales pero solo 50 millones de pagantes, su modelo de negocio es insostenible. Mientras, competidores como Anthropic, con un enfoque en clientes empresariales, están cerca de la rentabilidad. La contratación de Shazeer parece una movida estratégica para fortalecer la narrativa ante una posible OPV y una valoración billonaria, más que una solución a sus problemas de flujo de caja. Con un ritmo de quema de efectivo actual, el tiempo se agota antes de que cualquier avance arquitectónico futuro pueda marcar la diferencia.

marsbitHace 14 min(s)

Internet celebra la llegada de Noam, pero la factura de pérdidas de OpenAI suma otra página

marsbitHace 14 min(s)

¿«Poseer» o «alquilar» inteligencia? El nuevo problema de las startups de IA

La plataforma de IA Mythos fue cerrada esta semana, lo que ha llevado a muchos emprendedores a reflexionar sobre un problema central: cuando el núcleo de un producto se basa en modelos y plataformas externas, ¿qué posee realmente la empresa? En los últimos años, los modelos de código abierto se han discutido principalmente en términos de coste como alternativas más baratas a los modelos líderes. Sin embargo, el artículo argumenta que la variable crucial no es el coste, sino el control. Para una empresa de IA, el uso de APIs de modelos líderes permite lanzar productos rápidamente y reducir la barrera técnica, pero también significa que sus capacidades centrales pueden verse afectadas por cambios en las reglas, precios, estrategias o incluso la disponibilidad del proveedor. El artículo propone que "poseer inteligencia" no implica renunciar a los modelos líderes, sino que las empresas deben integrar sus datos, flujos de trabajo, conocimiento del dominio, estándares de evaluación y casos límite en un sistema de modelos controlable. La competencia futura en IA podría caracterizarse por múltiples "frentes": modelos líderes generales, modelos especializados con entrenamiento posterior basado en datos propios, modelos verticales específicos y sistemas de enrutamiento que coordinen múltiples modelos. El cierre de Mythos sirve como recordatorio: la verdadera ventaja competitiva en la era de la IA no es solo acceder al modelo más potente, sino la capacidad de convertir la inteligencia en un activo propio de la empresa.

marsbitHace 34 min(s)

¿«Poseer» o «alquilar» inteligencia? El nuevo problema de las startups de IA

marsbitHace 34 min(s)

Tendencias del Mercado Estadounidense (19 de junio): El acuerdo EE.UU.-Irán se materializa y retrocede la prima geopolítica, los chips brillan con nuevos máximos mientras el sector energético lidera las caídas

**Resumen del mercado estadounidense (19 de junio): Los chips marcan un récord, la energía cae tras el acuerdo con Irán.** Los principales índices se recuperaron el jueves. El acuerdo temporal entre EE.UU. e Irán, que permitió el paso de petroleros por el Estrecho de Ormuz, alivió la tensión geopolítica y contrarrestó el impacto de las declaraciones restrictivas de la FOMC. El S&P 500 subió un 1,08% y el Nasdaq un 1,91%. El índice de semiconductores de Filadelfia se disparó más de un 6%, alcanzando un máximo histórico, impulsado por noticias sobre acuerdos de fabricación entre Apple e Intel, así como por la sólida lógica de inversión en IA. En contraste, el sector energético fue el único perdedor importante, cayendo junto con el precio del petróleo (el WTI bajó un 2%) al desaparecer la prima de riesgo geopolítico. Mientras tanto, SpaceX cayó por segundo día consecutivo ante informes de una posible emisión de bonos de 20.000 millones de dólares. El VIX cayó bruscamente, indicando que el pánico inicial tras la FOMC se disipó rápidamente. Los rendimientos de los bonos a largo plazo bajaron ligeramente. El foco del mercado ahora está en los próximos datos del PCE y los resultados de Micron, que pondrán a prueba la resiliencia de la recuperación actual y las perspectivas de los tipos de interés.

marsbitHace 37 min(s)

Tendencias del Mercado Estadounidense (19 de junio): El acuerdo EE.UU.-Irán se materializa y retrocede la prima geopolítica, los chips brillan con nuevos máximos mientras el sector energético lidera las caídas

marsbitHace 37 min(s)

¿Entrará MicroStrategy en una espiral de muerte? ¿Cómo será el panorama macroeconómico en la segunda mitad del año?

El inversionista en tecnología de vanguardia, Didier, analiza la reciente caída de Bitcoin, atribuyéndola principalmente a la presión estructural de la estrategia financiera de MicroStrategy (ahora Strategy) y no solo a factores macro o ETF. Didier explica que el mercado ha comenzado a descontar la expectativa de que MicroStrategy venderá pequeñas cantidades de Bitcoin de forma continua para cubrir dividendos de acciones preferentes y gastos de intereses, bajo su principio de mantener neutralidad en "Bitcoin por acción". Considera que esto es un experimento financiero de Michael Saylor para probar la capacidad de absorción del mercado, y aunque podría causar presión, es improbable que desencadene una "espiral de la muerte" a menos que se combinen con nuevos shocks macro. Sobre el auge de la IA en el mercado de valores estadounidense, Didier sostiene que el token se está convirtiendo en la nueva fuerza laboral, reemplazando el trabajo humano en muchos servicios ejecutivos y de conocimiento. Esto está reestructurando las empresas, aumentando la automatización y la rentabilidad, y beneficiando de manera sostenible a la cadena de suministro de IA (módulos ópticos, semiconductores). Señala que la economía de las máquinas está apenas comenzando. Respecto a que los exchanges de criptomonedas ofrezcan acciones estadounidenses, Didier lo ve como una evolución natural hacia activos del mundo real con valor, y no necesariamente como una fuga de capitales del ecosistema cripto. Cree que los usuarios no necesitan cambiar drásticamente su lógica de inversión, ya que pueden encontrar en Wall Street activos con características similares (value, growth, meme) a las de las criptomonedas. Didier atribuye el fin del ciclo de especulación con altcoins principalmente al severo daño en la liquidez causado por el evento del "1011", que habría destruido cientos de miles de millones en efectivo real. En su perspectiva macroeconómica para el segundo semestre, Didier se muestra más cauteloso debido a posibles incertidumbres, como grandes salidas a bolsa (SpaceX, OpenAI) que podrían presionar la liquidez del mercado, y el resultado de las elecciones intermedias en EE.UU. Sin embargo, mantiene una visión positiva a largo plazo tanto para la IA como para la convergencia entre IA y blockchain, anticipando una economía automatizada y más madura entre máquinas en la cadena.

marsbitHace 39 min(s)

¿Entrará MicroStrategy en una espiral de muerte? ¿Cómo será el panorama macroeconómico en la segunda mitad del año?

marsbitHace 39 min(s)

Trading

Spot
Futuros
活动图片