← Back to home

Melon

Melon verifies the origin and authenticity of images, proving if they’re real or AI-generated.

Problem Statement

Melon is a platform that proves the authenticity, origin, and ownership of digital images, whether captured by a device or generated by AI.Core IdeaMelon ensures that every photo or AI-generated image has a verifiable, tamper-proof proof of origin tied either to a real hardware device (camera, Raspberry Pi, smartphone) or an AI model and generation prompt. This proof is cryptographically embedded into the image metadata and can be publicly verified anytime using Melon’s verification engine.Full FlowDevice Onboarding and Staking A user first stakes an amount on the platform. This stake acts as a trust deposit, ensuring the user or device is not used for any malpractice or image forgery. After staking:A unique Device ID is generated.The user’s wallet address is linked to this Device ID.Capture Phase (For Real Images) The user uses their registered device (for example, a Raspberry Pi with a Camera Module 3) to capture images. Each captured image automatically has the Device ID cryptographically embedded into its EXIF metadata along with a timestamp, firmware, and hardware fingerprint. The private key remains local, while the public key is associated with the Device ID on-chain or in the Melon registry.AI Generation Phase (For AI Content) Melon integrates Nano-Banana, AI Gateway, and AI SDK to allow users to generate AI images directly on the platform. For each generated image:The prompt, AI model, and parameters are recorded.A digital signature is embedded in the EXIF metadata as verifiable proof.The proof confirms that the image was AI-generated and specifies the model and prompt used.Verification Phase Anyone can visit Melon’s verification page and upload an image. Melon reads the embedded EXIF metadata and:Verifies the digital signature or device ID proof.Confirms whether the image is:Device-authenticated, orAI-generated (with visible model and prompt details).The verified output is displayed as a visual proof certificate showing:The imageDevice ID or AI metadataTimestampWallet address (if applicable)Status: Verified, Authentic, or AI-generatedTech Stack BreakdownFrontendNext.js and TailwindCSSReact Hooks and Client ComponentsFile Upload and EXIF Reader for verification UIBackendNode.js, Express, or Next.js API RoutesCryptographic operations using @noble/ed25519Metadata manipulation using piexifjsDevice proof and signature verification logicBlockchain LayerWallet staking and mapping (Device ID ↔ Wallet Address)Smart contract to hold stakes and record device registryOptional use of a soulbound token or NFT to represent verified devicesAI IntegrationNano-Banana and AI Gateway for model orchestrationMelon’s AI SDK wrapper to standardize generation and proof embeddingHashing and signature embedding into EXIF metadataAI’s Actual RoleAI Gateway manages proof-backed AI image generation rather than simple image synthesis. The AI SDK ensures every generated image includes traceable provenance such as the prompt, model, timestamp, and signature. A lightweight AI model is also used to detect tampering or modified EXIF data, providing a secondary layer of verification.Why This MattersBuilds an authenticity layer for the internet’s visual content.Prevents deepfake misuse and ownership disputes.Creates trustworthy provenance trails for creators, journalists, and researchers.Enables AI artists to verify and prove the authenticity of their creations.

Solution

Melon is built around a simple question with a complex answer Can you prove your photo is real?Under the hood, it’s a combination of cryptography, metadata engineering, and AI infrastructure designed to create a proof-of-origin layer for all digital images — whether captured by a camera or generated by an AI model.The Core InfrastructureWe began by designing a device-authenticated capture flow. Every user first stakes an amount on the platform to register their device, which generates a unique Device ID mapped to their wallet address. This staking process forms the trust foundation — one wallet, one device, one verifiable identity.When a registered device captures an image (for example, on a Raspberry Pi 5 + Camera Module 3), the photo is locally signed using Ed25519 keys. The private key never leaves the device, while the public key is linked to the Device ID in Melon’s registry. This ensures that no one can forge a device’s identity or image signature.The resulting signature, device ID, and timestamp are embedded directly into the image’s EXIF metadata using piexifjs. It’s a lightweight but powerful method—turning every photo into a self-verifying digital artifact.AI Image ProvenanceMelon also verifies AI-generated content. We integrated Nano-Banana, AI Gateway, and AI SDK to power the generation and proofing of AI images. When users generate an image through Melon, the prompt, model, and generation parameters are captured, hashed, and digitally signed. This signature is embedded within the EXIF metadata, creating a tamper-proof trail that identifies how, when, and by which AI model the image was created.This approach allows Melon to confirm not just that an image is AI-generated, but also which model and parameters produced it — without altering the visual content.Verification EngineThe verification process runs fully client-side. Users upload any image, and Melon extracts the EXIF metadata, verifies the embedded signature using the @noble/ed25519 library, and confirms whether the image is device-authenticated or AI-generated. The proof is displayed clearly alongside the image, showing details like device ID, wallet address, model name, and generation timestamp.By running entirely in the browser, verification remains instantaneous, privacy-preserving, and censorship-resistant.Tech StackFrontend: Next.js, React, TailwindCSSBackend / APIs: Next.js API Routes, Node.js, ExpressCryptography: @noble/ed25519 for signing and verifying proofsMetadata: piexifjs for embedding signatures into EXIF dataBlockchain Layer: Smart contract for staking and mapping wallet ↔ device IDsAI Layer: Nano-Banana, AI Gateway, AI SDK for provenance-backed AI generation

Hackathon

ETHGlobal New Delhi

2025

Prizes

  • 🏆

    Building Onchain AI dapps with 0G3rd place

    0G

Contributors