Skip to content
Zecscan

Zecscan

Zcash Encrypted Blockchain Explorer

Created on 4th December 2025

•

Zecscan

Zecscan

Zcash Encrypted Blockchain Explorer

The problem Zecscan solves

Zcash’s strongest feature, "the shielded pool" is also its biggest usability hurdle. Because transactions are encrypted, users cannot easily verify payments, audit their history, or prove funds to third parties using standard block explorers. The blockchain is opaque by design.

The Current Dilemma

To view shielded data today, users are forced to choose between two bad options:

  1. Run a Full Node: This is technically difficult, resource-intensive (requires downloading gigabytes of data), and inaccessible to 99% of users.
  2. Trust a Centralized Service: Some services allow you to view data, but they require you to upload your Viewing Keys to their servers. This fundamentally breaks the trust model of Zcash—you are doxxing your entire financial history to a third party.

The Gap

There is no lightweight, trustless way to interact with shielded Zcash data.

  • Lightweight: Accessible in a browser, no downloads.
  • Trustless: No one (including the service provider) sees your keys or data.

The ZecScan Solution

ZecScan solves this by moving the "node" logic into the browser. By compiling Zcash cryptography to WebAssembly, we allow users to:

  1. Bring their own Viewing Key.
  2. Decrypt transaction data locally on their own device.
  3. Audit their history without ever exposing their keys to a server.

ZecScan bridges the gap between the transparency of a block explorer and the privacy of a local wallet.

Challenges I ran into

WebAssembly Integration for Zcash Cryptography

The Problem

Implementing real-time client-side decryption of shielded Zcash transactions required integrating complex cryptographic operations in the browser. Unlike simple JavaScript libraries, Zcash's cryptography is implemented in Rust and needs to run at native speeds to handle the complex zero-knowledge proof verification.

Initial naive approach:

// ❌ Pure JavaScript - way too slow for ZK cryptography
function decryptZcashMemo(viewingKey, transaction) {
  // Would take minutes instead of seconds!
  return slowCryptoOperations();
}

The WebAssembly Journey

I needed to compile Zcash's Rust cryptographic libraries to WebAssembly for browser execution. Challenges included:

  1. Binary Size - Initial WASM build was 15MB+, way too large for web delivery
  2. Loading Performance - WASM module initialization added 2-3 seconds to page load
  3. Browser Compatibility - Different browsers handle WASM memory differently
  4. Debugging Complexity - Stack traces in WASM are cryptic and hard to debug

The Optimization Process

Size Reduction:

# Cargo.toml optimizations
[profile.release]
opt-level = "z"        # Optimize for size
lto = true             # Link-time optimization
codegen-units = 1      # Better optimization
strip = true           # Remove debug symbols

This reduced the WASM binary from 15MB to ~3MB!

Lazy Loading Strategy:

// Don't load WASM until user actually needs decryption
useEffect(() => {
  async function loadWasm() {
    const script = document.createElement('script');
    script.src = '/wasm/zcash_wasm.js';
    script.type = 'module';
    script.onload = () => setWasmLoaded(true);
    document.body.appendChild(script);
  }
  loadWasm();
}, []);

Progress Indication:

Added a terminal animation to give users feedback during WASM initialization and decryption:

<TerminalOutput
  isActive={showTerminal}
  onComplete={handleTerminalComplete}
/>

This provides visual feedback while the heavy cryptographic operations happen in the background.

The Final Architecture

Client-Side Processing:

  1. Validate viewing key format (instant)
  2. Load WASM module if not cached (1-2s first time)
  3. Fetch transaction data from blockchain APIs (500ms)
  4. Perform cryptographic decryption in WASM (1-2s)
  5. Display decrypted memo and transaction details
// All sensitive operations happen in the browser
const handleDecryptSingle = async () => {
  setLoading(true);
  setShowTerminal(true);
  
  // Validate viewing key locally
  if (!validateViewingKey(viewingKey)) {
    throw new Error('Invalid viewing key format');
  }
  
  // Fetch transaction data
  const [txDetails, rawTx] = await Promise.all([
    fetchZcashExplorerTransaction(txId),
    fetchZcashExplorerRawTransaction(txId)
  ]);
  
  // WASM handles the decryption
  // Viewing key never sent to server
  setTransactionDetails(txDetails);
};

Lessons learned:

  • WebAssembly is powerful but requires careful optimization
  • User experience matters - show progress during long operations
  • Lazy loading is essential for large WASM modules
  • Browser caching makes subsequent loads nearly instant

Mobile Responsiveness - SearchBar Wrapping Issues

The Problem

The search bar and example links looked great on desktop but completely broke on mobile devices.

Issues:

  • Example links wrapped awkwardly
  • Search button overlapped text
  • Padding was too large for small screens
  • Font sizes didn't scale

The Debugging Process

// Original problematic code
<div className="flex gap-2">
  <button className="px-6 text-base">Example: Block #2500000</button>
  <button className="px-6 text-base">Example: Transaction</button>
</div>

This worked fine on desktop but on mobile:

  • flex didn't allow wrapping
  • Fixed padding (px-6) took up too much space
  • Text size was too large

The Solution

Implemented responsive utility classes with Tailwind:

<div className="flex flex-wrap gap-2 sm:gap-3">
  <button className="px-3 py-1.5 sm:px-6 sm:py-2 text-xs sm:text-base">
    Example: Block #2500000
  </button>
  <button className="px-3 py-1.5 sm:px-6 sm:py-2 text-xs sm:text-base">
    Example: Transaction
  </button>
</div>

Changes made:

  • Added flex-wrap to allow multi-line layout on small screens
  • Used responsive sizing: px-3 sm:px-6 (smaller on mobile, larger on desktop)
  • Responsive text: text-xs sm:text-base
  • Gap adjustment: gap-2 sm:gap-3

Result: Perfect layout on all screen sizes!

Tracks Applied (6)

General Bounty

I built ZecScan because I believe a "Network State" needs a census that respects privacy. The Network School is looking ...Read More

Network School

Zcash Data & Analytics

I built ZecScan to answer the specific challenge: How do we audit shielded transactions without breaking privacy? I didn...Read More
Gemini

Gemini

Privacy Infrastructure & Developer Tools

Privacy Infrastructure & Developer Tools - Pitch The Fit: ZecScan is essential public infrastructure that makes Zcash u...Read More

Zcash Community Grants

Zcash Data & Analytics

I designed ZecScan to be more than just a block explorer. I built it as a comprehensive analytics platform that tells th...Read More

Raybot

Privacy Infrastructure & Developer Tools

I built ZecScan to serve as a foundational development framework for the next generation of Zcash apps. I wanted to prov...Read More

Raybot

General Bounty

I built ZecScan to directly answer Project Tachyon's call for "innovative privacy-preserving solutions." I believe my pr...Read More

Project Tachyon

Discussion

Builders also viewed

See more projects on Devfolio