Overview
Nightfall is an open-source, zero-knowledge proof (ZKP) privacy layer developed by EY Blockchain that enables private transactions on Celo. As a Layer 3 solution on top of Celo, Nightfall brings enterprise-grade privacy to payments, supply chain finance, and B2B transactions while maintaining Celo’s speed and low-cost advantages. Celo is the first payments-focused blockchain to deploy Nightfall, combining private transactions with Celo’s mobile-first infrastructure and 1-second block times.Testnet Status: Live and ready for testingNightfall testnet is currently active on Celo Sepolia for developers and enterprises to build and test private payment applications.Full API documentation is available in the Nightfall GitHub docs.
What is Nightfall?
Nightfall uses zero-knowledge rollup (ZK-ZK rollup) technology to batch private transactions into succinct blocks that are verified on-chain through cryptographic proofs. This means:- Transaction details are hidden: Sender, receiver, and amounts remain private
- Fast finality: Achieves finality at the same speed as the underlying Celo blockchain
- Low cost: Private transfers typically cost around 6000 Gas (~90% cheaper than standard transfers)
- Auditable privacy: Transactions are cryptographically verifiable for compliance
Key Features
Privacy Technology
- Zero-Knowledge Proofs: Cryptographic privacy without trusted intermediaries
- Layer 3 Architecture: Runs on top of Celo L2 for maximum efficiency
- Enterprise Access Control: X509 certificate-based authentication
Token Support
- ERC-20: Stablecoins (USDT, USDC) and other fungible tokens
- ERC-721: Non-fungible tokens (NFTs)
- ERC-1155: Multi-token standard
- ERC-3525: Semi-fungible tokens
Performance
- Low Gas Costs: ~6000 Gas per private transfer
- Fast Finality: Cryptographic finality matching Celo’s block time
- Scalability: Transaction batching for efficient throughput
Architecture
Nightfall operates with three main components:Client
The user-facing application that enables users to make private transactions. Clients interact with proposers and manage:- Deposits (converting public tokens to private commitments)
- Transfers (private peer-to-peer transactions)
- Withdrawals (converting private commitments back to public tokens)
Proposer
Network nodes that create Layer 2 blocks by batching transactions and generating zero-knowledge proofs. Proposers:- Collect transactions from clients
- Generate ZK proofs for transaction validity
- Submit blocks to on-chain smart contracts
Smart Contracts
On-chain contracts that handle:- Token escrow for deposits and withdrawals
- ZK proof verification
- X509 certificate validation for access control
Use Cases
Private B2B Payments
Enable confidential business-to-business transactions while maintaining an auditable record for compliance. Ideal for:- Invoice settlements
- Vendor payments
- Intercompany transfers
Supply Chain Finance
Process payments across supply chain partners with privacy, reducing transaction costs and eliminating intermediaries.Enterprise Treasury Management
Manage corporate funds with confidentiality for strategic transactions, mergers, acquisitions, and sensitive operations.Cross-Border Payments
Leverage Celo’s global reach and low fees with added privacy for international B2B flows, particularly valuable in emerging markets.Getting Started
Prerequisites
To integrate Nightfall, you’ll need:-
Development Tools:
- git: For cloning the repository
- docker-compose: For running the client services
- curl: For making API requests to the client
- cast (from Foundry): For generating mnemonics (optional)
- Ethereum Keys: For signing transactions on Celo Sepolia
- ZKP Keys: For generating zero-knowledge proofs (derived from mnemonic)
- Testnet Tokens: CELO tokens on Celo Sepolia for paying gas fees and deposits
Transaction Flow
Deposits
Convert public tokens on Celo into private commitments on Nightfall:Transfers
Send private transactions between Nightfall users:Withdrawals
Convert private commitments back to public tokens:Running the Client on Celo Sepolia
This guide explains how to set up and use the Nightfall client to interact with the Celo Sepolia testnet.Setup
1. Clone the Repositorycelo-sepolia.env file with your own addresses and private keys. These addresses must have CELO tokens for paying gas fees during deposits and withdrawals, as well as the tokens you want to deposit.
Update the following variables in celo-sepolia.env:
CLIENT_SIGNING_KEY: Your private key (without the0xprefix or with it, depending on your setup)CLIENT_ADDRESS: The Ethereum address corresponding to your private keyNF4_SIGNING_KEY: Should be the same asCLIENT_SIGNING_KEY
Funding Your AddressThese addresses must be funded with CELO on the Celo Sepolia testnet. You can get testnet CELO from a faucet if needed.
http://localhost:3000 and the webhook at http://localhost:8081/webhook once they’re healthy. The webhook automatically receives notifications from the client about transaction status updates.
4. Configure Your Mnemonic
Before performing any operations, you need to derive your ZKP keys from a mnemonic. Generate a new 24-word mnemonic using cast (from Foundry):
root_key, nullifier_key, zkp_private_key, and zkp_public_key. Save these values for future operations.
Operations
Deposit to Nightfall A deposit moves tokens from Layer 1 (Celo Sepolia) into Nightfall’s privacy layer. Step 1: Generate a unique deposit ID:ercAddress: The ERC20/ERC721/ERC1155/ERC3525 token contract address. Use0x471EcE3750Da237f93B8E339c536989b8978a438for CELO token (ERC20 via Celo Token Duality)tokenId: Token ID (use all zeros for ERC20)tokenType:0for ERC20,1for ERC721,2for ERC1155,3for ERC3525value: Amount in hex format (without0xprefix)fee: Transaction fee in hex formatdeposit_fee: Deposit fee in hex format
zkp_public_key:
zkp_public_key from the response (e.g., "02dd2cd1ab715037f4b77903844b08c731e6a0a3f5036490af4eaf49f841f9cb").
Step 2: Generate a transfer ID and make the transfer:
ercAddress: Token contract addresstokenId: Token ID (0x00for ERC20)recipientData.values: Array of amounts to send (in hex without0xprefix)recipientData.recipientCompressedZkpPublicKeys: Array of recipient public keysfee: Transaction fee
ercAddress: Token contract addresstokenId: Token ID (all zeros for ERC20)tokenType:0for ERC20,1for ERC721,2for ERC1155,3for ERC3525value: Amount to withdraw in hex formatrecipientAddress: Layer 1 address to receive the tokensfee: Transaction fee
withdrawFundSalt value that you’ll need for the de-escrow step.
Step 3: De-escrow (Complete Withdrawal)
After the withdrawal is processed and included in a block, complete the withdrawal by de-escrowing:
- All parameters from the withdrawal request
withdrawFundSalt: The salt value returned from the withdrawal operation
Important Notes:
- All hex values should be provided without the
0xprefix (except fortokenIdin transfer which uses0x00) - The client must be healthy before making requests. Check health with:
curl http://localhost:3000/v1/health - Transaction status can be checked using the request ID returned from each operation
- The webhook is automatically started with docker-compose and will receive notifications about transaction status changes
- For Celo Sepolia, the default ERC20 token address is
0x471EcE3750Da237f93B8E339c536989b8978a438(CELO) - Operations (deposits, transfers, withdrawals) may take up to 1 hour to complete and be included in a block by the proposer. Client execution should take few seconds.
Integration Steps
- Review Technical Documentation: Start with the Nightfall GitHub documentation
- Set Up Development Environment: Follow the Running the Client on Celo Sepolia guide above
- Test Operations: Practice deposits, transfers, and withdrawals on testnet
- Deploy Test Application: Build and test your integration on testnet
- Implement APIs: Integrate Nightfall Client and Proposer APIs into your application
Resources
Documentation
- Nightfall GitHub Repository: Full source code and implementation
- Technical Documentation: Comprehensive guide including architecture, APIs, deployment, and testing
- EY Blockchain: Learn more about EY’s blockchain solutions
APIs
- Client APIs: Deposit, transfer, withdraw, and balance query endpoints
- Proposer APIs: Block submission and transaction validation
- Webhook Support: Real-time transaction notifications
Testing & Deployment
- Local Testing: See Running the Client on Celo Sepolia for instructions on running Nightfall locally with Docker
- Testnet Deployment: Guide for deploying on Celo Sepolia testnet
- Production Deployment: Best practices for mainnet deployment
Community & Support
Get help and connect with the community:- Celo Discord: Join the #nightfall channel for questions
- Celo Forum: Discuss integration strategies and use cases
- GitHub Issues: Report bugs or request features
About EY Nightfall
Nightfall was developed by Ernst & Young (EY) as an open-source privacy solution for public blockchains. The project has evolved through multiple iterations:- Nightfall_3: Optimistic rollup approach
- Nightfall_4: Current version using cryptographic (ZK-ZK) rollups for instant finality
Next Steps
- Explore the Nightfall technical documentation
- Review integration requirements
- Follow the Running the Client on Celo Sepolia guide to set up your development environment
- Join the Celo community to ask questions
- Start building your private payment application on testnet

