Skip to main content

Welcome to FHEVM Bootcamp

Build smart contracts where data stays encrypted during computation. No decryption needed. No trusted third parties. Just math.

What you’ll learn

This comprehensive, hands-on training program teaches you to design, develop, audit, and deploy FHE-powered smart contracts using Zama’s fhEVM stack and the latest FHE Solidity library.

Quick start

Get up and running in under 10 minutes

Installation

Detailed setup instructions for your development environment

Curriculum overview

Explore the full 4-week, 20-module program

Learning paths

Choose your pace: intensive, part-time, or self-paced

What is FHEVM?

FHEVM brings Fully Homomorphic Encryption (FHE) to the Ethereum Virtual Machine. It allows smart contracts to operate on encrypted data without ever decrypting it. This enables a new class of on-chain applications where sensitive data—balances, votes, bids, medical records—remains confidential throughout the entire computation lifecycle.

Your first encrypted contract

Here’s what a simple encrypted contract looks like:
HelloFHEVM.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import { FHE, euint32 } from "@fhevm/solidity/lib/FHE.sol";
import { ZamaEthereumConfig } from "@fhevm/solidity/config/ZamaConfig.sol";

contract HelloFHEVM is ZamaEthereumConfig {
    euint32 private secretNumber;

    function setSecret(externalEuint32 encryptedValue, bytes calldata inputProof) external {
        secretNumber = FHE.fromExternal(encryptedValue, inputProof);
        FHE.allowThis(secretNumber);
    }

    function addToSecret(externalEuint32 encryptedValue, bytes calldata inputProof) external {
        euint32 input = FHE.fromExternal(encryptedValue, inputProof);
        secretNumber = FHE.add(secretNumber, input);
        FHE.allowThis(secretNumber);
    }
}
This contract stores an encrypted number and performs addition on it—all without ever revealing the value.

Program structure

The bootcamp consists of 20 modules organized into a 4-week progressive program:
1

Week 1: Foundation & operations

Master FHE fundamentals, encrypted types, and all operations (arithmetic, bitwise, comparison)
2

Week 2: Core patterns

Learn access control, encrypted inputs, decryption patterns, conditional logic, and randomness
3

Week 3: Applications & testing

Build confidential tokens, voting systems, and auctions. Master testing and debugging
4

Week 4: Mastery & capstone

Optimize gas usage, apply security best practices, explore DeFi patterns, and build your capstone DAO

What makes this bootcamp unique

35 production contracts

All deployed and verified on Ethereum Sepolia testnet

328 passing tests

Comprehensive test coverage demonstrating best practices

Hands-on exercises

20 modules with starter templates and complete solutions

Real-world projects

Build confidential ERC-20 tokens, voting systems, auctions, and a DAO

Technology stack

LayerTechnology
Encryption libraryZama TFHE-rs (underlying FHE engine)
Solidity library@fhevm/solidity (FHE library)
ConfigurationZamaEthereumConfig base contract
Development frameworkHardhat + fhEVM plugin
TestingHardhat test / Foundry (mock mode)
Frontend encryption@zama-fhe/relayer-sdk (Relayer SDK)
NetworkEthereum Sepolia / local fhEVM node

Key FHE operations

The bootcamp uses the new FHEVM API throughout:
// Imports
import { FHE, euint32, ebool } from "@fhevm/solidity/lib/FHE.sol";
import { ZamaEthereumConfig } from "@fhevm/solidity/config/ZamaConfig.sol";

// Convert external encrypted input
euint32 value = FHE.fromExternal(externalEncryptedInput, inputProof);

// Arithmetic
euint32 sum = FHE.add(a, b);
euint32 product = FHE.mul(a, b);

// Comparison
ebool isGreater = FHE.gt(a, b);

// Conditional selection (encrypted ternary)
euint32 result = FHE.select(condition, valueIfTrue, valueIfFalse);

// Access control
FHE.allowThis(encryptedValue);
FHE.allow(encryptedValue, addressToAllow);

// Random number generation
euint32 rand = FHE.randEuint32();

Learning outcomes

By completing this bootcamp, you will be able to:
  • Design and implement confidential smart contracts using FHEVM
  • Manage encrypted types (ebool, euint8-euint256, eaddress)
  • Perform operations on encrypted data without decryption
  • Implement proper access control for encrypted values
  • Build complete dApps with encrypted frontend integration
  • Test and debug FHE contracts effectively
  • Optimize gas costs for FHE operations
  • Apply security best practices for confidential contracts
  • Build production-ready confidential DeFi applications

Assessment system

ComponentWeightDescription
Quizzes20%End-of-module knowledge checks (multiple choice + short answer)
Exercises40%Hands-on coding exercises graded on correctness, style, and security
Capstone project40%Original FHE application with documentation and presentation
Passing score: 70% overall, with at least 60% in each component.
All 328 tests run locally in mock FHE mode—no testnet connection needed for development.

Ready to start?

Quick start guide

Get set up in 10 minutes

Full installation

Detailed environment setup

Resources

This curriculum uses the new FHEVM API with the FHE library, externalEuintXX types, and FHE.fromExternal(value, proof). Ensure you’re using @fhevm/solidity version 0.10.0 or later.

Build docs developers (and LLMs) love