Kakarot zkEVM (opens in a new tab) is an implementation of the Ethereum Virtual Machine (opens in a new tab) (EVM) written in Cairo. Cairo is a Turing-complete language associated with the CairoVM. The CairoVM enables provable compute by leveraging polynomials and the ZK-STARK proof system (opens in a new tab). A zkEVM is characterised by its ability to generate provable transactions, and thus provable blocks. Kakarot being built on top of the CairoVM, every transaction executed on Kakarot is provable.

Kakarot zkEVM enables teams to build & deploy EVM apps. Developers can deploy any Solidity (or EVM code) on Kakarot, as they would on Ethereum or Polygon. Their end-users are then able to interact with dApps with their usual toolchain (Metamask, Wallet connect, etc.).

Ultimately, Kakarot will provide interoperability with native Starknet protocols and composability between protocols, for instance, combining TVL in DeFi and user base in GameFi.

Fractal Scaling

Kakarot zkEVM can exist in different forms. Firstly, it can be deployed as a smart-contract on top of Starknet L2 and thus expose an EVM (Ethereum RPC, Ethereum transactions, etc.) on Starknet.

Alternatively, Kakarot can be integrated into a stack to deploy L3 zkEVMs. This is where Madara comes in.

By combining Madara (a Starknet full node) and Kakarot (an EVM runtime), one is able to create a L3 zkEVM. The stack is the following: a substrate full node, that uses the CairoVM as its execution engine, and Kakarot as a runtime for smart contracts. Transactions on Kakarot can be proven and verified on a settlement layer, resulting in EVM compatible fractal scaling.


Phase 1: Kakarot zkEVM on Starknet - Bring the EVM to Starknet

Kakarot will start by existing as an enshrined EVM inside Starknet L2. This will enable developers to deploy their Solidity (or any EVM-compatible language) smart contracts on top of Starknet.

Phase 2: Kakarot x Madara - L3 zkEVMs

Kakarot and Madara will be combined into a unified stack to enable L3 zkEVMs - and L4, L5, etc. Teams will be able to deploy their zkEVM app-chains, and leverage validity proofs to settle transactions on Starknet. Gas costs will be exponentially lower than on L2, and performance (TPS) will be higher. This is in addition to the scalability perks of Starknet and zkRollups in general.

Phase 3: Kakarot x Madara - type 1 zkEVM

Kakarot and Madara can also be combined to enable type 1 zkEVMs. If one is able to:

  1. Write the Ethereum consensus rules in Cairo inside the Madara x Kakarot full node, thus proving L1 consensus.
  2. Switch from Pedersen Merkle Patricia Trie (MPT) to Keccak MPT.

Then, Kakarot would become a type 1 zkEVM client, able to prove L1 blocks. This is a more advanced use-case that depends on Ethereum's roadmap, most notably the Verge (opens in a new tab). After the Verge, keccak might be replaced by poseidon as the hash function of choice for Ethereum.

Additional research topics

  • Madara enables Kakarot chains to leverage the substrate messaging protocol for cross-rollups communication.
  • Substrate's modularity enables Kakarot chains to innovate with their consensus protocol.
  • Substrate's forkless runtime upgrades enable Kakarot chains to upgrade the version of their EVM without hard forks.