LensMint Camera
Tamper-proof Web3 camera with ZK authenticity and instant NFT memories for everyone.
Problem Statement
LensMint is a full hardware-to-blockchain camera system designed to guarantee the authenticity and ownership of real-world photos. Built on a Raspberry Pi camera with hardware-derived cryptographic identity, every photo is signed at capture, hashed, and proven genuine using zero-knowledge proofs generated through vlayer and verified on-chain via RISC Zero. The system uploads all media to Filecoin for permanent decentralized storage and mints an ERC-1155 NFT representing the authenticated memory. A built-in QR system lets people in the photo instantly claim their NFT, enabling proof of attendance, verified memories, and automatic revenue sharing. LensMint provides a trustless way to prove a photo’s device origin, timestamp, and integrity—solving authenticity, provenance, and monetization issues for creators, journalists, events, and scientific documentation.📌 ProblemModern photography has lost trust. AI-generated images, deepfakes, and easy metadata manipulation make it nearly impossible to verify whether a photo is real, who captured it, or whether it has been tampered with. Journalists, wildlife photographers, event organizers, and creators need a reliable way to prove authenticity. Creators also lack transparent monetization; there’s no standard for proving ownership, tracking usage, or distributing royalties.💡 SolutionLensMint is a hardware-based Web3 camera system that creates tamper-proof, cryptographically verified photos at the moment of capture. Each photo is automatically signed, hashed, verified with zero-knowledge proofs, stored permanently, and converted into a claimable NFT. People in the photo simply scan a QR code to claim their authenticated memory, enabling verified attendance and frictionless creator monetization.🛠️ How It Works (Technical Breakdown)Each camera generates a hardware-derived cryptographic identity tied to the device.When a photo is taken, the image is signed using the device key and its SHA-256 hash is generated.This data is passed to vlayer to generate a zero-knowledge proof proving the device, timestamp, and integrity—without exposing raw metadata.A RISC Zero verifier contract validates the ZK proof entirely on-chain.Image + metadata are stored permanently on Filecoin with immutable CIDs.The camera displays a QR code linked to a claim server; users scan and enter their wallet to receive the minted NFT.Smart contracts ensure provenance, authenticity, and optional revenue-sharing between tagged participants.🎯 What LensMint EnablesTrustless, verifiable photography (proof that a real device captured a real moment)Proof of attendance for events, meetups, conferencesOn-chain memory preservation with permanent Filecoin storageVerified journalism and scientific documentationCreator monetization via royalties and transparent provenanceZK-powered privacy, proving authenticity without leaking sensitive info like exact GPS or EXIF
Solution
🔧 Hardware LayerLensMint runs on aRaspberry Pi 4with aPi Camera Module v3and a3.5" touchscreen. We built acustom hardware identity systemwhere the device generates a private key derived from hardware entropy (serial, CPU ID, randomness mix). This creates aunique, non-exportable camera identityused to sign every photo.The camera interface usesPicamera2, with real-time preview, 1080p capture, rotation correction, and custom Kivy UI for a touch-friendly camera app.We also wrote low-level image handling utilities to:Capture RAW JPEG buffersCompute SHA-256 on-deviceSign image metadata with hardware keyQueue offline uploads when network is downThis makes the camera act like astandalone cryptographic signerfor all photos.🖥️ Software (On-Device Application)The frontend is aPython/Kivyapp providing:Live previewCapture & video modeGalleryQR claiming interfaceStatus feedbackIt communicates with the backend via a lightweightlocal REST API.A small Python module handles:Hardware key generationSigning operationsImage hashingEXIF sanitizationAutomatic device registration via Web3This turns the camera into aself-contained cryptographic photo oracle.🌐 Hardware Web3 Service (Backend)The backend is aNode.js/Expressservice running on the same Pi (or edge server). It handles everything the camera shouldn’t: heavy Web3 calls, uploads, and ZK integration.Tech stack:Node.js (Express)– local REST APIEthers.js– blockchain interactionSQLite– claims databaseMulter– file handlerSynapse Filecoin SDK– uploads to Filecoin/IPFSThis service receives signed images, verifies signatures, uploads media, and triggers mints.🧠 Zero-Knowledge Proof Pipeline (vlayer + RISC Zero)This is the core innovation.1. Generating ZK Proofs (vlayer API)We use vlayer to producezero-knowledge proofs from external metadata and device signatures.It proves:The photo hash matchesThe device key matches a registered identityTimestamp is freshImage wasn’t AI-generated or alteredThis allows on-chain verificationwithout revealing EXIF or sensitive data.2. On-chain verification (RISC Zero Verifier Contract)The ZK proof is validated using aRISC Zero verifier contract, allowing trustless validation of:Authentic captureDevice identityIntegrity of metadataThis is the cornerstone oftamper-proof photography.📦 Storage Layer (Filecoin / IPFS)The Synapse SDK uploads:Raw photo fileMetadata JSON (proof, signatures, CIDs, device ID, hash)Both are stored permanently onFilecoinwith CID-based addressing.This gives us:Permanent, decentralized memoryImmutable provenanceZero dependency on centralized cloud storage🔗 Smart Contracts (Ethereum Sepolia)Three key contracts:1. DeviceRegistry.solRegisters camera identitiesEnsures only authorized devices can mintVerifies device → wallet ownership2. LensMintERC1155.solMints the actual authenticated photo NFTsEnforces device-only mintingSupports editions, transfers, and claims3. LensMintVerifier.solUsesRISC Zeroto verify ZK proofsValidates image hash + metadata hashConfirms the device is legitAll logic is optimized for gas and tamper-proof provenance.📱 Claiming System (Public Server + QR Flow)We built a public claim server where each photo:Creates a unique claim IDGenerates a QR codeWaits for user wallet submissionSignals the device to mint to that walletThis allowsusers in the phototo instantly claim the NFT without needing the camera operator.⚙️ Hacky (but awesome) EngineeringWe had to build several creative hacks:Hardware-derived private key generatorwithout exposing entropy sourcesCustom Python → Node communication layer to handle signed JPEG buffersOn-devicequeue-based uploaderfor bad network situationsReal-time QR code generation inside a Kivy UIImage signing + hashing pipeline optimized to avoid lag on Raspberry PiA mini Web3 RPC load balancer to avoid slow public RPCsA single-click “auto-register device on-chain” systemThese hacks allowed a low-powered Raspberry Pi to runZK proofs, Filecoin uploads, cryptographic signing, and real-time camera preview all together.
Hackathon
ETHGlobal Buenos Aires
2025
Prizes
- 🏆
🏆 ETHGlobal Buenos Aires 2025 Finalist
ETHGlobal
- 🏆
Best ZK Proving dApp
vlayer
Contributors
- mbcse
45 contributions