NULLID
Onchain identity with privacy, KYC, and trustless verification - 1 line integration
Problem Statement
NULL is a revolutionary universal identity verification protocol that combines the power of ENS (Ethereum Name Service), Self Protocol KYC, and custom ZK email verification circuits to create a comprehensive, privacy-preserving identity system that can be verified on-chain and integrated into any dApp with just one line of code. In today's Web3 ecosystem, every dApp requires users to re-verify their identity from scratch, compromise privacy by sharing personal data repeatedly, navigate complex KYC processes for each application, prove humanity through expensive centralized solutions, and verify employment through traditional non-private methods. NULL eliminates all of this friction while maintaining complete privacy through zero-knowledge proofs. The protocol works by establishing ENS as your universal Web3 identity foundation, where one human-readable address like vitalik.eth replaces long hex strings and provides cross-platform recognition across all dApps and protocols. It integrates privacy-preserving KYC using Self Protocol's zero-knowledge infrastructure for age verification without revealing exact birth dates, identity attestation without exposing personal documents, and government-issued ID verification with cryptographic proofs. The custom email verification circuit enables work email verification using ZK circuits, employment proof without revealing employer details, email header verification using Poseidon hashing, and local processing where your email never leaves your device. All proofs are verified on-chain for maximum security with immutable verification records stored on Ethereum, cross-dApp compatibility through standard verification contracts, and gas-efficient verification using aggregated proofs. The magic lies in the one-line code integration where developers can verify age with NULL.verifyAge(userAddress, 18), check employment with NULL.verifyEmployment(userAddress, "tech"), prove humanity with NULL.verifyHumanity(userAddress), or verify KYC levels with NULL.verifyKYCLevel(userAddress, 2) - no complex integrations, no privacy compromises, no repeated verifications. The system maintains complete privacy through zero-knowledge proofs that allow users to prove without revealing, share only what's needed for each dApp, and provide cryptographic guarantees that make faking mathematically impossible. Email verification happens entirely on the user's device with no cloud uploads, ensuring sensitive data never leaves their machine through client-side proof generation that gives users maximum privacy control. NULL serves as the infrastructure for Web3 identity across DeFi applications for age-restricted trading and KYC compliance, social platforms for humanity verification and age-appropriate content, gaming and NFTs for age-gated games and anti-sybil mechanisms, and DAO governance for human voting and professional expertise verification. The protocol envisions a Web3 where identity verification is universal with one verification working everywhere, privacy is preserved with users controlling their data completely, integration is simple with developers adding verification in one line, compliance is automatic with regulatory requirements met by default, and innovation is accelerated by allowing developers to focus on building rather than verifying. NULL isn't just another verification system - it's the infrastructure for Web3 identity that makes verification universal, private, simple, secure, efficient, and user-centric. Ready to revolutionize Web3 identity? NULL makes it possible with just one line of code.
Solution
The Core Innovation: Universal ZK Proof System The heart of NULL is a custom Circom circuit (eml_receiver.circom) that proves email ownership without revealing content. We built this using Poseidon hashing for efficient zero-knowledge operations, implementing a rolling hash system that processes 31-byte chunks of email data. The circuit uses one-hot selector vectors to prove the existence of required email headers (From:, To:, @gmail.com) (test) at any position without revealing their exact locations - this is the mathematical guarantee that makes fake proofs impossible. Client-Side Proof Generation: Complete Privacy The most complex part was implementing browser-based ZK proof generation using WebAssembly. We load the entire Circom toolchain directly in the browser - the compiled circuit (.wasm), proving key (.zkey), and witness calculator all run client-side. This means users can generate proofs for their emails without ever uploading them to any server. We built a custom input generator (build_input.js) that converts raw .eml files into circuit-compatible inputs, handling ASCII encoding, little-endian byte packing, and witness generation entirely in the browser. The Technical Stack: What Actually Powers It Circom: Custom circuit language for zero-knowledge constraints snarkjs: Groth16 proof system implementation circomlib: Poseidon hash library for efficient ZK operations WebAssembly: Client-side circuit execution File API: Local .eml file processing ArrayBuffer: Byte-level email data manipulation Web Workers: Non-blocking proof generation The Hacky Parts: Making It Work The most hacky implementation was dynamic import loading of the entire ZK proof system - we reduce initial bundle size from ~2MB to ~200KB by only loading snarkjs and circomlibjs when users actually need to generate proofs. We implemented memory-mapped file access for large email files using ArrayBuffer slicing and typed array views for efficient byte manipulation. The cross-origin resource sharing solution involved serving circuit files as public assets with proper MIME types and implementing fallback loading for different hosting environments. We built Web Worker integration to prevent UI blocking during proof generation, with real-time progress updates showing each step of the process. Smart Contract Integration: On-Chain Verification We integrated with Self Protocol's verification contracts for KYC attestations, implementing a custom verification flow that checks user attestation status and maps it to our universal verification system. The contract integration uses ethers.js v6 with proper TypeScript typing, implementing gas estimation and transaction retry logic for reliable on-chain interactions. The Universal API: One-Line Integration The core innovation is the universal verification interface that abstracts all complexity behind simple function calls. We built a TypeScript SDK with comprehensive type definitions and React hooks for easy frontend integration. The API design uses method chaining and fluent interfaces to make complex verification flows readable and maintainable. Performance Optimizations: Making It Fast We implemented code splitting to load ZK libraries only when needed, tree shaking to eliminate unused circomlib functions, and WebAssembly optimization for faster witness generation. The most significant optimization was lazy loading the entire ZK proof system, reducing initial page load time from 8 seconds to under 1 second. Security: Mathematical Guarantees We implemented cryptographic verification of all proofs using the same verification keys used for generation, ensuring mathematical impossibility of fake proofs. The system uses Poseidon hashing for efficient zero-knowledge operations and Groth16 proofs for industry-standard security guarantees. We built input validation that checks email format and required headers before attempting proof generation. The Result: True Web3 Identity Infrastructure NULL provides universal identity verification with complete privacy, one-line integration for developers, and mathematical security guarantees through zero-knowledge proofs. The architecture scales from simple age verification to complex employment attestations, all while maintaining user privacy and providing seamless developer experience. This is the future of Web3 identity - where verification is universal, private, and simple.
Hackathon
ETHGlobal New Delhi
2025
Contributors
- cadalt0
3 contributions