/zk-events

Zero knowledge event ticketing solution POC built on Mina blockchain

Primary LanguageTypeScriptApache License 2.0Apache-2.0

ZK Events

A Mina zkApp for creating whitelisted events and have users claim tickets. Users can also send tickets to other users and prove ticket ownership at the event.

General architecture description

Each event has its own smart contract which stores a merkle root for the whitelist merkle tree. The merkle tree keeps track of any change in ticket balance for the users. The merkle root is updated whenever user claims or transfers a ticket. The smart contract also keeps track of the event details (max total tickets, max tickets per user, whitelist size, tickets claimed, owner). The zkApp also generates a ticket QR code containing data that can be used to prove ticket ownership at the venue.

Progress

V1

  • General architecture
  • Event generation with whitelist
  • Ticket claiming if in whitelist
  • Gameify console interaction
  • Limits on total number of tickets
  • Limits on maximum number of tickets claimable per user
  • Prove ticket ownership
  • Ticket transfer between users
  • QR code generation
  • Write tests
  • Separate into multiple files tests, contract and demo
  • Add msg.sender check on claim and transfer
  • More concise tests
  • Whitelist modifiable by owner
  • Add timestamp check on claim and transfer

V2

  • Hide more data
  • QR code with less identifiable data
  • Create verifier program to run at the event
  • Frontend

How to run

Run demo:

npm run demo

Run tests:

npm run test

Useful Links

Notes

The zkApp is still actively under development.
This project is being built as part of Mina's zkApp Builders Program.