Privacy-preserving multi-dimensional rating system built on FHEVM technology
CrypticScore is a decentralized application that enables users to create and participate in rating projects while maintaining complete privacy of individual ratings through Fully Homomorphic Encryption (FHE). Built on the FHEVM blockchain, it allows aggregated statistical analysis without compromising user privacy.
- π Fully Encrypted Ratings: Individual ratings remain private on-chain using FHEVM encryption
- π Multi-Dimensional Analysis: Support for custom rating dimensions (Quality, Service, Value, etc.)
- π Statistical Insights: Decrypt aggregated statistics while preserving individual privacy
- π Dual Network Support: Works on both local development (Mock) and Sepolia testnet
- π¨ Modern UI: Glassmorphism design with responsive layout and dark mode support
βββ fhevm-hardhat-template/ # Smart contracts & deployment
β βββ contracts/ # Solidity contracts
β βββ deploy/ # Deployment scripts
β βββ tasks/ # Hardhat tasks
β βββ test/ # Contract tests
βββ crypticscore-frontend/ # React/Next.js frontend
β βββ app/ # Next.js App Router pages
β βββ components/ # React components
β βββ hooks/ # Custom React hooks
β βββ fhevm/ # FHEVM integration
β βββ abi/ # Generated contract ABIs
βββ Fhevm0.8_Reference.md # FHEVM documentation
- Node.js 18+
- MetaMask wallet
- Git
git clone https://github.com/ChapmaBeerbohm/crypticscore.git
cd crypticscore
# Install contract dependencies
cd fhevm-hardhat-template
npm install
# Install frontend dependencies
cd ../crypticscore-frontend
npm install# Terminal 1: Start Hardhat node
cd fhevm-hardhat-template
npx hardhat node
# Terminal 2: Deploy contracts
npx hardhat deploy --network localhost
# Terminal 3: Start frontend
cd ../crypticscore-frontend
npm run dev:mockVisit http://localhost:3000
# Configure environment
cd fhevm-hardhat-template
npx hardhat vars set MNEMONIC "your twelve word mnemonic"
npx hardhat vars set INFURA_API_KEY "your_infura_key"
# Deploy to Sepolia
npx hardhat deploy --network sepolia
# Start frontend for testnet
cd ../crypticscore-frontend
npm run dev- Connect Wallet: Link your MetaMask to localhost:8545 or Sepolia testnet
- Create Project: Define rating dimensions and criteria
- Submit Ratings: Participate in projects with encrypted ratings
- View Results: Project creators can decrypt aggregated statistics
- Manage: Track your created projects and participation history
- Localhost:
0xfc248842540C08e62785ce3bf80ceEc415f0EcaB - Sepolia:
0x433097721b74e4AcF48dDb6a407Fa4a0CFB8A94d
cd fhevm-hardhat-template
npx hardhat testnpm run compile # Compile Solidity contracts
npm run test # Run contract tests
npm run deploy:local # Deploy to localhost
npm run deploy:sepolia # Deploy to Sepolianpm run dev:mock # Local development with Mock FHEVM
npm run dev # Development with real FHEVM SDK
npm run build # Production build
npm run genabi # Generate ABI files from deployments- End-to-End Encryption: Ratings are encrypted client-side before blockchain submission
- Zero-Knowledge Privacy: Individual ratings never appear in plaintext on-chain
- Selective Decryption: Only authorized parties can decrypt specific data
- Audit Trail: All operations are verifiable on the blockchain
CrypticScore leverages FHEVM's native capabilities:
euint32encrypted integers for rating storageFHE.fromExternal()for encrypted input processingFHE.allow()for selective decryption authorization- Dual SDK support:
@fhevm/mock-utils(local) +@zama-fhe/relayer-sdk(testnet)
- Blockchain: FHEVM (Fully Homomorphic Encryption Virtual Machine)
- Smart Contracts: Solidity 0.8.27
- Frontend: React 18, Next.js 15, TypeScript
- Styling: Tailwind CSS with Glassmorphism design
- Charts: Chart.js with react-chartjs-2
- Development: Hardhat, Ethers.js v6
| Network | Chain ID | Status | Contract Address |
|---|---|---|---|
| Localhost | 31337 | β Active | 0xfc2...caB |
| Sepolia | 11155111 | β Active | 0x433...94d |
Create .env in fhevm-hardhat-template/:
MNEMONIC="your twelve word seed phrase"
INFURA_API_KEY="your_infura_project_key"
ETHERSCAN_API_KEY="your_etherscan_key" # Optional for verificationCreate .env.local in crypticscore-frontend/:
NEXT_PUBLIC_NETWORK=sepolia
NEXT_PUBLIC_CHAIN_ID=11155111- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Live Demo: [Coming Soon]
- Documentation: FHEVM Docs
- Sepolia Contract: 0x433097721b74e4AcF48dDb6a407Fa4a0CFB8A94d
- Gas Efficient: Optimized contract deployment (~1.5M gas)
- Fast Loading: Next.js with static generation
- Responsive: Mobile-first design with Tailwind CSS
- Real-time: Instant feedback on blockchain interactions
Built with β€οΈ using FHEVM technology for privacy-preserving applications.