Documentation Index
Fetch the complete documentation index at: https://mintlify.com/0xchriswilder/journey/llms.txt
Use this file to discover all available pages before exploring further.
Week 1: Foundations of Confidential Computing
Subtitle: Understand FHE, set up tooling, grasp FHEVM architecture Estimated Time: 8 hours of lessons + 3 hours homeworkObjectives
Understand FHE
Define Fully Homomorphic Encryption and explain why it matters for blockchain privacy
Dev Environment
Set up complete FHEVM development environment with Hardhat and MetaMask
Network Config
Connect wallet to Sepolia testnet and obtain test ETH
FHEVM Architecture
Master encrypted types, operations, and the FHEVM data flow
Milestone
Working dev environment with wallet connected to Sepolia
Solid understanding of FHE fundamentals
Completed FHE Concepts & Setup Verification homework
Lessons
Lesson 1.1: Welcome to FHEVM
Duration: 30 minutesLearning Objectives
Learning Objectives
- Define Fully Homomorphic Encryption in your own words
- Explain how FHEVM brings FHE to Ethereum
- Identify 3+ real-world use cases for confidential computing
- Describe the high-level FHEVM data flow: encrypt → compute → decrypt
Key Topics
Key Topics
What is Fully Homomorphic Encryption?FHE allows computation on encrypted data without ever decrypting it. Think of it as performing math on a locked safe — you can add, subtract, and calculate inside without ever seeing the contents.The Zama Protocol & FHEVMFHEVM is an EVM-compatible runtime that exposes FHE types and operations in smart contracts via the Zama Solidity library.The core flow:FHEVM Data Flow
Traditional encryption requires decryption before processing — exposing sensitive data. FHE eliminates this vulnerability entirely.
- Client encrypts input
- Contract computes on ciphertexts
- Contract marks values as publicly decryptable
- Client performs off-chain decryption via the Relayer SDK
- Client submits the cleartext + proof back on-chain for verification
Confidential Voting
Votes remain encrypted during voting. Only the final tally is revealed.
Sealed-Bid Auctions
Bidders submit encrypted bids. The contract determines the winner without revealing losing bids.
Private Token Transfers
Transfer amounts stay hidden while the contract validates balances.
Confidential DeFi
Lending protocols where positions and balances remain private.
Lesson 1.2: Environment & Wallet Setup
Duration: 45 minutesLearning Objectives
Learning Objectives
- Install Node.js (v18+), npm, and verify versions
- Clone and configure the FHEVM Hardhat template
- Set up environment variables for Sepolia testnet
- Install and configure MetaMask wallet
- Connect wallet to Sepolia and obtain test ETH from faucet
Step-by-Step Setup
Step-by-Step Setup
Step 1: Install Node.js & npmStep 2: Clone the FHEVM Hardhat TemplateStep 3: Configure Environment VariablesStep 4: Wallet & Network Setup
.env
- Install MetaMask browser extension
- Create a new wallet or import existing (use a dedicated dev wallet)
- Add Sepolia testnet to MetaMask
- Get test ETH from Sepolia faucet
Lesson 1.3: FHE Deep Dive
Duration: 60 minutesLearning Objectives
Learning Objectives
- List all FHEVM encrypted types and when to use each one
- Write homomorphic operations: add, sub, mul, comparison, select
- Explain the role of FHE.allowThis() and FHE.allow()
- Describe public vs. private decryption and when to use each
- Draw the FHEVM architecture diagram from memory
FHEVM Encrypted Types
FHEVM Encrypted Types
ebool - Encrypted Boolean
ebool - Encrypted Boolean
Encrypted true/false. Use for flags, conditions, and binary choices.Range: true or false (encrypted)
euint8 - Encrypted 8-bit Integer
euint8 - Encrypted 8-bit Integer
Encrypted 8-bit unsigned integer (0-255).Use for: Small values like votes, ratings, simple countersGas: Cheapest encrypted type
euint16 - Encrypted 16-bit Integer
euint16 - Encrypted 16-bit Integer
Encrypted 16-bit unsigned integer (0-65535).Use for: Medium-range values
euint32 - Encrypted 32-bit Integer
euint32 - Encrypted 32-bit Integer
Encrypted 32-bit unsigned integer.Use for: Larger counters, timestamps, vote tallies (FHEVM v0.9+ standard)
euint64 - Encrypted 64-bit Integer
euint64 - Encrypted 64-bit Integer
Encrypted 64-bit unsigned integer.Use for: Token amounts, balances, large financial values
euint128 / euint256 - Large Encrypted Integers
euint128 / euint256 - Large Encrypted Integers
Encrypted large integers.Use for: Cryptographic values, very large balancesGas: Most expensive encrypted types
eaddress - Encrypted Address
eaddress - Encrypted Address
Encrypted address type.Use for: Private recipient addresses
Gas Optimization Tip: Always use the smallest type that fits your data — smaller types use less gas.
Homomorphic Operations
Homomorphic Operations
Arithmetic OperationsComparison OperationsEncrypted Ternary (FHE.select)
Access Control & Decryption (v0.9+)
Access Control & Decryption (v0.9+)
FHE.allowThis() — Grants the contract permission to work with an encrypted valueFHE.allow(value, address) — Grants a specific address permission to decrypt a value privatelyFHE.makePubliclyDecryptable(value) — Marks a ciphertext so anyone can request its decryption off-chainSelf-Relaying Decryption Flow (v0.9+)
In v0.9+, there is no Oracle. The dApp client drives decryption off-chain and submits the proof back on-chain.
Homework: FHE Concepts & Setup Verification
Estimated Time: 3 hours Objective: Demonstrate your understanding of FHE fundamentals and verify your development environment is fully configured.Requirements
1. Conceptual Questions (40%)
1. Conceptual Questions (40%)
Answer 10 written questions about FHE, FHEVM, and the Zama Protocol. Submit as a markdown file.Sample questions:
- What does FHE stand for and what makes it “fully” homomorphic?
- Name three real-world use cases for FHEVM and explain why each needs encrypted computation
- In the FHEVM data flow, list the 5 steps from user input to on-chain result
2. Environment Verification (40%)
2. Environment Verification (40%)
Submit screenshots showing:
- Node.js version (
node --version) - Successful Hardhat compilation (
npx hardhat compile) - MetaMask connected to Sepolia testnet
3. Type Selection Exercise
3. Type Selection Exercise
Given 5 scenarios, choose the appropriate FHEVM encrypted type and justify your choice in 1-2 sentences each.Example: “A user’s age (0-150)” → euint8 (max 255, cheapest gas)
4. Architecture Diagram
4. Architecture Diagram
Draw (or write in mermaid syntax) the FHEVM architecture diagram from memory, labeling each component and data flow.
Grading Criteria
| Criterion | Weight | Description |
|---|---|---|
| Conceptual Understanding | 40% | Accuracy and depth of answers to conceptual questions |
| Setup Verification | 40% | Evidence of a working development environment |
| Bonus Exploration | 20% | Extra credit for exploring beyond the lesson material |
Submission
Include files
answers.mdwith your written responsesscreenshots/folder with verification imagesarchitecture.mdorarchitecture.mmdwith your diagram
Next Steps
Continue to Week 2
Now that you understand FHE fundamentals and have your environment set up, move on to Week 2 to write your first FHEVM smart contract.