ZkTickets - An event ticketing protocol using ZKP

Project Name: ZkTickets - An event ticketing protocol using ZKP
Project Track: Web3
Information about the team: Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
Team Member(s): StrawberryChocolateFudge
Github Link : GitHub - StrawberryChocolateFudge/ZkTickets: A Crypto Note based event ticketing platform
Dorahacks Project Link: ZKTickets - An event ticketing protocol using ZKP | Buidls | DoraHacks
Demo: https://youtu.be/ClvEmgcSTaQ
Project Goal: The goal was to create a decentralized event ticketing solution built with ZKP

Project Info:


I uploaded an image that explains how ZK Tickets work.
Project Website: https://btt.zktickets.xyz/
Android app: ZKTickets It’s a non-custodial wallet and ticket scanner. You can download the APK and it needs to be side-loaded for now.
Example Ticket sale page : ZKTickets

Project Test Instructions:

  1. Open up the website https://btt.zktickets.xyz/
  2. Click the create events button and fill out the form to create an event
  3. You are redirected to the event page. Share this to sell tickets
  4. It’s possible to handle tickets which will invalidate them
  5. Or you can create transfer requests to send your ticket to somebody else, get a refund or sell your ticket
  6. To create custom price ticket resales, you need to stake tokens, staking is for sybill resistance to protect against automated bots doing ticket scalping.
  7. On the handle tickets page, you can find a download link for the android app, you can use that to invalidate tickets at venues.

Project Details:
The project was born out of interest to create a ticketing solution like Resident Advisor without a backend that supports decentralized hosting.
I develop crypto note based technologies and this fits the use-case.

I purchased some tickets for an event a few days before I started development and all it was is payment and I received a QR code that was scanned at the entrance of the venue. This seemed quite an interesting challenge to implement as a decentralized crypto note protocol so I decided to do it.

ZKTickets is built using Circom, Solidity, Hardhat, Parcel and Vanilla Typescript, HTML and CSS.

I created the zero-knowledge circuits using the circom languge, it’s arithmetic circuit logic that allows me to create the zero knowledge proofs. The user generates a secret and a nullifier and they are both hashed using Poseidon Hash. The hash of the secret+ nullifier is called a commitment, and the hash of the nullifier by itself is called the nullifierHash. These are the hashes that will be dispatched in the transactions to the blockchain so the secret itself is never revealed to anyone.

The Solidity code handles the tracking of ticket validity, the verification and the sale. The tickets are sold for BTT. When tickets are invalidated the contract can call an external solidity contract that allows somebody to extend the protocol.

Hardhat was used for the development and testing and finally Parcel was used to build the front ends. I used vanilla TS,HTML, CSS for the UI.

Smart Contract links:
Smart contracts are verified, on Donau Testnet: ZkTickets: (The main contract) ZKTickets | Address 0xa186deff34278c32d2176f6b90e1b2a3fbd824f9 | BTTC

ZkSnark verifier: (created with circom) Verifier | Address 0xC88ec599D643D84C7BE4315087b23581ac854064 | BTTC

Ticket Pro token: (erc-20 token) TicketPro | Address 0x305c9d8599d4e6d85ad0c1b4d2de294b6efb82a2 | BTTC

ProStaking: (staking contract to unlock custom price ticket resales) ProStaking | Address 0xddd5455619eee9a6ad5a8cbbd668db15a4ab3710 | BTTC

  • Grant Participation
    Project Milestones:
    Create Circom circuits
    develop smart contracts
    test smart contracts
    develop front end for event creation
    front end for purchasing tickets
    generating zkp and rendering it as pdf
    Qr code scanner page, Optimized for brave browser on mobile
    Testnet deployments
    Front end deployments
    Mobile Application to verify tickets at venues
    Hackathon submission
    Ticket Transfer/Resale/Refund
    Audit
    Mainnet deployment
    Extra: Trust scoring system for event creators. It could be needed after the application has users
25 Likes

Wow, finally this is here. I have had a conversation with some group about this event ticketing and I am happy you are coming out with this.

I believe one can use your protocol anywhere in the world he is?

This will solve a lot of problems
Thanks and welcome

3 Likes

Cool!
Yeah! I’m creating an open protocol.

Anyone can use it. No restrictions. It’s smart contracts and a website that can be hosted on IPFS so it’s censorship resistant.

5 Likes

Alright thank you, I love this idea.
Recently there was a big event in Ghana with ticketing issues. (The printing house printing extra ones to make more profit) I hope this is a decentralized protocol that will take care of all these.

4 Likes

Solving a problem of ticketing events is such an amazing stuff in the web3 world :earth_americas:

Congratulations and welcome to the Grand hackathon S4 :handshake:
I wish the team and the project best of luck :crossed_fingers:

6 Likes

Welcome to Tron Hackathon session 4

Lovely project, this is real life problem solving
Tickets solving project.

First thing coming through my mind

How embedded will zk tickets could be use for large concerts like music show?

All the best

2 Likes

The owner will answer your question but let me add my little.
It’s in the form of nfts so they can mint any quantity they like. In Ghana here now, we buy match tickets on phone and they give you a QR code or code that is checked at the gates of the stadium before entering.

2 Likes

Alright.
I believe the project will be active
With giving answers to our questions concerning them.

QR code makes easier for scanning

Exactly they will be here👍🏻

3 Likes

Hola, bienvenidos al s4, me parece perfecta esta solución de venta de entradas a nivel mundial, adentrado en la web3. Felicidades

2 Likes

@Gordian @Prince-Onscolo

The tickets work with QR Codes. The NFT or POAP is optional, just to showcase that the protocol can be extended.

so basically

  1. You can create an event, it has a price and available tickets.
  2. Users can purchase a ticket and download a pdf with a QR code
  3. At the doors of the venue the QR code is scanned to validate the ticket

It works with zero-knowledge proofs, so when the user makes a purchase, he saves a hash on the blockchain. The QR code contains the secret used to create this hash.
When the ticket is scanned, a zero knowledge proof is created from the QR code, to prove the owner knows the origin of the hash without revealing it.

It’s possible to add token minting to the ticket scanning, so it’s optional to airdrop a POAP when you scan a QR code. That functionality has to be implemented externally, the project just contains a way to do it.

6 Likes

Great, thanks for your clarification.
You went deeper. Thanks so much

1 Like

Thanks for explaining

For me I personally like it’s working principle as QR code

1 Like

Yeah, it really makes it simple.

1 Like

Good to know this
That QR code scanning supports brave.

Please, is desktop left out?

Any reason for slow performance using metamask?

On desktop it works with all wallets as long as there is a camera,
but that’s not really practical for venues.

The metamask mobile wallet is not a very fast.
It takes a long time to open websites. I have an android phone and my experience is that it’s pretty slow to use.

The brave browser on mobile is pretty good, so that is the recommended way to scan QR codes and send transactions.

I tried it with Trust Wallet but that does not support the camera at all.

I will have the dApp online in 2-3 days for you guys to test it out. I appreciate the feedback!

5 Likes

Oh ok, maybe we could try with our phones and see (IOS).
Will be waiting :pray:t2:

2 Likes

Thank your brief explanation

Additionally,
That makes it a must have …( Brave Browser) to be use .

How about other mobile browser?

Yes, my experience with metamask/ Trust wallet Dapp get me in slow mode( not funny tho).

I haven’t tried with other browsers, yet.

I started creating a dedicated mobile app just for ticket scanning, but I’m focusing on the web version first for this hackathon, to have a working version online that is easy to demo.

so for ticket scanning it’s gonna use Brave on Mobile now and a dedicated app later.

For creating events and buying tickets any wallet and browser will do, doesn’t matter if desktop, mobile.

2 Likes

Alright
This is good enough to clear my question session

Please when can we join in testing or demo?