Bounty Track December 2025: Build The FHEVM Example Hub

The Zama Bounty Program aims to inspire and incentivize the developer community to contribute to the Zama Confidential Blockchain Protocol.

Each season, we introduce a new bounty that addresses a specific challenge. With this initiative, we invite developers to collaborate with us in advancing the FHE ecosystem.

For this season, the challenge is to build a set of standalone, Hardhat-based FHEVM example repositories, each demonstrating one clear concept (e.g., access control, public decryption, user decryption), with clean tests, automated scaffolding, and self-contained documentation. The prize pool for this challenge is $10,000.

Important dates

  • Start date: December 1, 2025
  • Submission deadline: December 31, 2025 (23:59, Anywhere On Earth)

Overview

The goal of this bounty is to create a comprehensive repository including standalone FHEVM examples that help developers learn and implement privacy-preserving smart contracts using Fully Homomorphic Encryption.

A starter example implementation of this bounty can be found here.

This repository demonstrates:

  • Automated scaffolding tools for generating example repositories
  • Documentation generation from code annotations
  • Category-based project generation
  • Complete implementation of the bounty requirements

How to participate

Participants should create a repository containing:

  1. Automation scripts - TypeScript-based CLI tools for generating example repositories
  2. Example contracts - Well-documented Solidity contracts demonstrating FHEVM concepts
  3. Comprehensive tests - Test suites showing both correct usage and common pitfalls
  4. Documentation generator - Tool to create GitBook-compatible documentation
  5. Base template - Using our Hardhat template which can be cloned and slightly customized

Check out the example implementation to see:

  • How to structure your automation scripts
  • Example contract and test patterns
  • Documentation generation workflow
  • Category-based project generation

Requirements

1. Project structure & simplicity

  • Use only Hardhat for all examples
  • One repo per example, no monorepo
  • Keep each repo minimal: contracts/, test/, hardhat.config.ts, etc.
  • Use a shared base-template that can be cloned/scaffolded
  • Generate documentation like seen in /example  relates to page.

2. Scaffolding / Automation

Create a CLI or script ([.c-inline-code]create-fhevm-example[.c-inline-code]) to:

  • Clone and slightly customize the base Hardhat template
  • Insert a specific Solidity contract into [.c-inline-code]contracts/[.c-inline-code]
  • Generate matching tests
  • Auto-generate documentation from annotations in code

Example implementation: See the example project for working [.c-inline-code]create-fhevm-example.ts[.c-inline-code] and [.c-inline-code]create-fhevm-category.ts[.c-inline-code] scripts written in TypeScript.

3. Types of examples to include (each of these becomes a standalone repo):

Examples that we already have

Basic:

  • Simple FHE counter
  • Arithmetic (FHE.add, FHE.sub)
  • Equality comparison (FHE.eq)

Encryption:

  • Encrypt single value
  • Encrypt multiple values

User decryption:

  • User decrypt single value
  • User decrypt multiple values

Public decryption:

  • Single value public decrypt
  • Multi value public decrypt

Additional example items to include

Access control

  • What is access control
  • FHE.allow, FHE.allowTransient

Input proof explanation

  • What are input proofs and why they're needed
  • How to use them correctly

Anti-patterns

  • View functions with encrypted values (not allowed)
  • Missing FHE.allowThis() permissions
  • Other common mistakes

Understanding handles

  • How handles are generated
  • Symbolic execution
  • Handle lifecycle

OpenZeppelin confidential contracts: (this can be found in previous versions, which needs an upgrade and import of this library)

  • ERC7984 example
  • ERC7984 to ERC20 Wrapper
  • Swap ERC7984 to ERC20
  • Swap ERC7984 to ERC7984
  • Vesting Wallet
  • ...

Advanced examples:

  • Blind auction

Or anything else that you can think of.

4. Documentation strategy

  • Use JSDoc/TSDoc-style comments in TS tests
  • Auto-generate markdown README per repo
  • Tag key examples into docs: "chapter: access-control", "chapter: relayer", etc.
  • Generate GitBook-compatible documentation

Example implementation: See [.c-inline-code]generate-docs.ts[.c-inline-code] in the example project for automated documentation generation in TypeScript.

Bonus points:

  • Creative examples - Implementing additional examples beyond the requirements
  • Advanced patterns - Demonstrating complex FHEVM patterns and use cases
  • Clean automation - Particularly elegant and maintainable automation scripts
  • Comprehensive documentation - Exceptional documentation with detailed explanations
  • Testing coverage - Extensive test coverage including edge cases
  • Error handling - Examples demonstrating common pitfalls and how to avoid them
  • Category organization - Well-organized categories for different example types
  • Maintenance tools - Tools for updating examples when dependencies change

Judging criteria

All submissions must include a demonstration video as a mandatory requirement. The video should clearly showcase your project's setup, key features, example execution, and automation scripts in action.

Judging will be based on:

  • Code quality
  • Automation completeness
  • Example quality
  • Documentation
  • Ease of maintenance on new version changes
  • Innovation

Deliverables

Your submission must include:

  1. base-template/ - Complete Hardhat template with [.c-inline-code]@fhevm/solidity[.c-inline-code]
  2. Automation scripts - [.c-inline-code]create-fhevm-example[.c-inline-code] and related tools in TypeScript
  3. Example repositories - Multiple fully working example repos (or category-based projects)
  4. Documentation - Auto-generated documentation per example
  5. Developer guide - Guide for adding new examples and updating dependencies
  6. Automation tools - Complete set of tools for scaffolding and documentation generation

Reference repositories

Use the following repositories as references:

Rewards

  • 🥇 1st place: $5,000
  • 🥈 2nd place: $3,000
  • 🥉 3rd place: $2,000

How to participate?

Connect your wallet to the Zama Guild and submit your project from here.

Additional links

Latest Blog Posts