
CupFi
Save the planet, one sip at a time—get rewarded for using your reusable cup!
Demo
About
We are living in an era defined by a supremacy of compute. AI models are getting larger, GPU demands are skyrocketing, and everyone is chasing “faster technology” and stronger inference speeds. The Web3 world is no exception — AI agents, on-chain DeFi modules, and modular layers are proliferating rapidly. But do we really need all this “new tech”? Or are we actually lacking truly meaningful use cases? Most current blockchain applications remain trapped in their own echo chambers. The complex mechanisms of DeFi and the hype-driven language of NFTs make it hard for outsiders to relate. Ask them: “Would you use these?” The answer is often: “Why should I?” ✧ What will truly bring Web3 to the masses isn’t deeper technology, but more accessible on-ramps. CupFi is exactly such an entry point. It doesn’t begin with speculation — it begins with the everyday. A reusable cup, a carbon-reducing action, can unlock on-chain identity, initiate staking, claim tokens, participate in DeFi, and unlock the full Web3 journey. No tutorial videos, no complicated steps, no technical barriers. CupFi users might not even realize they’re using blockchain. And yet, they’ve completed their first on-chain transaction, experienced their first staking, and earned their first sustainability token. ✧ The future of Web3 is not something you consciously “enter” — it’s something you unknowingly live in. Starting from a cup of coffee, let the chain come into real life — not people going into the chain. ✦ Multimodal AI Verification Core At the heart of CupFi’s technology lies a cutting-edge multimodal AI model used to validate eco-conscious behaviors: ➤ Image Recognition Accuracy – Utilizes advanced visual recognition algorithms to precisely identify reusable cups in submitted photos ➤ Scene Context Comprehension – AI interprets environmental and contextual clues to distinguish genuine usage from fraudulent scenarios ➤ Professional Prompt Engineering – The development team has designed optimized prompts that significantly enhance recognition accuracy ➤ Forgery Detection – The model is specially trained to detect photo tampering and manipulation ➤ Continuous Learning Mechanism – Verification cases are logged to continually refine the system’s detection capabilities ✦ Three-Layer Verification Framework CupFi has developed a resilient three-tier verification architecture: ➤ Self Protocol Identity Verification – Ensures each user is a real individual using zero-knowledge proof (ZKP) technology ➤ Economic Staking Mechanism – Introduces an economic layer through CELO token staking to deter dishonest behavior ➤ Multimodal AI-Based Image Verification – Verifies the authenticity of eco-friendly actions through cutting-edge AI analysis ✦ Integration with Self Protocol CupFi deeply integrates with Self Protocol, a privacy-first, open-source identity system: ➤ Zero-Knowledge Proofs – Users can verify identity without disclosing personal information ➤ NFC-Based Passport Scanning – Users generate ZKPs by scanning passport data via mobile NFC functionality ➤ Selective Disclosure – Users may choose to share only the necessary parts of their identity ➤ Sybil Attack Mitigation – Effectively prevents bots and multiple account exploitation ✦ Staking Verification Mechanism Once users complete identity verification through Self Protocol, they must stake a minimum of 0.0001 CELO tokens to become eligible. This mechanism: ➤ Establishes a threshold for genuine participation ➤ Raises the barrier for fraudulent behavior ➤ Provides a basis for reward distribution ➤ Aligns users with vested economic interest ✦ Full User Journey ➤ Identity Authentication Users complete a one-time identity verification via Self Protocol to establish their authenticity ➤ Token Staking Users stake CELO tokens (minimum 0.0001 CELO) through the StakingPool contract ➤ Photo Submission Upon qualification, users upload photos documenting their use of reusable cups ➤ AI-Based Verification The multimodal AI analyzes submissions across multiple dimensions to verify authenticity ➤ Daily Validation Requirement Users must complete 3 successful verifications per day to become reward-eligible ➤ Reward Distribution Qualified users receive EcoCupToken rewards based on their staking amount and current APR ✦ Technical Highlights ➤ Advanced AI Application – Employs state-of-the-art multimodal AI to accurately identify eco-conscious behaviors ➤ Zero-Knowledge Identity Verification – Implements privacy-preserving identity validation through Self Protocol ➤ Layered Anti-Fraud Measures – Combines identity verification, staking incentives, and AI-based validation ➤ Sustainable DeFi Architecture – Built on Celo’s carbon-neutral blockchain, aligning with eco-friendly principles ➤ Scalable Incentive System – Dynamically adjusts rewards based on user engagement and staking volume
How it's made
✦ Project Development Process ✧ Smart Contract Architecture and Workflow Design ➤ Design Philosophy of the Contract System We’ve designed a thoughtfully structured smart contract system to ensure security, scalability, and user experience: ➤ Modular Contract Architecture Functionality is divided across five specialized contracts, each responsible for a specific domain Adheres to the principle of separation of concerns for ease of maintenance and upgrades Establishes clear inter-contract relationships to enhance security ➤ User-Centric Workflow Design Streamlined on-chain interaction steps to minimize user wait time and gas fees Complex logic is encapsulated within the contracts, exposing intuitive interfaces externally Error-prevention mechanisms are in place to protect users from fund loss due to misoperations ➤ Security-First Code Implementation Core functionalities built with OpenZeppelin’s standard libraries Strict access control mechanisms prevent unauthorized actions Reentrancy guards and overflow protections are implemented Emergency pause functionality allows rapid response to potential vulnerabilities ✧ Inter-Contract Collaboration Workflow Our smart contract ecosystem is designed to form a fully coordinated framework: ➤ SelfVerification Contract Receives and verifies zero-knowledge proofs (ZKPs) from the Self Protocol Implements one-time identity verification logic Stores hashes of verification results rather than personal data to preserve privacy Emits verification events to trigger subsequent processes ➤ StakingPool Contract Manages the core CELO staking logic Implements minimum staking threshold checks (0.0001 CELO) Optimizes withdrawal processes to protect user assets Supplies real-time staking data to the reward calculation system ➤ VerificationRegistry Contract Acts as a central coordinator, connecting other contracts Maintains daily verification records of reusable cup usage Implements time-window management and daily reset mechanisms Provides a public interface for checking verification status ➤ RewardController Contract Implements reward logic based on staking amount and APR Checks verification completion and reward eligibility Manages reward distribution time windows Interacts with the EcoCupToken contract to mint reward tokens ➤ EcoCupToken Contract Implements a standard ERC-20 token Role-based minting authority control Supports future governance and ecosystem expansion ✧ Carefully Engineered Multimodal AI Prompt System We leveraged Gemini's multimodal capabilities to build an advanced reusable cup verification system. The core lies in our prompt engineering: ➤ Prompt Design Process ✧ Problem Definition Phase Identified common reusable cup usage scenarios through user interviews Collected sample images of various reusable cup types Analyzed frequent misclassification cases and edge scenarios Defined clear identification standards and validation thresholds ✧ Multi-Round Optimization Iterations Initial prompt achieved ~65% accuracy First optimization added detail-oriented cues, raising accuracy to 75% Second round introduced a structured analysis framework, reaching 85% Final version incorporated a multidimensional evaluation matrix, exceeding 95% accuracy ➤ Structured Prompt Framework Our final prompt structure includes the following key elements: Detailed Task Definition – Clearly defines AI objectives and expected outputs Key Feature Checklist – Guides AI to identify reusable cup characteristics Evaluation Matrix – Provides a 0–10 scoring system across multiple dimensions Negative Examples – Clarifies invalid verification cases Decision Tree – Guides AI through logical steps for decision-making Confidence Score Requirement – Asks AI to provide confidence scores for each judgment ➤ Multi-Metric Evaluation System Our prompt instructs the AI to evaluate the following dimensions: Whether a reusable cup is clearly visible in the image Whether the user is actively using the cup Whether the environment suggests a real usage context Presence of indicators suggesting a disposable cup Overall image quality and clarity ➤ Handling Challenging Scenarios Our prompt system is designed to address difficult edge cases: ✧ Low-Light Environments Includes specific guidance for identifying cups in dim lighting Prompts for contrast-enhancing analysis techniques ✧ Similar Container Differentiation Provides distinguishing traits between reusable and disposable cups Adds material recognition guidance (glass, metal, silicone, etc.) ✧ Partially Visible Cups Introduces inference logic based on visible portions Sets a minimum visibility threshold for validation ✧ Creative Camera Angles Adds instructions for multi-angle recognition Considers atypical usage scenarios in validation criteria ✧ Frontend Technology and User Experience ➤ Mobile-First Vertical UI Design ✧ Vertical Flow UI Vertical scrolling single-page app design Optimized for one-handed mobile operation Enables seamless photo capture and upload ✧ Integrated Camera Access Directly accesses the mobile camera within the app Provides real-time preview and quick capture confirmation Enhances upload experience and reduces wait time ✧ Responsive Design Tailwind CSS-based responsive layout Automatically adjusts UI elements to device specifications Ensures consistent experience across screen sizes ➤ Intuitive User Journey ✧ Simplified Onboarding Flow Intuitive wallet connection process Clear guidance through identity verification steps Easy onboarding for initial staking ✧ Optimized Verification Flow On-screen tips for ideal angles and lighting during photo capture Real-time verification progress and attempt count Instant feedback on results to reduce user uncertainty ✧ Transparent Rewards Real-time display of current stake and expected rewards Clear reward claim conditions and time windows Visual history of reward achievements ✧ Technical Challenges and Innovative Solutions ➤ Smart Contract Challenges & Solutions ✧ Efficient Verification Recordkeeping Designing a bitmap compression algorithm to store 3 daily verification states in a single uint8 Reusing date-based mappings to avoid unbounded storage growth Resulted in an ~85% reduction in storage costs ✧ Dynamic Time Window Management Implementing a UTC-based smart date conversion system Using block timestamps to define transition points Adding safety checks against timestamp manipulation ✧ Gas Efficiency Optimization A read/write separation model to optimize storage operations Used events instead of storage for non-critical data Batched multiple verification actions into single operations ➤ AI Verification Experience Enhancements ✧ Real-Time Feedback System Provides photo tips based on initial AI analysis Visual indicators show verification progress Offers actionable suggestions instead of generic success/failure ✧ Seamless Cross-Network Experience Automatically detects and adapts to user’s network Smooth transition between mainnet and testnet configurations Clear network indicators and switching options provided ✧ Technical Integration and Synergy ➤ Celo + Mobile Experience Fast confirmation times align perfectly with real-time verification needs Mobile-optimized transaction handling reduces wait time Low gas fees make frequent verifications economically viable Complements our vertically designed mobile application ➤ Self Protocol + User Experience Wraps complex zero-knowledge proof logic in intuitive interfaces Uses mobile NFC for quick passport scans One-time identity verification removes repeat friction Fully preserves user privacy by only storing verification results on-chain ✧ Future Technical Development ➤ Features under development include geolocation verification for enhanced authenticity ➤ Planned social sharing functions to amplify ecosystem impact ➤ Exploring eco-behavior NFT badge systems to encourage long-term engagement ➤ Upcoming merchant integration module to offer real-world discounts at partner cafes