A decentralized review platform powered by zero-knowledge proofs for verified, trustworthy reviews.
ZKTrust is a trustless review platform similar to Trustpilot, but with enhanced trust mechanisms. The core innovation is using ZK Email to cryptographically verify that a reviewer actually had a specific interaction (like making a purchase) with the business they are reviewing, thus combating fake reviews.
This project uses a monorepo structure with the following organization:
zk-trust-src/
├── zktrust-backend/ # Express API for proof verification
├── zktrust-contracts/ # Smart contracts for Base integration
├── zktrust-frontend/ # Next.js frontend application
└── README.md # This file
- Node.js (v18 or higher recommended)
- npm or yarn
- MetaMask browser extension (for blockchain interactions)
- Clone this repository
- Install dependencies for all projects:
# Install backend dependencies
cd zktrust-backend
npm install
# Install frontend dependencies
cd ../zktrust-frontend
npm install
# Install smart contract dependencies
cd ../zktrust-contracts
npm installStart all components in separate terminal windows:
# Terminal 1: Start the backend
cd zktrust-backend
npm run dev
# Terminal 2: Start the frontend
cd zktrust-frontend
npm run dev
# Terminal 3: Start a local blockchain (optional)
cd zktrust-contracts
npm run nodeThe frontend allows users to:
- Upload Gumroad purchase confirmation emails (.eml)
- Generate ZK proofs using the ZK Email SDK
- Connect their Ethereum wallet (MetaMask)
- Submit verified reviews on-chain
- View verification results with extracted product information
Access the frontend at: http://localhost:3000
The backend provides API endpoints for:
- Verifying ZK proofs generated from Gumroad purchase emails
- Extracting product information from verified proofs
- Managing review submission and retrieval
API endpoints:
- Health check: http://localhost:3002/api/health
- Verify proof: http://localhost:3002/api/verify-gumroad-proof (POST)
- Submit review: http://localhost:3002/api/submit-review (POST)
- Get reviews: http://localhost:3002/api/reviews (GET)
The project includes smart contracts for the Base testnet (Sepolia):
- ReviewVerification: Verifies zero-knowledge proofs on-chain
- ReviewStorage: Stores verified reviews and their metadata
- ReviewRegistry: Manages products, reviewers, and services
To compile and deploy the contracts:
# Compile contracts
cd zktrust-contracts
npm run compile
# Deploy to local node
npm run deploy:local
# Deploy to Base Sepolia testnet
npm run deploy:base-sepolia- Frontend: Next.js, React, Tailwind CSS, ZK Email SDK, ethers.js
- Backend: Express, TypeScript, SQLite, ZK Email SDK
- Smart Contracts: Solidity, Hardhat, Base (Layer 2)
- ZK Technology: ZK Email Blueprint SDK for DKIM signature verification
- Phase 1: Email proof generation ✅
- Phase 2: Backend proof verification ✅
- Phase 3: Smart contract implementation ✅
- Phase 4: On-chain review storage and verification ✅
- Phase 5: Decentralized review platform launch 🔜
This project integrates with Base, a Layer 2 Ethereum scaling solution developed by Coinbase. The Base integration enables:
- On-chain verification of email proofs: Cryptographically verify that reviewers had legitimate interactions with businesses.
- Trustless review storage: Store verified reviews on-chain for maximum transparency and censorship resistance.
- Decentralized reputation system: Build a reputation system for both reviewers and businesses.
To use the Base integration, ensure you have:
- MetaMask installed with Base Sepolia testnet configured
- Base Sepolia ETH for gas (available from the Base Faucet)