Inspiration

Inspired in Battlezips Game and Noir+Garaga hackathon streamings, we decided to learn ZK development and explore the new tools for mobile apps and create an easy first game that united Snarks privacy, Starknet fees and AVNU gasless onboarding.

What it does

Create game slots in Starknet where users can store their secret number in a private way and begin to try to use their PES powers to guess the opponent number. All onboarding is thru Avnu paymaster so users doesn't have to deal with seed phrases (full transparency for classic web2 player).

How we built it

First, we created a Circom Circuit to compare secret number with private (secret, salt) and public inputs (guess), then move that circuit to Mopro (mobile prover) which creates the plugin for flutter. After that, we add the plugin to our Flutter App. By other side, we create a REST API backend for Garaga calldata translation and also generate the Cairo verifier. Then we take this contract and add all logic for game creation, store secret numbers, cjeck for winners and transfer rewards to the winner.

Challenges we ran into

Learn all this tools (Circom, Mopro and Garaga), in a month.

Accomplishments that we're proud of

All that we learned. This technology open a full world of use cases combining blockchain inmutability and ZK privacy. Also, we managed to bring SNARK and STARK together in a single app.

What we learned

That Verifiable Computing is the root of this technology and ZK is a subset of use cases.

What's next for ZK_PES Extrasensory Perception Game

  • Communicate players thru events and indexers.
  • Improve UI
  • Add gassless transactions
  • Get sponsors to grant free transaction to first users and increase the Starknet onboarding

Built With

  • avnu-paymaster
  • cairo
  • circom
  • dart
  • flutter
  • garaga
  • mopro
  • rust
  • starknet.dart
Share this project:

Updates