Skip to main content

Curriculum overview

The FHEVM Bootcamp is a comprehensive, hands-on training program consisting of 20 modules organized into a 4-week progressive curriculum. Each module includes lecture content, code examples, hands-on exercises, and assessments.

Program structure

Total duration: ~63 hours (~16 hours/week over 4 weeks)
WeekThemeModulesHoursMilestone
Week 1Foundation & operations00-04~12hEncrypted Calculator homework
Week 2Core patterns05-09~14hEncrypted Vault homework
Week 3Applications & testing10-14~18hToken + Voting homework
Week 4Mastery & capstone15-19~19hCapstone DAO project
Each week ends with a homework assignment with formal grading criteria.

Assessment system

The bootcamp uses a comprehensive assessment framework:
ComponentWeightDescription
Quizzes20%End-of-module knowledge checks (multiple choice + short answer)
Exercises40%Hands-on coding graded on correctness (50%), code quality (25%), and security (25%)
Capstone project40%Original FHE application with contracts, tests, documentation, and presentation

Passing requirements

  • Overall score of 70% or higher
  • Minimum 60% in each component
  • Capstone must compile, deploy, and pass all provided test cases

Grading scale

GradeRange
Distinction90-100%
Merit80-89%
Pass70-79%
FailBelow 70%

Module breakdown

Week 1: Foundation & operations

Level: BeginnerDescription: Foundational Solidity knowledge and development tooling basics. Covers types, functions, modifiers, mappings, events, and Hardhat setup.Learning objectives:
  • Write basic Solidity contracts using mappings, structs, modifiers, and events
  • Compile and deploy contracts using Hardhat
  • Explain why public blockchains leak information
  • Describe encryption types at a high level
  • Set up a working Node.js development environment
Topics: Solidity review, Hardhat project structure, blockchain privacy motivationContract: SimpleStorage.sol, BasicToken.sol
Level: BeginnerDescription: Cryptographic foundations of Fully Homomorphic Encryption. Build intuition for why FHE is transformative for blockchain privacy.Learning objectives:
  • Explain what “fully homomorphic” means
  • Identify core FHE schemes (BGV, BFV, CKKS, TFHE) and trade-offs
  • Articulate why FHE solves problems that ZK proofs and TEEs cannot
  • Describe the noise budget concept
  • Explain fhEVM architecture at a high level
Topics: FHE history, TFHE scheme, noise management, FHE vs ZK vs TEE, fhEVM introduction
Level: BeginnerDescription: Complete fhEVM development environment setup. Deploy and interact with your first encrypted contract.Learning objectives:
  • Set up Hardhat with the fhEVM plugin
  • Diagram the fhEVM architecture (coprocessor, gateway, on-chain components)
  • Explain the role of the global FHE key and ACL system
  • Deploy and interact with an encrypted contract
  • Describe the lifecycle of an encrypted transaction
Topics: fhEVM architecture, coprocessor model, key management, ZamaEthereumConfig, Relayer SDKContract: HelloFHEVM.sol
Level: BeginnerDescription: Master all encrypted types from ebool to euint256 and eaddress. Learn type fundamentals, casting, and storage patterns.Learning objectives:
  • List all encrypted types and their plaintext equivalents
  • Declare and initialize encrypted state variables
  • Cast between encrypted types using FHE.asEuintXX()
  • Explain overflow/wrapping behavior
  • Choose the appropriate encrypted type for use cases
Topics: All encrypted types, type casting, wrapping behavior, storage patterns, gas implicationsContracts: EncryptedTypes.sol, TypeConversions.sol
Level: IntermediateDescription: Master the full set of operations on encrypted types: arithmetic, bitwise, shift, comparison, and min/max.Learning objectives:
  • Perform arithmetic operations (FHE.add, sub, mul, div, rem)
  • Apply bitwise and shift operations
  • Use all comparison operators (return ebool)
  • Use FHE.min, FHE.max, and FHE.neg
  • Mix encrypted and plaintext operands
Topics: Arithmetic, bitwise, shift, comparison operations, mixed operands, gas costs, operation chainingContracts: ArithmeticOps.sol, BitwiseOps.sol, ComparisonOps.sol
Week 1 homework: Encrypted Calculator — build a contract performing all FHE operations with comprehensive tests.

Week 2: Core patterns

Level: IntermediateDescription: The ACL system is fundamental to fhEVM security. Master the full ACL API and permission patterns.Learning objectives:
  • Explain why ACLs are necessary
  • Use FHE.allow() and FHE.allowThis() for persistent permissions
  • Use FHE.allowTransient() for temporary access
  • Design correct permission flows for multi-party interactions
  • Debug common ACL errors
Topics: ACL purpose, persistent vs transient permissions, multi-contract ACL flows, permission patterns, debuggingContracts: ACLDemo.sol, MultiUserVault.sol
Level: IntermediateDescription: Learn the full input pipeline from client-side encryption to contract processing using externalEuintXX types.Learning objectives:
  • Encrypt values client-side using Relayer SDK
  • Receive and convert inputs using FHE.fromExternal(value, proof)
  • Implement input validation for encrypted values
  • Handle multiple encrypted inputs
  • Explain security properties of input encryption
Topics: Client-side encryption with Relayer SDK, externalEuintXX types, FHE.fromExternal(), ZKP proofs, input validationContract: SecureInput.sol
Level: IntermediateDescription: Learn when and how to reveal encrypted results using FHE.makePubliclyDecryptable() and user-specific decryption.Learning objectives:
  • Use FHE.makePubliclyDecryptable() for on-chain reveal
  • Use ACL + instance.userDecrypt() for user-specific decryption
  • Understand the deprecated Gateway callback pattern (historical context)
  • Evaluate privacy implications of decryption strategies
  • Design contracts that minimize unnecessary decryption
Topics: Public decryption, re-encryption for users, asynchronous decryption, privacy analysis, design patternsContracts: PublicDecrypt.sol, UserDecrypt.sol
Level: IntermediateDescription: Master branchless conditional logic using FHE.select() as an encrypted ternary operator.Learning objectives:
  • Use FHE.select(ebool, valueIfTrue, valueIfFalse) for conditionals
  • Combine encrypted booleans with FHE.and, or, xor, not
  • Refactor branching logic into branchless patterns
  • Implement multi-condition encrypted logic chains
  • Apply the “compute both paths, select the result” pattern
Topics: Why if doesn’t work on encrypted values, FHE.select pattern, boolean logic, nested selects, refactoring guideContracts: ConditionalDemo.sol, EncryptedMinMax.sol
Level: IntermediateDescription: fhEVM provides built-in encrypted random number generation. Learn security properties and use cases.Learning objectives:
  • Generate encrypted random numbers using FHE.randEuintXX()
  • Explain security properties (unpredictability, privacy)
  • Use encrypted randomness in gaming, lotteries, random selection
  • Apply range reduction techniques
  • Identify common pitfalls
Topics: FHE.randEuintXX(), FHE.randEbool(), security model, range reduction, use cases, best practicesContracts: RandomDemo.sol, EncryptedLottery.sol
Week 2 homework: Encrypted Vault with Access Control — deposit/withdraw with limits, ACL sharing, and randomness.

Week 3: Applications & testing

Level: IntermediateDescription: Bridge smart contracts and user-facing applications using the Relayer SDK, ethers.js/viem, and React.Learning objectives:
  • Initialize the Relayer SDK and connect to fhEVM network
  • Encrypt user inputs and submit as externalEuintXX parameters
  • Request and process re-encrypted outputs
  • Build a complete React frontend
  • Handle wallet connection and encrypted state display
Topics: Relayer SDK API, client-side encryption, re-decryption, React integration, ethers.js/viem, UX patternsContract: SimpleCounter.sol
Level: AdvancedDescription: Build a complete ERC-20 token where all balances and transfer amounts are encrypted.Learning objectives:
  • Implement encrypted ERC-20 with confidential balances
  • Handle “sufficient balance” check using FHE.ge() and FHE.select
  • Manage ACL permissions across transfers and approvals
  • Implement encrypted approve and transferFrom
  • Add selective balance viewing via ACL + client-side decryption
Topics: Encrypted ERC-20 design, receiving inputs via externalEuint64, encrypted transfers, silent fail pattern, approvals, ACL managementContract: ConfidentialERC20.sol
Level: AdvancedDescription: Build a voting system where votes are encrypted, tallied homomorphically, and only the final result is decrypted.Learning objectives:
  • Design a confidential voting protocol
  • Implement encrypted vote submission via externalEuint32
  • Perform homomorphic tallying using FHE.add
  • Handle tally reveal using Gateway decryption
  • Prevent common voting attacks
Topics: Voting system requirements, encrypted ballot submission, homomorphic tallying, voter eligibility, double-vote prevention, tally revealContracts: ConfidentialVoting.sol, PrivateVoting.sol
Level: AdvancedDescription: Implement first-price and second-price (Vickrey) auctions with encrypted bids and homomorphic winner determination.Learning objectives:
  • Design a sealed-bid auction protocol
  • Implement encrypted bid submission via externalEuint64
  • Perform encrypted bid comparison using FHE.gt and FHE.select
  • Implement first-price and Vickrey auction variants
  • Analyze security properties and limitations
Topics: Auction types, encrypted bid storage, winner determination, Vickrey (second-price), bid deposits, selective revealContracts: SealedBidAuction.sol, RevealableAuction.sol, EncryptedMarketplace.sol
Level: AdvancedDescription: Master testing FHE contracts where encrypted values cannot be directly inspected and failures are often silent.Learning objectives:
  • Set up fhEVM mock testing
  • Write comprehensive tests with encrypted input creation and decryption assertions
  • Debug encrypted contracts with silent failures
  • Handle and diagnose silent failures from FHE.select logic
  • Test ACL permissions
Topics: Mock testing environment, creating encrypted test inputs, decrypting outputs, event-driven debugging, ACL testing, silent failure testingContract: TestableVault.sol
Week 3 homework: Confidential Token + Voting System — two contracts working together with 15+ tests.

Week 4: Mastery & capstone

Level: AdvancedDescription: FHE operations are expensive. Learn to optimize type selection, leverage plaintext operands, and apply batching patterns.Learning objectives:
  • Understand the FHE gas cost model
  • Optimize type selection to reduce costs
  • Use plaintext second operands for cheaper computation
  • Apply batch processing and caching patterns
  • Profile and benchmark gas usage
Topics: Gas cost model, type selection, plaintext operands, caching, lazy evaluation, batching, benchmarkingContracts: GasOptimized.sol, GasBenchmark.sol
Level: AdvancedDescription: FHE contracts face unique security challenges. Learn to prevent information leakage, manage ACL properly, and implement the LastError pattern.Learning objectives:
  • Prevent information leakage via gas side-channels
  • Implement proper ACL management
  • Validate encrypted inputs
  • Protect against DoS attacks
  • Implement the LastError pattern
Topics: Gas side-channel attacks, constant-gas patterns, FHE.isInitialized(), ACL security, input validation, rate limiting, LastError patternContracts: SecurityPatterns.sol, VulnerableDemo.sol
Level: ExpertDescription: Explore advanced architectural patterns: encrypted state machines, LastError pattern, encrypted registries, and cross-contract composability.Learning objectives:
  • Implement encrypted state machines with threshold transitions
  • Apply the LastError pattern for rich error handling
  • Build encrypted registries for per-user private data
  • Design cross-contract composability using FHE.allow
  • Implement batch processing and time-locked value patterns
Topics: Encrypted state machines, LastError pattern, encrypted registries, cross-contract composability, batching, time-locked valuesContracts: EncryptedStateMachine.sol, LastErrorPattern.sol, EncryptedRegistry.sol
Level: ExpertDescription: Build DeFi primitives with confidential data: lending with encrypted collateral, order books with sealed orders, and front-running prevention.Learning objectives:
  • Design a confidential lending protocol with encrypted collateral
  • Build an encrypted order book with sealed orders
  • Analyze DeFi privacy trade-offs
  • Implement front-running prevention
  • Describe the ERC-7984 standard
Topics: Confidential lending, encrypted order books, order matching, front-running prevention, DeFi privacy trade-offs, ERC-7984, liquidationContracts: ConfidentialLending.sol, EncryptedOrderBook.sol
Level: ExpertDescription: The capstone project demonstrates mastery of all concepts. Design and implement a Confidential DAO with encrypted governance, private treasury, and confidential proposals.Learning objectives:
  • Independently design an FHE application architecture
  • Implement a Confidential DAO with encrypted governance and private treasury
  • Integrate multiple FHE patterns from all previous modules
  • Write comprehensive tests
  • Apply security best practices and gas optimization
  • Document security model and limitations
Topics: DAO architecture, encrypted governance, private treasury, state machines, testing strategies, gas optimization, security analysisContract: ConfidentialDAO.solDeliverables:
  • Smart contracts (30%)
  • Test suite (20%)
  • Documentation (20%)
  • Security analysis (15%)
  • Presentation (15%)
Week 4 homework: Capstone Confidential DAO — governance tokens + voting + treasury, 20+ tests, security audit.

Module dependency graph

Learning paths

Choose the pacing that fits your schedule:

4-week bootcamp (recommended)

~16 hours/week — Standard program structure with weekly homework and grading

Intensive (7 days)

~9 hours/day — Full-time bootcamp cohorts, dedicated learners with time off

Part-time (6 weeks)

~11 hours/week — Working professionals studying evenings and weekends

Self-paced (8-14 weeks)

Your schedule — Independent learners, reference material users
See the full Learning Paths guide for detailed schedules.

Resources

Each module is supported by comprehensive resources:
  • Lesson content — Detailed explanations with code examples
  • Presentation slides — Marp format slides for each module
  • Hands-on exercises — Starter templates in exercises/
  • Complete solutions — Reference implementations in solutions/
  • Quizzes — 215 questions across 20 modules
  • Cheatsheet — Quick reference for FHE operations
  • Common pitfalls — Mistakes to avoid and how to fix them
  • Gas guide — Gas cost reference for all operations
  • Security checklist — Audit checklist for FHE contracts
  • Glossary — A-Z terminology

Next steps

Quick start

Get up and running in 10 minutes

Installation

Detailed setup instructions

Build docs developers (and LLMs) love