dmail

Decentralized end-to-end encrypted email using ENS identities and Filecoin storage.

dmail

Created At

ETHGlobal Buenos Aires

Winner of

Filecoin

Filecoin - Best dApps powered by Filecoin Onchain Cloud 1st place

ENS

ENS - Most creative use of ENS 3rd place

Project Description

dMail is a fully decentralized, end-to-end encrypted email system that replaces traditional email servers with Web3 infrastructure. Instead of relying on Gmail-style centralized storage and identity, dMail uses ENS names as email addresses, Filecoin (via the Synapse SDK) for storing encrypted messages and attachments, and a deterministic wallet-derived cryptographic identity for encryption and signing meaning users never create passwords or manage keys manually. Every message is encrypted client-side using ephemeral X25519 keys and AES-GCM, ensuring only the intended recipient can ever read it. Mailboxes are stored as append-only indexes on Filecoin and referenced through ENS or an optional off-chain resolver, allowing anyone to discover and retrieve their mail in a trustless way. The app includes a background outbox queue that provides instant “Send” UX while pushing content to Filecoin in the background, surviving tab reloads, offline usage, and multi-device access. No central server ever sees message content, keys, or metadata, giving users full control and censorship resistance. dMail brings familiar email workflows to a decentralized, wallet-based environment while maintaining privacy, security, and true data ownership.

How it's Made

dMail is built as a fully client-side decentralized application using React + Vite, with no backend servers. Wallets authenticate users, and identities are deterministically derived from a single MetaMask signature using HKDF to generate X25519 encryption keys and Ed25519 signing keys removing the need for key management while still enabling strong end-to-end encryption. We use ENS both for identity and as an on-chain mailbox pointer system. Recipient discovery happens via ENS text records or an off-chain resolver API that we built, which reduces on-chain writes and avoids repeated MetaMask signature prompts. File storage is powered by Filecoin through the Synapse SDK, which handles uploads, CDN-backed retrieval, dataset creation, and provider routing. Each email is encrypted client-side using ephemeral X25519 ECDH + AES-GCM and stored as envelopes on Filecoin, while lightweight mailbox indexes reference those CIDs. One of the most challenging parts was performance: Filecoin writes take ~30 seconds each. Initially sending a single email could take several minutes. We engineered several hacky but effective optimizations:

  1. mailbox snapshotting to avoid re-downloading inboxes
  2. append-only mailbox updates
  3. batching multiple outbox items into a single mailbox write
  4. parallel uploads
  5. an offline-resilient outbox queue stored in localStorage
  6. a multi-tab locking system using a distributed localStorage mutex These allow users to click “Send” and immediately see the message in their Sent folder while uploads continue in the background, even across refreshes or offline periods. The result is a decentralized email system that feels fast and familiar, while being built entirely on ENS + Filecoin + wallet-based cryptography without any centralized server.
background image mobile

Join the mailing list

Get the latest news and updates