Fully Homomorphic Encryption in Decentralized Finance — Survey & Landscape
FHE enables computation on encrypted data without decryption — the "holy grail" of cryptographic privacy.
For DeFi, this means encrypted on-chain state, ブラインドアービトラージ, 封印された オークション, and ダークプール マッチング
where validators compute on ciphertexts without ever seeing 平文 values.
Currently research-stage for real-time applications; near-term wins in auctions and governance.
What is FHE and Why Does DeFi Need It?
The Fundamental Problem
Smart contract state is completely public by default.
Every balance, every order, every AMM reserve is visible to all participants — enabling front-running, sandwich attacks, and information leakage.
FHE の約束
With FHE, contract state can be encrypted on-chain, with validators computing over ciphertexts without ever seeing 平文. The "magical" property: compute on data without decrypting it.
DeFi が FHE を必要とする理由 (そして難しい理由)
MEV 軽減
Searchers currently see all mempool Tx in 平文, enabling front-running and sandwiching. FHE: searchers compute on encrypted Tx without seeing content.
2028-2030? — Hardware-accelerated FHE practical for DeFi
FHE-MEV: Blind Arbitrage Without Seeing Transactions
Paper: "FHE-MEV: Blind Arbitrage in MEV" — Passerat-Palmbach et al. (Flashbots / Imperial College London, 2023).
Concept: searcher runs arbitrage on TFHE-encrypted UniswapV2 transactions without ever seeing content.
The Core Problem: Searchers Must See Tx to Profit (Today)
Current State (Broken)
Searchers observe 平文 mempool Tx:
Token pair (USDC→ETH)
Swap amount (e.g. 100,000 USDC)
Slippage tolerance (e.g. 0.5%)
This enables targeted front-running, sandwich attacks, and precise price impact computation — at user expense.
FHE Goal
Searcher receives only encrypted 暗号文. Performs FHE computation:
Which pair? (on 暗号文)
Opportunity exists? (on 暗号文)
Optimal size? (on 暗号文)
Learns only: "opportunity exists" (yes/no) and optimal backrun parameters — not the original Tx content.
Protocol Flow — Blind Arbitrage
TFHE Gate 操作 Required
// Pseudocode: FHE gate count for ブラインドアービトラージ// 1. Extract token pair field (64-bit comparison in 暗号文 space)
enc_pair = TFHE.select_bits(enc_tx, offset=0, len=64) // ~64 gates// 2. Check validity constraint: amount > minimum
enc_valid = TFHE.compare_ge(enc_amount, MIN_AMOUNT) // ~1,000 gates (128-bit)// 3. Compute price impact on encrypted reserves
enc_impact = TFHE.div(enc_amount, enc_reserve_in) // ~10,000 gates// 4. Determine if opportunity profitable
enc_opp = TFHE.and(enc_valid, TFHE.compare_ge(enc_impact, THRESHOLD))
// Total: ~50,000-100,000 gate operations
// At ~1ms/gate (CPU 2024): 50-100 seconds total
// With GPU (10-100x): 0.5-10 seconds — still too slow for MEV
Current Limitations and Improvement Path
Problem 1: Latency
Gate count × 1ms/gate = 50-100 seconds on CPU. MEV requires sub-1 second to be competitive. Even with GPU (100ms), misses most opportunities.
Fix: ASIC/FPGA accelerators targeted for 2025-2027.
Problem 2: Key Management
Who holds the FHE private key? If user holds it: needs to be online. If network holds it: threshold key ceremony, MPC-based distributed decryption required.
Fix: Threshold FHE decryption (active research area).
Improvement Path
Algorithmic: Reduce gate count via custom FHE circuits for AMM operations
Hardware: GPU → FPGA → ASIC FHE accelerators
Hybrid: FHE for outer privacy layer, ZKP for inner verification
Zama Ecosystem: fhEVM, Fhenix, Inco
Zama is the primary FHE infrastructure company in blockchain/DeFi. Founded by Pascal Paillier (of Paillier cryptosystem fame) and Nigel Smart (co-inventor of CKKS, Professor of Cryptography at KU Leuven). Raised $73M Series A (2023). Open-source tfhe-rs library is the de facto standard for TFHE in production.
tfhe-rs (Rust Library)
Open source TFHE library, maintained by Zama. Core building block for all FHE DeFi projects.
TFHE ブートストラッピング: ~100ms CPU, ~10ms GPU
Boolean gates: ~1ms per gate
Integer ops: 8-bit add ~50ms, compare ~200ms
128-bit compare: 5-10 seconds
Open source (BSD-3)
fhEVM
FHE-powered Ethereum Virtual Machine. Smart contracts run on encrypted state. Developers write Solidity with encrypted types.
euint8, euint32, euint256, ebool
FHE operations as Solidity precompiles
Network validators run FHE computation collectively
No single party sees 平文 state
Early testnet (2024)
fhEVM Contract Example: Encrypted ERC-20
// Traditional ERC-20 — balances are PUBLICcontract PublicToken {
mapping(address => uint256) public balance; // visible to everyonefunction transfer(address to, uint256 amount) external {
balance[msg.sender] -= amount; // readable by MEV bots
balance[to] += amount;
}
}
// fhEVM ERC-20 — balances are ENCRYPTED on-chaincontract PrivateToken {
mapping(address => euint256) private encBalance; // encrypted 暗号文function transfer(address to, euint256 amount) external {
// All operations are FHE — validators can't see amount
encBalance[msg.sender] = FHE.sub(encBalance[msg.sender], amount);
encBalance[to] = FHE.add(encBalance[to], amount);
// No 平文 is ever revealed during execution
}
function balanceOf(address owner) externalviewreturns (euint256) {
require(msg.sender == owner); // only owner can decryptreturn encBalance[owner]; // returns 暗号文; owner decrypts locally
}
}
Ecosystem: Who's Building on FHE
Fhenix
FHE-powered Ethereum L2 rollup. Uses Zama's fhEVM as execution layer. Developers deploy standard Solidity contracts with encrypted types. Targets DeFi applications where on-chain privacy is needed.
Testnet (2024)
Inco Network
Confidential computing layer. Integrates with existing EVM chains as a privacy middleware. Smart contracts can call into Inco for FHE operations, enabling existing L1/L2 apps to add encryption without full migration.
Early testnet
Zama's Concrete ML
FHE-enabled machine learning: train model in 平文, convert to FHE-compatible circuit, run inference on encrypted data. Applications: credit scoring on private financial data, medical AI with privacy.
Research + demos
Concrete Performance Numbers (2024)
Operation
CPU Latency
GPU Latency (est.)
DeFi Practical?
Boolean AND (TFHE)
~1ms
~0.01ms
Yes (single gates)
8-bit addition
~50ms
~0.5ms
Near-term
8-bit comparison
~200ms
~2ms
封印された オークション
32-bit addition
~500ms
~5ms
Near-term (non-RT)
128-bit addition
~2s
~20ms
No (for RT MEV)
128-bit comparison
~5-10s
~50-100ms
No (for RT MEV)
Full AMM swap computation
~minutes
~seconds
No (needs ~1ms)
The 1000x gap: Real-time DeFi requires ~1ms latency. A full AMM swap in FHE takes minutes on CPU, seconds on GPU.
Even with ASIC acceleration (projected 2026-2028), reaching 1ms for complex DeFi operations requires algorithmic improvements alongside hardware.
FHE vs MPC vs ZKP vs Differential Privacy
Different cryptographic privacy primitives serve different roles in the DeFi privacy stack. Understanding when to choose each is critical for system design.
Property
FHE
MPC
ZKP
Differential Privacy
Who computes
One party (on 暗号文)
Multiple parties jointly
Prover alone
Anyone (adds calibrated noise)
Interaction rounds
0 (non-interactive)
Multiple (O(depth) rounds)
0 (non-interactive SNARK)
0
Computation cost
Very high (1000-10000x overhead)
High (network bandwidth + compute)
Moderate (proving); low (verifying)
Very low
Communication cost
Low (暗号文 only)
High (multi-round)
Low (proof only)
Minimal
Trust assumption
Key holder
Honest majority (threshold)
Soundness of proof system
Curator / noise mechanism
Data remains private
Always (even from compute server)
Yes (from any individual party)
Input hidden; output may be public
Statistically (epsilon-DP)
最適用途
Outsourced compute on private data
Joint compute among distrusting parties
Proving properties of private data
Statistical privacy for aggregates
DeFi 適用
Dark pools (long-term), auctions (near)
Dark pools (now: Renegade, Prime Match)
KYC, compliance proofs, rollups
AMM privacy, order aggregates
Maturity
Research → early deployment
Production (Prime Match)
Production (many protocols)
Production (Atlas-X)
Decision Guide: When to Use Each
Choose FHE when:
Computation can be delegated to a single (possibly untrusted) server
Use cases: 封印された オークション, governance voting, private ML inference
Avoid for: real-time order matching, AMM swaps (too slow today)
Choose MPC when:
Multiple parties need to jointly compute without revealing inputs
Latency: can tolerate 10ms-1s round trips
Trust model: honest majority among a known set of parties
Use cases: ダークプール マッチング (Renegade, Prime Match), threshold signatures
最適用途: production dark pools today
Choose ZKP when:
Need to prove correctness of private computation (not hide it from all)
Verifier needs to check result without knowing inputs
Use cases: KYC compliance (zkKYC), private rollups, zk-identity, selective disclosure
最適用途: compliance proofs, identity verification
Choose DP when:
Statistical aggregate privacy is sufficient (not individual privacy)
Can tolerate bounded accuracy loss
Use cases: AMM fee parameter optimization (Atlas-X), order flow aggregates, market statistics
最適用途: aggregate statistics with formal privacy guarantees
DeFi Privacy Stack (Layered View)
Roadmap to FHE-Practical DeFi
Realistic framing: FHE is not a near-term panacea. The performance gap between current FHE and real-time DeFi requirements is ~1000x.
Hardware acceleration (GPU → FPGA → ASIC) and algorithmic improvements are both necessary. The timeline below reflects optimistic but realistic estimates.
Near-Term (1-3 years): What's Viable Now
Sealed Bid Auctions
Fewer FHE operations needed. Batch auction frequency (e.g. once per block) allows seconds of computation. fhEVM + Fhenix can demo this today.
Viable 2024-2025
Private Governance Voting
Vote tallying requires simple addition over ciphertexts. Latency of minutes is acceptable for governance (not real-time). First production FHE DeFi app likely here.
Viable 2025-2026
Encrypted State (Non-RT)
Zama fhEVM: smart contract state is encrypted, but transactions settle in seconds-to-minutes. Not real-time, but useful for privacy-sensitive data storage.
With GPU + FPGA acceleration, 64-bit price comparison may reach 10-50ms. This enables basic order matching at low frequency (e.g. once per second). Requires: FHE comparison circuits optimized for prices, threshold decryption for match results.
Dependent on FPGA/ASIC timeline
FHE-MEV (Blind Arbitrage)
If GPU FHE reaches 100ms for 128-ビット操作, ブラインドアービトラージ becomes competitive for slow-moving opportunities. Latency-sensitive sandwiching remains out of reach. Likely deployed first on alt-L1s with longer block times.
Optimistic: 2026-2028
Long-Term (5-10+ years): Breakthrough Required
Real-Time FHE AMM / Full FHE Smart Contracts
Requires ~1ms latency for full DeFi operations. Current best: ~5-10 seconds for 128-bit comparison. Gap: 5,000-10,000x. Required improvements:
Hardware: Dedicated ASIC achieving ~1,000x over CPU (~10ms for 128-bit compare)
Algorithmic: Novel FHE schemes with 10x fewer gate operations
Bottom line: FHE is the most powerful privacy primitive theoretically, but the farthest from DeFi practicality.
MPC (Renegade, Prime Match) and ZKP (Aztec, privacy pools) solve the near-term problem.
FHE's DeFi moment is likely 2028+ for simple applications, 2030+ for real-time — barring hardware breakthroughs.
Watch: Zama fhEVM mainnet, ASIC announcements, threshold FHE schemes.