Video thumbnail

Obscura protocol

Obscura Protocol is a robust encryption system that enhances privacy for any ERC-20 compliant token

Obscura protocol

Created At

ETHGlobal Trifecta - Zero Knowledge

Project Description

By leveraging Noir—a domain-specific language designed for constructing zero-knowledge (ZK) proofs —and implementing ElGamal encryption—a public-key cryptosystem based on the Diffie-Hellman key exchange —Obscura ensures that token balances and transactions remain confidential without compromising the security inherent to the Ethereum blockchain.

How it's Made

We built Obscura Protocol by creating a privacy-preserving wrapper around any ERC-20 token. When a user deposits the original token, they receive a wrapped version that supports encrypted balances and private transfers.

The core workflow is:

  1. Wrapping the Token: Users deposit standard ERC-20 tokens into the contract, receiving an equivalent amount of wrapped tokens.

  2. ZK Proof of Minting: To mint wrapped tokens, the user submits a zero-knowledge proof generated using Noir, ensuring the mint respects privacy constraints.

  3. Encrypted Transfers: Transfers can only be made to recipients who have published a public encryption key (used in ElGamal encryption). Balances are encrypted, so only the owner can view them.

  4. ZK Proofs for Transfers: Each transfer requires a ZK proof to guarantee that token balances remain consistent without revealing amounts or counterparties.

We used Noir for constructing the zero-knowledge circuits, and ElGamal encryption to protect token balances. The combination of these technologies allows for a trustless yet private ERC-20 experience.

A notable hacky part: we implemented a system to prevent transfers to users without a registered public key, ensuring that encrypted transfers are always verifiable and receivable.

background image mobile

Join the mailing list

Get the latest news and updates