Skip to main content

Personal Projects

1. PSE Core Program Capstone Project: Number Guessing Game

In this game, the goal of each player is to guess closest to the mean of submissions from all participating players. Each game is divided into multiple rounds. In each round, players first pick a commitment value from 1 to 100. The value is processed through a zk-SNARK circuit on the client-side and the proof is submitted on-chain.

After all players submit commitment proofs, then they open and reveal their commitment values. When all players have opened their commitments, the game host concludes the round and the mean will be computed on-chain. The one closest to the mean will win the round.

The player who win 3 rounds first win the game.

This project demonstrates building a zk-SNARK dApp end to end, including a circuit to perform range check and compute Poseidon hash, smart contracts to store the application state, and two zero-knowledge proof verifiers, and a frontend.

2. Combination App

Combination generation is a math concept. Given an n and k, how many combinations of k can be picked from n elements, irrespective of the order (i.e. [1, 2, 3] is regarded the same as [3, 1, 2]). I wrote the algorithm for generating all the combination, retrieving a specific item within the combination, and calculating the total number of combinations.

3. Advent of Code 2021 Solutions

My attempt on Advent of Code 2021. Thanks to the subreddit forum that so I can finish all 25 problems.

4. Stanford Cryptography I Programming Assignment

Solution to programming assignments of Coursera Stanford Cryptography I course.