CricTez - A non-fungible token (NFT) based fantasy sports game built on Tezos

Background & Introduction:

The project is based on the most popular sports in the Indian sub-continent, Cricket. Cricket is a bat-and-ball game played between two teams of eleven players on a field at the center of which is a 22-yard pitch with a wicket at each end, each comprising two bails balanced on three stumps. Cricket is immensely popular in South Asia, with viewership in billions and a massive fanbase. CricTez combines crypto with the highly anticipated game of cricket to provide a stellar experience that is sure to get you enthralled.

What is CricTez?

CricTez is a non-fungible token-based fantasy sports dapp, primarily focused on cricket (refer to the last section for more info on cricket). The core idea of dapp revolves around the representation of players/athletes as Non-Fungible Tokens(NFTs).
These NFTs are wrapped as Cards or Collectibles, each representing a player with its unique card score. Each card’s score is realistically calculated based upon an algorithm that is dependent on the performance of players in real matches. The Dapp comprises of two sections: The Marketplace and The Fantasy Game.
The Project includes an in-built marketplace, where users can trade these collectibles and create their unique teams. The value/price of each card is heavily dependent on two main factors: The player it represents and its card score, which ultimately relies on the real performance of the player. Users can view detailed statistics of each card along with the cards in possession on the marketplace.
To add gamification and make the dapp operationally dynamic, we added a whole new layer of fantasy league to it, allowing users to select five cards of their choice and compete for live matches. Depending upon the real performance of players represented by those five chosen cards in the live match, the card score changes. Users can buy a card for a lower price, compete with the card to increase its card score, and then ultimately sell it for a higher price. CricTez presents an opportunity for users to monetize their sports analysis skills while also creating room for those who want an exclusive collectible representing their favorite players.

Architecture:

The architecture of the project involves three main components: a smart contract, an oracle, and a client-side react app. The smart contract is responsible for minting, trading, transfer of the tokens. The non-fungible tokens are based on a slightly modified version of the FA2 standards by smartpy. Every NFT has a unique id which is linked with its metadata stored on the MongoDB database, served via node-express routes. The metadata includes information about the card such as its card score, owner, etc. along with the detailed statistics of the player it represents. The functioning of the Marketplace with the FA2 smart contract is explained below:

The smart contract is also responsible for managing the fantasy game by allowing users to compete for live matches and updating the card scores once the match ends. Mint, Transfer, Buy, Sell are fairly simple functions embedded into the smart contract that performs simple operations. However, updating card scores is a bit tricky process that involves a lot of off-chain data real-time statistics of players. This process entails the use of an Oracle. The current implementation uses Oro -by Tezsure to put all the off-chain data into the smart contract for further processing. The process of updating card scores is completely done on-chain, inside the smart contract, keeping in mind the trust factor that the platform provides. The complete functioning of the fantasy game is explained below :

Tutorial (How to use):

The dapp supports all the transactions through Thanos Wallet.
Download Thanos Wallet for chrome: Here

  1. Signup & Connect Wallet
    Go to: https://crictez.vercel.app/
    Log in With your google account and connect your Thanos wallet(Switch to Delphinet).
    A successful login will redirect you to the marketplace, which will list all the cards currently on sale.

  2. Trade Card/Collectible:
    Explore cards listed on the marketplace. Click on the card that you want to buy/sell. Check all the details of the Non-Fungible Token and the player along with its card score and price. Click on the buy button on the right, confirm Thanos wallet popup, wait for the transaction to complete. The completion of the transaction will be indicated by a toast on the top right, with the following text: “Transaction Completed”. That’s it you own the card now, check by visiting the owned cards sections(3rd tab from top).

  3. Compete for Fantasy Leagues:
    Go to the Compete Section (5th Tab from top), which lists all the live matches which are open for competing. Select the match you want to compete for, and select five owned cards, press compete, and complete the transaction using Thanos Wallet. Come back after the match ends to check the updated scores of the cards.

Project Status:

The project is currently in the development stage with a demo running live on Delphinet. I am also planning to incorporate some suggestions received during the fellowship by members of Tezos India Foundation and TZAPAC.
The links to the live demonstration and GitHub repository are posted below. All community members are welcomed to try our platform and give their valuable suggestions for additional features and improvements.
Live: https://crictez.vercel.app/
Demo: https://www.youtube.com/watch?v=959cuJvpy4I
Github Repo: http://github.com/shubham-kukreja/CricTez/

Credits:

The project was built during the Tezos India Fellowship 2020. I would like to thank Om Malviya, Jignesh Vasoya, and all other members of the Tezos India Foundation team for mentoring us and helping us in every possible manner.

16 Likes

This has excellent potential, because the only people madder than cricketers are fuutballers.

Official collaboration and licensing from the Premier Leagues for cricket and soccer, and the NFL for American football, could attract a huge number of users.

3 Likes

Really cool. Upside potential is huge. I’ll definitely try it out.
Any plans to add soccer? Or developing a similar contract for soccer?

2 Likes

Pretty nice! You guys should try now FutTez!!

1 Like

Yeah definitely! soccer and basketball are next on the list.

4 Likes