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

ZKnockXI

A Fully On-Chain Cricket Game Powered by Zero Knowledge Proof

ZKnockXI

Created At

Scaling Ethereum 2024

Winner of

Witness - Best Use of Witness Protocol

Filecoin - Decentralize your dApps with Filecoin 3rd place

Arbitrum - Qualifying Arbitrum Submissions

Prize Pool

Project Description

Introduction

ZKnockXI enables users to create and bet on fantasy sports teams in a secure, transparent, and trustless manner, leveraging the power of blockchain technology, decentralised storage solutions, and oracle services.

The Fantasy Sports Betting DApp is built upon the Filecoin network for decentralised storage, the Witness Protocol for proving the existence and integrity of data, and the Sign Protocol for creating and querying attestations. It allows users to select a match, pick and lock their fantasy team, and place bets on their team's performance. The entire process is designed to be secure, tamper-proof, and resistant to Sybil attacks. Additionally, the DApp utilises Chainlink's decentralised oracle network to calculate individual player scores and total team scores.

Limitations of existing fantasy cricket platforms like Dream11:

  1. Dream11 has faced multiple instances of leaked player team data before matches, raising significant concerns about user privacy and the need for stronger data protection measures within the fantasy sports realm.
  2. Dream11 is embroiled in legal disputes due to the pervasive use of bots, which distort fair competition by artificially inflating betting pools. These automated entities erode the platform's integrity, necessitating urgent measures to uphold equitable gaming standards for all participants.
  3. Dream11's lack of transparency with its scoring system breeds distrust among players, who question the accuracy of leaderboards. Ensuring fairness and clarity is vital for the trust and satisfaction of fantasy sports enthusiasts.

ZKnock's Approach to solve these problems:

  1. ZKnockXI leverages decentralized technologies like Filecoin, Witness Protocol, Sign Protocol, and Chainlink, eliminating the need for a centralized authority or intermediary. This ensures transparency, fairness, and trustlessness, as the entire process is executed on decentralized networks without relying on a single entity.
  2. User data, such as team compositions and timestamps, are securely stored on the decentralized Filecoin network, encrypted with digital signatures to ensure integrity and authenticity. The DApp generates a "squad hash" using Merkle hashes, timestamps, and user addresses, ensuring the immutability of submitted teams. The Witness Protocol and Sign Protocol are used to create and verify prrofs and attestations respectively, providing proof of squad submissions and preventing tampering.
  3. The integration of witness and sign attestations prevents Sybil attacks, ensuring that only legitimate users can participate in the betting process.This Two-factor Authorization (2FA) system further enhances security and user legitimacy.
  4. ZKnockXI utilizes Chainlink's decentralized oracle network via Chainlink Functions to calculate individual player scores and total team scores, ensuring reliability and trustworthiness. This eliminates the need for a centralized entity to calculate and report scores, reducing the potential for manipulation or errors.
  5. After verifying the legitimacy of user squads through the Witness Protocol and Sign Protocol, the DApp can accurately distribute rewards to the winners based on the decentralized score calculations from Chainlink. The transparent and tamper-proof nature of the betting process ensures fairness for all participants.
  6. By leveraging decentralized technologies, users have greater control over their data and can participate in the betting process without revealing unnecessary personal information to a centralized authority.

Through this seamless combination of cutting-edge technologies, our protocol delivers a secure, fair, and transparent fantasy sports experience, setting a new standard for the industry.

How it's Made

ZKnock follows a detailed workflow to ensure the fairness and integrity of the betting process:

  1. Match Selection and Team Formation: Users begin by selecting a match from the available options. They then proceed to pick players and lock their fantasy team composition.

  2. Two-Factor Authentication (2FA) and Sybil Resistance: To enhance security and prevent Sybil attacks, the DApp incorporates two-factor authentication (2FA) and leverages witness and sign attestations. This ensures that only legitimate users can participate in the betting process.

  3. Team Information Storage on Filecoin Lighthouse: Once the user's team is locked, the player IDs and the timestamp of team locking are securely stored on the Filecoin Lighthouse network. The data is encrypted using the user's digital signature, ensuring its integrity and authenticity.

  4. Betting and Squad Hash Generation: After team formation, users can place bets on their fantasy team's performance. The application generates a "squad hash" by combining the Merkle hashes of the team's players (fetched from Filecoin), the timestamp (from Filecoin), and the user's address.

  5. Witness Protocol Integration and Sign Protocol Attestations: The generated squad hash is posted as a leaf hash on the Witness Protocol using the /postLeaf endpoint. This process creates a proof in the form of a leaf index, which serves as evidence of the squad submission. The leaf index, along with the user's wallet address and the match ID, forms the indexer for the attestation. This indexer is used to create and query attestations on the Sign Protocol, providing proof of the squad submission and ensuring its legitimacy.

  6. Match Verification and Reward Distribution: After the match concludes, the application verifies the legitimacy of the user's squad by:

  • Retrieving the player IDs, timestamp, and the user's wallet address from Filecoin.
  • Recreating the squad hash using the retrieved data.
  • Querying the Witness Protocol's /getLeafIndexByHash endpoint to retrieve the leaf index for the recreated squad hash.
  • Using the retrieved leaf index to recreate the indexer for the Sign Protocol attestation.
  • Querying the attestation on the Sign Protocol to verify its existence, thus confirming the legitimacy of the squad and the user.

Once the verification process is complete, the application utilizes Chainlink's decentralized oracle network to calculate the scores for individual players and the total scores for each team. If the current user is the winner, they can claim the rewards associated with their winning bet.

background image mobile

Join the mailing list

Get the latest news and updates