project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

ZKTPS

Creating a zero-knowledge (ZK) based ticketing system to prevent counterfeiting and black marketing while keeping costs low is an innovative approach.

ZKTPS

Created At

StarkHack

Winner of

Starkware - Best use of Starknet Promising Projects

Voyager - Voyager API

Prize Pool

Dynamic - Pool for projects which use Dynamic

Prize Pool

Project Description

=>Problem Statement:

  1. High Costs: Traditional ticketing platforms impose substantial fees, including service and processing fees, making it expensive for smaller organizers to host events.
  2. Centralization: Existing ticketing systems rely heavily on third-party platforms, leading to single points of failure, biased policies, and data breaches, reducing transparency and control for users.
  3. Black Marketing: Tickets often enter a secondary market where they are sold at inflated prices, disadvantaging genuine fans and enabling unfair profits for scalpers.
  4. Replay Attacks: Traditional ticketing systems are vulnerable to replay attacks, allowing malicious actors to reuse valid ticket transaction data for unauthorized access, compromising event security.

=>Solution:

  1. Low Transaction Fees: ZKTPS on StarkNet offers event organizers the ability to create events with minimal transaction fees, making hosting events more affordable.
  2. Decentralization: Being on the blockchain, ZKTPS eliminates centralization issues, ensuring transparency and preventing organizers from manipulating ticket availability.
  3. Reselling Tickets: The protocol includes a feature for ticket resale without users setting their prices, ensuring fair pricing and preventing black marketing.
  4. Ticket Validation: ZKTPS uses zero-knowledge proofs (zk-SNARKs) to invalidate tickets upon successful entry to an event, preventing ticket sharing and unauthorized reuse.
  5. Versatile Usage: ZKTPS allows tickets to be used both online and offline, including printing them on paper, providing flexibility and convenience for attendees.
  6. Zero Knowledge Proofs: Enabling zk-SNARKs proofs on StarkNet by using L1-L2 messaging.

=>Features:

  1. Event Creation: Easily create and manage events with minimal transaction fees, empowering organizers to host events efficiently.
  2. Joining Events: Attendees can join events using an event ID or a shareable link provided by organizers, ensuring seamless access.
  3. Ticket Scanning for Validity: Enable event staff to scan tickets to verify their current validity, preventing unauthorized access.
  4. Ticket Invalidation: Utilize ticket scanning to invalidate tickets upon successful entry, ensuring each ticket is used only once.
  5. Ticket Resale: Enable ticket resale without users setting their prices, maintaining fair pricing and preventing black marketing.
  6. Resaleable Tickets Dashboard: A dedicated dashboard for users to view and buy tickets available for resale, enhancing user control and convenience.
  7. Custom Token Integration: Event organizers can integrate their custom tokens for ticket purchases, enhancing their community engagement.

=>Why Use Zk-SNARKs?

  1. Credential Protection: In a traditional hash system, real credentials would need to be provided on-chain, increasing the risk of exposure, especially in scenarios like ticket resale. zk-SNARKs allow for the verification of credentials without revealing them, enhancing security.
  2. Proof Integrity: zk-SNARKs enable the verification that the proof creator is the caller of the function on-chain. This prevents proof copying and unauthorized use, ensuring that only the rightful owner of the credentials can create a valid proof.

=>Detailed Workflows:

  1. Event Creation:Event organizers create events via the frontend, which interacts with the Cairo smart contracts on StarkNet. Minimal transaction fees are ensured through the efficient design of the contracts.
  2. Ticket Issuance and Purchase: Users purchase tickets using the frontend interface, with transactions managed by the integrated wallet. Purchased tickets are stored and managed in the MongoDB database, accessible via the dashboard.
  3. Ticket Validation and Invalidation: At the event, staff scan tickets to check their validity using the zk-SNARK proofs. Successfully scanned tickets are invalidated to prevent reuse, with the process managed by the Cairo contracts and verified by Solidity contracts on Ethereum.
  4. Ticket Resale: Users can resell their tickets through the platform without setting their own prices, ensuring fair resale prices. The backend manages the listing and sale of resaleable tickets, ensuring transparency and user control.

How it's Made

  1. Smart Contracts =>Cairo (StarkNet L2 Contracts): Event Creation: Smart contracts allow organizers to create events with minimal transaction fees. These contracts manage event details, ticket issuance, and validation processes. Ticket Invalidation: On successful entry to an event, tickets are invalidated using zero-knowledge proofs to ensure they cannot be reused.

=>Solidity (L1 Verifier Contracts): Verification: Solidity contracts on Ethereum are used to verify zk-SNARK proofs. This involves L1-L2 messaging to facilitate proof validation on StarkNet.

  1. Zero-Knowledge Proofs =>Circom: Circuit Construction: Circom is used to construct zk-SNARK circuits that handle the proof generation and verification processes. These circuits ensure that ticket details can be verified without revealing sensitive information.

=>snarkjs: Proof Generation: snarkjs is used on the client side to generate zk-SNARK proofs. These proofs are then submitted to the smart contracts for verification.

  1. Frontend Development =>React.js: User Interface: React.js is used to build a responsive and user-friendly interface. The frontend includes features for event creation, ticket purchasing, resale management, and validation. Dynamic API Integration: The frontend integrates with the Dynamic API for efficient wallet connections and user authentication.

  2. Wallet Integration =>Argent Wallet: User Interactions: Argent Wallet is the preferred browser wallet for user interactions, allowing users to manage their tickets and perform transactions securely.

  3. Backend Development =>Express.js and MongoDB: Ticket Storage and Management: The backend, built with Express.js and MongoDB, stores resaleable tickets and handles the fetching of tickets for the dashboard listing. This ensures that users can easily view and purchase available tickets.

  4. Event Listening and Management =>Voyager API: L1-L2 Transaction Management: The Voyager API is used to listen for events and manage L1-L2 transactions. This is crucial for ensuring accurate event emissions and preventing the need for custom delays after transactions.

  5. Advanced Features =>Custom Token Integration: Event organizers can integrate their custom tokens for ticket purchases, enhancing their community engagement. =>Voyager API and Real-time Data: Voyager API ensures accurate real-time data for event listening and transaction management, particularly useful for invalidateTicket, createEvent, and buyTicket functionalities.

background image mobile

Join the mailing list

Get the latest news and updates