ZK Waitlist

This app demonstrates a reusable on-chain private waitlist. Through the use of zero knowledge proofs, users can join the waitlist with one account, and later prove from a different account that they had previously joined the waitlist, all without onlookers being able to link the two accounts.

Users interact with the waitlist in 3 phases:

  1. Commit: A user selects a private secret and hashes the secret into a public commitment. The user has joined the waitlist once the commitment is submitted to the waitlist contract.
  2. Lock: The waitlist is locked and no one else is allowed to join. The commitments are hashed into a Merkle tree and the root is stored in the contract.
  3. Redeem: Any user can submit a proof that they know a secret which corresponds to a valid commitment in Merkle tree. They present this proof along with a second hash of the secret known as the nullifier to the contract, which redeems their spot on the waitlist. The nullifier is used to prevent anyone from reusing the same secret.


Connect to Metamask to get started! Code for the zero knowledge proof circuits, waitlist smart contract, and frontend can be found below.

Circuits and contracts code: https://github.com/AndrewCLu/zk-waitlist
Frontend code: https://github.com/AndrewCLu/zk-waitlist-website