ZeroKing is a chess game where players must verify they have a .edu email before playing. It uses zero-knowledge proofs to check the email without revealing it.
The game runs on Mina using a custom zkApp built with o1js. Every move is verified inside a ZK circuit, so no one can cheat. Only valid moves are allowed, and no one needs to trust the other player.
At the end of a game — if someone resigns or the match is a draw — the result is shown and the player is redirected to the home page. Later, we’ll add NFTs that can be minted to prove a player’s win or participation.
ZeroKing brings together private identity, on-chain logic, and fair gameplay — with no trust required.
how it's made – zeroking
zeroking is a minimal chess game where players must prove they have a .edu email using zero-knowledge proofs. every move is validated inside a zero-knowledge circuit using o1js (mina protocol).
technologies used:
- sveltekit for the frontend and routing
- o1js (mina) to write zk circuits that validate chess moves
- zkemail + noir-jwt to generate zero-knowledge proofs of .edu email ownership
- tailwindcss for layout and spacing
- svelte-french-toast for toast messages
- svelte-ripple-action for button effects
the game logic:
- the entire chess ruleset (pawn movement, promotion, en passant, castling, etc.) is written using o1js
- game state is expressed in provable field and bool values
- all moves are validated using constraints and must pass zk proof checks
- no player can cheat or send invalid moves — even if they try to modify state manually
email gating:
- user inputs a .edu email
- a fake zk proof is generated using mocked logic (for now)
- in the future, this will be replaced with actual gmail-based zkemail verification using noir-jwt
- only users with valid .edu proofs can play
game end:
- if a player resigns or accepts a draw, a modal shows the result image
- after 3 seconds, the app redirects the user to the home page
- the modal uses a static image to simulate what an nft preview would look like
extras:
- transactions are wrapped in a function to manage state and timeouts
- everything is reactive but kept lightweight
- no backend is used
- nft minting will be added later using the zk proof data
partner tech:
- zkemail for identity proof
- mina (o1js) for zk chess logic
- ethglobal for infra and testing
this project is built around proof, not trust. no servers. no secrets. no ui distractions. just cryptographic rules and fair play.