Pops
Proof-of-Progress: verified steps, sealed in a TEE, saved forever on IPFS
Problem Statement
Pops (Proof of Progress) is a decentralized application that enables users to create cryptographically verifiable proof of their real-time presence and activities through video capture. The system solves the fundamental problem of proving "you were there, then" in a trustless, tamper-proof way.How It Works:The application generates a unique cryptographic challenge (hash) that gets recorded on-chain. Users then capture a short video where strobe patterns flash at specific timestamps derived from this challenge. A verifier service analyzes the video to detect these strobes and confirms they match the on-chain challenge, proving the video was captured live and hasn't been pre-recorded or manipulated.Technical Architecture:Smart Contracts (Solidity): ERC-721 tokens on Celo Sepolia represent each "Pop" with on-chain challenge generation and progress recording Web Frontend (React + TypeScript): Mobile-first minimalistic UI with Vite, Privy for wallet authentication, Wagmi for blockchain interaction Verifier Service (Python): OpenCV-based video analysis running in a Trusted Execution Environment (TEE) on Oasis Network's ROFL infrastructure for secure, private verification Uploader Service (Node.js): IPFS integration via Pinata for decentralized storage of verified captures State Machine Flow: Automated challenge generation → video capture → verification → on-chain sealing Key Features:Trustless Verification: No central authority needed - cryptographic proofs validate authenticity Privacy-Preserving: Verification happens in TEE, ensuring video analysis remains confidential Immutable Record: All proofs are permanently stored on blockchain with IPFS references User-Friendly: Single-button workflow auto-generates challenges, captures video, verifies, and records on-chain Decentralized Storage: Screenshots uploaded to IPFS for censorship-resistant access Use Cases:Attendance verification for events Remote work proof of presence Gig economy task completion proof Educational credential verification Supply chain checkpoint validation Digital nomad location verification The project demonstrates practical application of blockchain, cryptographic challenges, computer vision, and TEE technology to solve real-world trust problems in a decentralized manner.
Solution
Pops is built with a sophisticated multi-layered architecture combining blockchain, computer vision, cryptography, and trusted execution environments.Frontend Stack:We built a mobile-first React application using Vite for blazing-fast development and TypeScript for type safety. The UI leverages Privy for seamless wallet authentication (supporting embedded wallets and external providers) and Wagmi v2 for blockchain interactions. The capture flow is orchestrated with a custom useReducer state machine that manages the complex sequence: challenge generation → video capture → verification → on-chain recording. We used the browser's MediaRecorder API to capture video with synchronized audio, and HTML5 Canvas to overlay cryptographic strobe patterns in real-time during recording.Smart Contract Architecture:Deployed on Celo Sepolia, our Pop.sol contract is an ERC-721 implementation that generates deterministic challenges using keccak256(block.timestamp, block.prevrandao, msg.sender). Each challenge produces a unique hash that derives strobe timings through modulo operations on hash bytes. The contract stores an array of progress records (challenge hash + IPFS CID + timestamp) enabling immutable proof history. We emit events for challenge generation and progress recording, which the frontend listens to via watchContractEvent.Verifier Service - The Hacky Bits:This is where it gets interesting. The Python verifier runs on Oasis Network's ROFL (Runtime Off-chain Logic) infrastructure - a Trusted Execution Environment that guarantees computation privacy. Using OpenCV, we implemented a sophisticated strobe detection algorithm:Convert video to grayscale frames at 30fps Calculate frame-to-frame differences to detect brightness spikes Apply adaptive thresholding to handle varying lighting conditions Use a sliding window to match detected strobes against expected challenge timings (±50ms tolerance) Extract a screenshot at the moment of verification The particularly hacky part: we encode the challenge parameters (strobe count, duration, timings) directly into the hash bytes, making it deterministic yet unpredictable. The verifier must detect strobes in the correct temporal sequence - you can't fake this with edited video because the timing synchronization is cryptographically bound to the on-chain challenge.IPFS Upload Pipeline:Built with Node.js and Express, the uploader service uses Pinata SDK v2 for IPFS uploads. We implemented Sharp for server-side image resizing (max 1024px width) before upload to optimize storage costs. The service runs in the same Docker container as the verifier (pops-verifier) for secure, isolated processing. We use Pinata's public gateway with a custom domain for fast, reliable content delivery.Partner Technology Integration:Privy: Simplified onboarding dramatically - users can start with email and get an embedded wallet instantly, lowering the Web3 barrier Celo: Low gas fees and fast finality (5-second blocks) made the user experience smooth for frequent on-chain interactions Oasis ROFL: Critical for privacy-preserving verification - videos are analyzed in TEE and never leave the secure enclave, only verification results are returned Pinata: Reliable IPFS pinning service with excellent API and custom gateway support Notable Implementation Details:Auto-capture flow: We chain async operations with careful state management to create a seamless single-button experience Transaction receipt waiting: Used publicClient.waitForTransactionReceipt() to ensure on-chain confirmation before proceeding with capture Canvas strobes: Real-time drawing during recording using requestAnimationFrame with performance.now() for precise timing Error handling: Comprehensive try-catch with user-friendly error messages throughout the async flow Gradient text logo: Used bg-clip-text with text-transparent for a polished branded look that adapts to dark/light themes Deployment:Frontend deployed on Vercel with automatic GitHub integration. Backend services containerized with Docker and deployed on Oasis testnet infrastructure with API proxy routing through vercel.json rewrites.The entire system proves "liveness" without requiring complex biometrics - just physics, timing, and cryptography.
Hackathon
ETHGlobal Buenos Aires
2025
Contributors
- guy-do-or-die
32 contributions