About
## **DataGuard: Privacy-Preserving Email Data Marketplace**
DataGuard is a revolutionary browser extension that transforms your email inbox into a **privacy-preserving data marketplace** where you get paid for controlled access to your email data through the **x402 payment protocol**. Instead of having your data extracted without permission, DataGuard puts you in complete control of who accesses what data and ensures you're compensated for it.
### **Core Problem & Solution**
**The Problem**: Currently, AI agents and third-party applications extract email data without user consent or compensation, creating privacy violations and data exploitation.
**The Solution**: DataGuard intercepts data requests, applies user-defined privacy policies, requires payment through x402 protocol, and returns only filtered, redacted data with cryptographic proofs - all while ensuring users are paid for their data.
### **How It Works**
- **Request Interception**: The browser extension automatically detects when websites or AI agents attempt to access email data
- **Policy Enforcement**: User-defined privacy policies determine what data can be shared and under what conditions
- **Dynamic Pricing**: An AI-powered policy agent negotiates pricing based on data sensitivity, demand, and user preferences
- **x402 Payment Processing**: Data access requires payment through the x402 protocol on Polygon network using USDC
- **Privacy-Preserving Response**: Only filtered, redacted data is returned along with zero-knowledge proofs of predicates
- **User Compensation**: Users receive payments directly to their configured wallet address
### **Key Features**
#### **Privacy Protection**
- **Granular Control**: Users can selectively allow/disallow different types of email data (subscriptions, deliveries, purchases, financial) - **Data Redaction**: Automatic redaction of email bodies and personal information based on policy settings - **Time-based Filtering**: Control how old emails can be (e.g., only last 90 days) - **Volume Limits**: Set the maximum number of emails per request
#### **Monetization Engine**
- **Dynamic Pricing**: Base prices with demand multipliers, privacy multipliers, and volume adjustments - **Predicate-based Pricing**: Different rates for different types of data: - Subscription emails: $0.05-$0.50 per proof - Delivery confirmations: $0.10-$1.00 per proof - Purchase receipts: $0.25-$2.00 per proof - Financial data: $0.50+ per proof - **x402 Integration**: Seamless payment processing through decentralized payment protocol
#### **Technical Architecture**
- **Browser Extension**: Chrome extension with background service worker and content scripts - **Express Server**: Built-in HTTP server within the extension for API endpoints - **Policy Agent**: AI-powered negotiation system for automated pricing and policy enforcement - **Mail Demo Service**: Realistic email dataset with 21+ labeled emails for demonstration - **Zero-Knowledge Proofs**: Cryptographic proofs for email predicates without revealing full data
#### **Supported Predicates**
1. **Subscription Acknowledgement**: "User has received subscription emails from recognized senders" 2. **Package Delivery**: "User has received delivery confirmations from carriers/ecommerce" 3. **Purchase Proof**: "User has made purchases based on receipt emails" 4. **Financial Activity**: "User has financial transaction emails"
### **User Experience Flow**
- **Setup**: User installs extension and configures privacy policy and wallet address
- **Request Detection**: Extension intercepts third-party data requests
- **Policy Check**: System validates request against user's privacy settings
- **Payment Negotiation**: Policy agent calculates dynamic pricing and presents payment request
- **Payment Processing**: Third-party completes payment through x402 facilitator
- **Data Filtering**: Extension applies redaction rules and filters emails by predicate
- **Proof Generation**: System generates cryptographic proof of predicate without revealing full data
- **Response**: Third-party receives filtered data + proof, user receives payment
### **Technical Implementation**
- **Frontend**: Chrome Extension (MV3) with TypeScript
- **Backend**: Express server within extension background script
- **Payment**: x402 protocol on Polygon network with USDC
- **Data**: Mock email service with realistic datasets deployed on Vercel
- **Storage**: Chrome extension local storage for policies and payment history
- **Networking**: CORS-enabled API endpoints for third-party access
### **Demo & Testing**
The project includes a comprehensive demo environment: - **Mail Demo Service**: Deployed at `https://data-gaurd.vercel.app` with 21 realistic emails - **Extension UI**: Full-featured popup and extension page for policy configuration - **Payment Simulation**: Mock x402 payment processing for demonstration - **Request Logging**: Complete audit trail of all data requests and payments
### **Innovation Highlights**
- **First-of-its-kind**: Browser extension that monetizes user data through x402 protocol
- **Privacy-by-design**: Zero-knowledge proofs ensure data privacy while proving predicates
- **User sovereignty**: Complete control over data access and pricing
- **Automated negotiation**: AI agent handles pricing and policy enforcement
- **Real-world applicability**: Practical implementation for email data marketplace
DataGuard represents a paradigm shift from data extraction to **data compensation**, empowering users to monetise their personal data while maintaining privacy and control. It's built for the ETHGlobal New Delhi 2025 hackathon and demonstrates a complete end-to-end privacy-preserving data marketplace.
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






