Deploying ZKPs: Circom, Solidity & DApps
Learning Goal: Implement Zero-Knowledge Proofs in Web3 by designing, testing, and deploying privacy-preserving decentralized applications using Circom arithmetic circuits and Solidity smart contract verifiers.
- Prerequisites: Basic programming logic (variables, functions, loops) and general familiarity with how the internet works. No advanced mathematical or cryptographic background is required.
- Estimated Total Study Time: 35 Hours
Module 1: Blockchain & Solidity Foundations
This module introduces the fundamental decentralized architecture of the Ethereum network. You will transition from understanding what a blockchain is to writing, testing, and deploying your first smart contracts using Solidity and the web-based Remix IDE.
Why this video: This video provides an intuitive, high-level conceptual baseline of Ethereum. It contrasts Ethereum's programmable smart contracts against Bitcoin's simple transaction model, explaining how the Ethereum Virtual Machine (EVM) acts as a decentralized global computer.
Why this video: A comprehensive deep-dive into the Solidity language syntax and the EVM. It serves as your primary technical manual for understanding storage layout, variables, mappings, and functions—essential prerequisites before handling cryptographic verifier smart contracts.
Why this video: A practical, click-by-click tutorial demonstrating how to use Remix IDE to write, compile, debug, and deploy your Solidity code to local and test networks. This toolchain will also be used in later modules to handle automatically generated proof-verifier contracts.
Knowledge Checkpoint
- Describe the difference between public/private keys and state storage on a blockchain.
- Write a basic Solidity contract utilizing state variables, visibility modifiers (
public,private), and execution functions. - Compile and deploy a contract to a local test network using Remix IDE.
Module 2: Introduction to Cryptography and Zero-Knowledge Proofs
Transition from standard computer science to secure communication systems. You will learn the historical context of cryptology, foundational asymmetric cryptography mechanisms, and the mind-bending paradigm of verifying statements without revealing the underlying data.
Why this video: An academic gold-standard lecture introducing symmetric versus asymmetric systems. Prof. Paar explains key generation, mathematical security bases, and modern cryptographic design principles that pave the theoretical way for zero-knowledge systems.
Why this video: Uses clear, non-mathematical analogies to explain how a prover can convince an interactive verifier of a secret's validity (e.g., color blindness, graph-coloring). It is the perfect bridge between traditional encryption and modern ZK concepts.
Why this video: A concise, highly visual distillation of ZKP core properties. It introduces how proof verification systems can eliminate trust overhead while maintaining cryptographic guarantees of completeness, soundness, and zero-knowledge.
Knowledge Checkpoint
- Define the difference between symmetric encryption, asymmetric encryption, and cryptographic hashing.
- Explain the three fundamental properties of Zero-Knowledge Proofs: Completeness, Soundness, and Zero-Knowledge.
- Understand the role of the Prover and Verifier roles in interactive proof protocols.
Module 3: Understanding zk-SNARKs and Mathematics behind ZKPs
To build scalable, non-interactive privacy systems, you need to step behind the curtain of modern zk-SNARK mathematics. This module covers the math underlying zero-knowledge computation, transforming logical computer programs into arithmetic constraints.
Why this video: World-renowned cryptographer Dan Boneh dissects the acronym S-N-A-R-K (Succinct, Non-Interactive, Argument of Knowledge), establishing the core parameters of size, performance, and interaction requirements in public blockchains.
Why this video: An in-depth mathematical exploration tracing the execution pipeline of zk-SNARKs (including the Pinocchio protocol). It unpacks how standard program statements are translated into algebra, polynomials, and eventually verifiable arithmetic circuits.
Why this video: Focuses heavily on the structural intuition of elliptic curve cryptography, polynomial commitments, homomorphic hiding, and quadratic arithmetic programs (QAP) to show how complex checks shrink down to cheap, single-equation confirmations.
Knowledge Checkpoint
- Define what "Succinctness" and "Non-interactivity" mean in the context of block verification performance.
- Explain the linear pipeline: Code Arithmetic Circuits R1CS (Rank-1 Constraint System) QAP (Quadratic Arithmetic Program) SNARK Proof.
- Understand why a cryptographic polynomial serves as an efficient vehicle for verifying a massive computation in a single mathematical step.
Module 4: Writing Circuits with Circom
Now that you understand the mathematical framework, you will learn to construct your own constraints using Circom, the primary domain-specific language for writing arithmetic circuits. This step forms the core engine of your privacy-preserving DApp.
⚠️ Video Pool Coverage Note: Educational video coverage of exact Circom template compilation and syntax is sparse. While the curated videos below provide excellent structural foundations, you are strongly encouraged to complement this module with external written tutorials by searching:
Circom tutorial zero knowledge circuit development.
Why this video: Delivered by Berkeley RDI, this lecture explains how programmers must shift their minds from standard sequential operations (if-statements, reassignment) to writing static constraint equations over finite fields.
Why this video: An intermediate developer guide covering constraint writing, managing private versus public signal declarations, compiling circuits into intermediate representations, and parsing error patterns in custom arithmetic circuits.
Why this video: A brief visual guide detailing how to activate the integrated Circom compiler plugin directly inside the Remix IDE workspace. This allows you to compile constraints, set proving parameters, and generate verifiers without leaving your browser environment.
Knowledge Checkpoint
- Contrast public signals versus private signals inside a Circom circuit.
- Understand the fundamental constraint construction rules in Circom (the structure).
- Initialize, write, and compile a simple multiplier template to test inputs and constraint satisfaction.
Module 5: On-Chain Verification with Solidity
Once your circuits are written and compiled, you must link them to the blockchain. This module guides you through generating cryptographic keys via SnarkJS trusted setups, compiling your circuit's execution logic into a Solidity verifier contract, and verifying zk-proofs on-chain.
⚠️ Video Pool Coverage Note: Practical step-by-step videos detailing SnarkJS terminal workflows are limited. To ensure you configure and run your setups correctly, supplement this section by searching online for:
SnarkJS and Solidity verifier contract tutorial.
Why this video: Walks developers through the specific integration loop linking Circom-compiled binaries, executing proving runs with SnarkJS, and preparing the resulting Solidity verifier for active deployment inside modern smart contracts.
Why this video: Explains the mechanics of verification by looking at how the generated Solidity contract evaluates the proof object and public inputs payload on-chain, rejecting fraudulent data while approving valid private claims.
Why this video: A clear, visual breakdown explaining trusted setups. It walks you through Groth16 proving parameters and the necessity of two ceremony phases: the Powers of Tau (common reference string) and the system-specific circuit setup phase.
Knowledge Checkpoint
- Describe the purpose of a multi-party Trusted Setup ceremony and the difference between Phase 1 (universal) and Phase 2 (circuit-specific).
- Export an automatically generated
verifier.solcontract using SnarkJS command line utilities or Remix IDE. - Deploy the verifier on-chain and perform test transactions, observing transaction status for both valid and invalid proof inputs.
Module 6: Building Privacy-Preserving DApps
This final module synthesizes everything you've learned. You will review actual production structures like Tornado Cash to see how Merkle tree architecture, zero-knowledge circuits, and web-based frontends merge to construct privacy-preserving decentralized applications.
⚠️ Video Pool Coverage Note: Comprehensive, end-to-end codebases for ZK-DApps (frontend to contract integration) are rarely captured fully in video lectures. To construct your final client-side proof-generation system, independently search:
Build a zero knowledge DApp from scratchand review standard React-SnarkJS wrappers.
Why this video: Explores the systemic architectural blueprints of standard ZK-DApps, focusing on how a client-side wallet generates secret commitments, formats parameters locally, and pushes proofs to on-chain verifiers.
Why this video: An analytical breakdown of Tornado Cash's architecture. It details how cryptographic deposits, commitment hashes, nullifiers, and Merkle root confirmations function collectively to preserve transaction privacy.
Why this video: Features an actual walk-through of production-grade Circom files (specifically withdraw.circom), exploring how dependencies like Poseidon hashing are used inside templates to run secure, state-dependent checks.
Knowledge Checkpoint
- Explain how a nullifier scheme prevents double-spending attacks inside privacy pools.
- Describe how a user generates a zk-SNARK proof inside their local browser and executes transactions using a cryptographic relay.
- Explain the security danger of calculating proof objects on-chain vs. proving locally on user devices.
Course Map
Key People Index
- Prof. Christof Paar (Ruhr University Bochum): Acclaimed cryptography researcher and author of Understanding Cryptography. His foundational lectures demystify encryption schemes and math systems for global students.
- Prof. Dan Boneh (Stanford University): A pioneering research leader in applied cryptography and zero-knowledge proof architecture. His lectures clarify complex SNARK constraints for modern computer science applications.
- Vitalik Buterin (Ethereum Foundation): Co-founder of Ethereum and active proponent of Zero-Knowledge scalability (ZK-Rollups) and zkVM paradigms.
- Silvio Micali (MIT): Turing Award winner and co-inventor of interactive Zero-Knowledge Proofs alongside Shafi Goldwasser and Charles Rackoff.
Final Self-Assessment
Complete this comprehensive checkpoint to verify your readiness to write, test, and deploy production-grade privacy-preserving DApps:
- Explain the gas execution differences of performing verification logic on-chain versus standard computation.
- Write a complete Solidity smart contract that implements visibility modifiers, custom modifiers, structs, and arrays.
- Differentiate between interactive zero-knowledge proofs and non-interactive arguments (NIZKPs).
- State the primary cryptographic difference between pairing-friendly elliptic curves like BN254 and curves used in traditional security systems.
- Compile a
.circomfile utilizing multiple input signals to generate R1CS constraints, and export the output directory correctly. - Execute a two-stage Trusted Setup ceremony on the command line using
snarkjs. - Extract the generated verification key from a compiled circuit and output it into a deployable
verifier.solcontract. - Deploy the verification smart contract onto an EVM test network.
- Define the architectural purpose of "Nullifiers" and state how they are tracked inside private pools to prevent double-spending.
- Detail the complete lifecycle of a private withdrawal: from user local proof computation, to public input validation, to state update and fund dispersal.

















