x402 FHE
Privacy-preserving payments using Fully Homomorphic Encryption (FHE) on Ethereum.
What is x402 FHE?
x402 FHE implements the HTTP 402 Payment Required protocol using fhEVM technology. It enables pay-per-access to resources using confidential tokens where balances and transfer amounts remain encrypted on-chain.
Key Features
- Confidential Payments: Transfer amounts are encrypted using FHE
- On-chain Privacy: Balances are never exposed publicly
- ERC7984 Tokens: Standard interface for confidential tokens
- Server-side Verification: Payment amounts verified without revealing values
Architecture
The system consists of three main components:
| Component | Description |
|---|---|
| Facilitator | Backend service that verifies FHE payments |
| Frontend | Next.js application with wallet integration |
| fhevm-sdk | SDK for FHE operations in React |
How It Works
- Client requests a protected resource
- Server returns HTTP 402 with payment requirements
- Client makes a confidential token transfer
- Client sends transaction hash to server
- Facilitator extracts and decrypts the transfer amount
- Server grants access if payment is valid
Production Facilitator
A hosted facilitator service is available for Sepolia testnet:
| Service | URL |
|---|---|
| Facilitator API | https://zama-facilitator.ultravioletadao.xyz |
| Health Check | https://zama-facilitator.ultravioletadao.xyz/health |
Provided by Ultravioleta DAO.
Quick Links
License
BSD-3-Clause-Clear