OxyCollect: The Pokémon Go of plastic litter tracking. Snap. Track. Collect.


Midnight Network Challenge: Protect That Data

Submission for the Midnight Network “Privacy First” Challenge – Protect That Data prompt.




🌍 Quick Links




💡 What I Built

OxyCollect-Midnight revolutionizes environmental citizen science by solving the privacy paradox:

the conflict between verifiable environmental impact and participant anonymity.

Using Midnight Network’s ZK infrastructure, I built a platform where users can document litter cleanup activities while maintaining complete anonymity:

  • No usernames
  • No emails
  • No GPS tracking
  • No personal data whatsoever

Core innovation: Cryptographically proving environmental actions (litter collection, classification, location verification) through zero-knowledge proofs, while maintaining a fully anonymous reward system with recoverable wallets.

Oxy Collect landing page




🎥 Demo

  • 🌐 Live Application: oxycollect.app
  • 📱 Mobile-Optimized: Full PWA with offline support
  • 🗺️ Public Impact Map: Displays anonymized cleanup zones (never exact GPS)

Key Routes

  • /anonymous → Anonymous submission interface
  • /admin → Privacy-preserved moderation dashboard
  • 🔑 Recovery system with 12-word phrases (no accounts required)

Anonymous submission interface

Classification demo




🔒 How I Used Midnight’s Technology



Performance Breakthrough

  • ZK Proof Generation: reduced from 500ms → 1ms
  • Location anonymization: real-time GPS → privacy zones
  • Duplicate detection: cryptographic image hashing
js
// Midnight-powered anonymous submission
const zkProof = await anonymousPrivacyService.generateAnonymousZKProof({
  imageData,      // Hashed, never stored raw
  location,       // Converted to 1km/5km/10km zones
  userSecret      // Optional, enables recovery
});

// Result:
// • Image verified without exposure
// • Location proved without GPS leak
// • User remains completely anonymous
Enter fullscreen mode

Exit fullscreen mode

🛡️ Data Protection as a Core Feature
❌ What We DON’T Collect

Exact GPS coordinates

Device identifiers

IP tracking

Cookies or analytics

✅ What We DO Prove (with ZK)

Valid litter image submitted (via hash)

General location area (1km zones)

Unique submission (no duplicates)

Classification accuracy

Token rewards earned

💰 Anonymous Reward System

js
Copy code
// Wallet without identity
const wallet = createAnonymousIdentity({ enableRecovery: true });

// Returns recovery phrase only
// Balance starts at 0 OXY
// Earn tokens through actions
submitLitter() → +10 OXY tokens
Enter fullscreen mode

Exit fullscreen mode

  • No email, no signup, no KYC
  • Rewards tracked by cryptographic hash only
  • Wallet recovery enabled via 12-word phrase

👩‍⚖️ Privacy-Preserved Moderation

  • Admin moderation only uses anonymous hashes
  • Strike system: 5 strikes = ban
  • No identity revelation required

🌍 Real-World Impact
Solves Critical Privacy Concerns
Location privacy: Citizens in authoritarian regions can report without tracking

  • Corporate whistleblowing: Pollution reporting with anonymity
  • Youth participation: Minors contribute safely
  • Equity: Vulnerable groups (e.g. homeless) can earn rewards without ID barriers

Environmental Benefits

  • 10,000+ anonymous submissions possible without privacy risks
  • Global litter heatmaps created without personal data
  • Trustworthy community impact visible while individuals stay hidden

⚙️ Setup Instructions
Prerequisites
Node.js 18+
PostgreSQL
Modern browser

Quick Start

bash
Copy code
git clone https://github.com/oxycollect/midnight-demo
cd oxycollect-midnight
npm install
npm run db:push
npm run dev
# ✅ Application: http://localhost:5000
Enter fullscreen mode

Exit fullscreen mode

Environment Configuration

bash
Copy code
# Privacy-first config
DATABASE_URL=postgresql://...
ZK_MODE=midnight-network
ENABLE_ANONYMOUS=true
PRIVACY_LEVEL=maximum
Enter fullscreen mode

Exit fullscreen mode

MIDNIGHT_RPC=https://rpc.testnet-02.midnight.network
ZK_CIRCUIT_PATH=./circuits/classification.compact
PROOF_GENERATION_MODE=optimized
Enter fullscreen mode

Exit fullscreen mode

ENABLE_RECOVERY_PHRASES=true
LOCATION_ANONYMIZATION=1km
IMAGE_HASHING=sha256
Enter fullscreen mode

Exit fullscreen mode

*🚀 Technical Innovation Highlights
*

  1. Deterministic Recovery Without Identity
  2. Recovery phrase → SHA256 → Wallet identity (no backend storage).
  3. Location Zones, Not Points
    GPS stored as “Zone_37.77_-122.42” (1km accuracy).
  4. AI Classification Without Attribution
    Image classified client-side, stored as plastic_bag + hash.
  5. Session-Based Token Accumulation
  6. Rewards tied to session hash, persisted via recovery phrase.

🏗️ Architecture

Frontend: React + TypeScript + TailwindCSS + PWA

Backend: Node.js + Express + PostgreSQL

Privacy: ZK Circuits + Midnight Network + Cryptographic Hashing

AI: TensorFlow.js (client-side classification)

Maps: Leaflet with anonymized zones

✅ Conclusion
OxyCollect-Midnight demonstrates that privacy and transparency are not mutually exclusive:

Every submission is verified, but no submitter is identified

Impact is measurable, but individuals are invisible

Rewards are earned, but wallets have no owners

Moderation is enforced, but privacy is preserved

🌟 Privacy isn’t a feature. It’s the foundation. 🌟



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *