fhevm
by
zama-ai

Description: FHEVM, a full-stack framework for integrating Fully Homomorphic Encryption (FHE) with blockchain applications

View zama-ai/fhevm on GitHub ↗

Summary Information

Updated 9 minutes ago
Added to GitGenius on September 12th, 2025
Created on May 2nd, 2025
Open Issues/Pull Requests: 69 (-1)
Number of forks: 2,240
Total Stargazers: 25,753 (+0)
Total Subscribers: 120 (+0)
Detailed Description

The Zama-ai/fhevm repository represents a groundbreaking project focused on bringing fully homomorphic encryption (FHE) to the Ethereum Virtual Machine (EVM). Essentially, it aims to enable computation on encrypted data *within* the EVM, meaning smart contracts can operate on sensitive information without ever decrypting it. This has massive implications for privacy-preserving decentralized applications (dApps). The core idea is to compile Solidity code into an FHE-compatible format and execute it using a specialized EVM implementation built on top of Zama’s TFHE library, a leading FHE scheme. This isn't a layer-2 solution or a sidechain; it's a direct attempt to modify the EVM itself to natively support encrypted computation.

The project's architecture is complex, involving several key components. First, a Solidity compiler plugin transforms standard Solidity code into an intermediate representation (IR) suitable for FHE. This IR is then optimized specifically for the constraints of FHE computation, which is significantly different from traditional execution. Crucially, not all Solidity code is directly FHE-compatible. The compiler identifies and flags unsupported operations, requiring developers to adapt their contracts. Next, a custom EVM, dubbed "fhevm," executes this FHE-compiled code. This EVM leverages Zama’s TFHE library for the actual encrypted computations. The repository also includes tools for bootstrapping and testing the system, including a simulated environment for development and a set of example contracts. A significant portion of the work focuses on minimizing the performance overhead introduced by FHE, which is notoriously slow compared to plaintext computation.

Currently, fhevm is in an early stage of development, focusing on a subset of the EVM instruction set. The project prioritizes supporting arithmetic operations, comparisons, and basic control flow, as these are fundamental to many smart contract applications. More complex features like storage access and external calls are being actively researched and implemented. The team is tackling the challenges of FHE-compatible storage, which is a major bottleneck, and exploring techniques to reduce the ciphertext expansion inherent in FHE. The repository contains detailed documentation outlining the supported features, limitations, and development roadmap. It also provides guidance for developers interested in writing FHE-compatible Solidity contracts.

A key aspect of the project is its commitment to standardization and interoperability. The team is actively involved in discussions with the Ethereum community to define standards for FHE-compatible smart contracts and EVM extensions. They aim to create a system that can be integrated with existing Ethereum infrastructure and tooling. The repository includes specifications for the FHE-compatible IR and the fhevm EVM, promoting transparency and collaboration. Furthermore, Zama provides a Rust library for TFHE, allowing developers to build FHE applications outside of the EVM context.

In summary, fhevm is a pioneering effort to bring privacy to the Ethereum blockchain by enabling computation on encrypted data directly within the EVM. While still under development and facing significant technical challenges, it represents a potentially transformative technology for dApps requiring strong data privacy, such as decentralized finance (DeFi), supply chain management, and voting systems. The repository provides a comprehensive set of tools and documentation for researchers and developers interested in exploring the possibilities of FHE on Ethereum.

fhevm
by
zama-aizama-ai/fhevm

Repository Details

Fetching additional details & charts...