Zero Knowledge Bootcamp
Duration: 2 months | Pricing: Pay upfront $2400 OR 2 monthly installments of $1,300)
According to Vitalik Buterin, Ethereum’s inventor,
“I expect ZK-SNARKs to be a significant revolution as they permeate the mainstream world over the next 10-20 years.” (source)
Zero knowledge proofs (ZK proofs) have two incredible properties: one is they allow privacy preservation in ways that were previously impossible, and they allow the computation to be verified faster than the original computation. This allows for the Ethereum blockchain to scale up because validators don’t have to re-run all the transactions to ensure they are valid — they just need to check the proofs.
Unfortunately, like all new technologies, learning zero knowledge is not easy. But that’s what this ZK bootcamp is for! We will give you a gentle ramp into this unusual mode of computation, and then build real applications with it.
We’ve designed a careful balance of theory and practice so that you understand what you are doing, but aren’t bogged down in theoretical details and mathematical proofs.
Because of the mystique surrounding the subject, you will find it to be a very satisfying experience once you get the topic!
Curriculum
Week 1
You will program very basic proof of concepts in python to get an intuition for how zero knowledge proof is possible. You will program logic circuits in python (by hand or with the aid circuitgraph) to get an intuition of this model of computation. Doing this by hand in a friendly and mature language is much easier than designing circuits in an unfamiliar and less mature one!
Week 2
We will set up circom and program basic circuits in it. You’ll understand why for loops in zero knowledge are strange and why implementing comparison operators (<=, >=) are surprisingly hard. Trust us, it will probably feel like programming for the first time all over.
Week 3
We will understand the limitations and inconveniences of circuit based programming and the issues that come up when verifying zero knowledge proofs in solidity, especially gas and contract size issues. This will also be the first time you prove you know the preimage of a hash, but while keeping the preimage secret! We will also study hashes that are optimized for zero knowledge like poseidon and pedersen hashes.
Week 4
No course on zero knowledge is complete without studying the most famous solidity application, Tornado Cash. You will understand how the application works and build something that accomplishes something similar. You will be surprised at how easy Tornado Cash is once you understand the zero knowledge primitives!
Week 5
This week we will study higher level languages that attempt to abstract away circuit design and turn it into more familiar feeling code. Specifically, we will write zero knowledge programs in Zokrates to get a sense of how they work, and what limitations they have. Cairo is another popular programming language for zero knowledge, but this isn’t for developing ZK applications, it’s for developing applications on layer 2 that are not necessarily privacy focused.
Week 6
Like any technology, Zero Knowledge applications have exploits that can endanger an application if you don’t know about them. We will do capture the flag style hacking exercises to have practical experience with zero knowledge vulnerabilities
Week 7
This week we will revisit the theoretical math behind zero knowledge proofs at a deeper level. Although we only cover the bare minimum at the beginning of the course, it’s more intellectually satisfying to understand what is going on. We cover SNARKS in this course, but if you want to understand the motivation behind STARKS and Bulletproofs, this will set you up to learn them faster.
Week 8
We will incorporate snark js into a frontend application so that you can build your own full stack zero knowledge proof application. As is customary at RareSkills, we save the frontend work for last so you can take your time to build something nice.
Prerequisites
-
RareSkills Solidity Bootcamp
-
You should be comfortable with modular arithmetic
-
We will use python for some parts as it handles math well
FAQ
How hard is learning zero knowledge programming?
Applied zero knowledge is hard, but not for the reasons people think it is. The main issue is not actually understanding the math. It's dealing with error messages that you won't easily find answers to online. Since you'll have a human instructor, help will be available, but expect debugging to be a slower process compared to other applications. You should embrace the difficulty that comes with learning a subject there isn't much material for. That skill is part of being a blockchain expert.
How good do I need to be at Solidity?
You need to be comfortable reading assembly. This course gives priority access to students who have completed the Solidity bootcamp first.
I didn't take the core solidity bootcamp, can I sign up for this one?
Not likely. We aim to develop long term relationships with our students and they get priority access to the extended bootcamps. Since we keep the class sizes small, chances are it will fill up before newcomers have a chance. But if by some chance you do, you will have to go through the same admission process, and score very well on our solidity test.
How important is knowing python going in to this?
We won't be doing anything advanced in the language, so you can use most other languages you are comfortable with.
Why isn't Zcash covered?
Although Zcash was a pioneer in zero knowledge proof adoption, it's difficult to practice the knowledge you acquire without modifying the Zcash protocol, which is quite challenging. We prefer to focus the bootcamp on what you can actually practice. You won't have as much trouble reading the Zcash whitepaper afterwards though!