Skip to content

zunmax/shieldr

Repository files navigation

Shieldr

A production-ready Confidential Wrapper Registry app, built on Zama FHEVM.

Shieldr - explore Zama's official on-chain registry of confidential token wrappers. Wrap. Unwrap. Decrypt. Confidentially.

⭐ Overview ⭐

Every ERC-20 balance and transfer on Ethereum is public. Anyone can read your holdings, watch your transfers with exact token amount, and profile your activity straight from the chain.

Shieldr is is a non-custodial web app over the official Zama Wrappers Registry, running on Ethereum mainnet and the Sepolia testnet that makes normal ERC-20 tokens private by pairing it with a confidential token - an ERC-7984 token whose balances are Fully Homomorphic Encryption (FHE) ciphertexts, stored on-chain as opaque handles. The amounts are real and enforced by the protocol, but only you can decrypt and read them.

  • Wrap 100 USDC -> receive 100 cUSDC, encrypted on-chain.
  • Hold and transfer privately - the chain shows that a transfer happened, never how much.
  • Unwrap cUSDC -> get your USDC back.

✨ Advanced Features ✨

Feature Why it is
Batch Wrap & Unwrap Wrap or unwrap a whole batch of 10 different tokens in a single wallet confirmation on supporting wallets - falls back to one prompt per token everywhere else, so it woks on any wallet.
Auto Token Discovery The moment user connect their wallet, Shieldr finds every confidential token they wallet holds. Users don't need to import any token contract at all.
Unwrap Recovery Unwrapping is burn-then-finalize. If your burn tx confirmed but the finalize tx did not, Shieldr spots that burn tx and lets you finalize it later in one click - no funds are ever stuck.

🏃 Quick Start 🏃‍➡️

Prerequisites

  • Node.js >= 22 (required by @zama-fhe/sdk@^3)
  • A browser wallet (MetaMask or any WalletConnect / injected wallet)

Install and run

# 1. Clone
git clone https://github.com/zunmax/shieldr.git
cd shieldr

# 2. Install
npm install

# 3. Configure (optional for Sepolia - see Configuration)
cp .env.example .env.local

# 4. Run the dev server (auto-picks the first free port from 3000)
npm run dev

Open the printed URL and pick Sepolia to try the full flow for free: open the Faucet, mint a few mock tokens, then wrap, unwrap, and decrypt.

Production build

npm run build
npm run start

Other scripts: npm run typecheck (tsc, no emit) and npm run lint (ESLint).

⚙️ Configuration ⚙️

Copy .env.example to .env.local. Sepolia works with zero configuration; only Ethereum mainnet needs a relayer key. Only NEXT_PUBLIC_* values reach the browser.

Variable Scope Purpose
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID client Enables WalletConnect QR. Without it, injected wallets (MetaMask) still work.
NEXT_PUBLIC_SEPOLIA_RPC_URL client Override the default Sepolia RPC (CORS-friendly URLs only).
NEXT_PUBLIC_MAINNET_RPC_URL client Override the default Ethereum RPC.
NEXT_PUBLIC_SEPOLIA_EXPLORER_API client Override the Sepolia logs API used for token discovery.
NEXT_PUBLIC_MAINNET_EXPLORER_API client Override the Ethereum logs API.
NEXT_PUBLIC_REPO_URL client Target for the in-app "Source" links.
RELAYER_API_KEY server Mainnet relayer key, injected by the proxy.
RELAYER_ORIGIN server Optional : self-hosted mainnet relayer origin
ALLOWED_ORIGIN server Optional : restrict the relayer proxy to a single browser origin

The app sets Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: credentialless (in next.config.mjs) so the FHE WASM worker can use SharedArrayBuffer while cross-origin wallet iframes still load.

🌐 Supported Networks 🌐

Network Chain ID Route Faucet Wrappers Registry
Sepolia 11155111 /sepolia Yes (mock tokens) 0x2f0750Bbb0A246059d80e94c454586a7F27a128e
Ethereum 1 /ethereum No 0xeb5015fF021DB115aCe010f23F55C2591059bBA0

📜 Disclaimer & License 📜

Shieldr is non-custodial: it never holds your keys or funds and only builds transactions your wallet signs. The contracts it talks to are the Zama protocol and the wrappers in its registry - Shieldr deploys none of its own.

Use Sepolia for testing. On Ethereum mainnet you interact with real value through third-party wrapper contracts; review them and proceed at your own risk. This software is provided as-is, without warranty, and has not been audited.

Released under the MIT License.

About

A production-ready Confidential Wrapper Registry app, built on Zama FHEVM.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages