APP DEVELOPMENT FOR THE CRYPTO GAME
NOMO FANTASY BASKETBALL LEAGUE
LeagueDAO is a decentralized open-source project which developed a tokenized fantasy sports protocol named Nomo Fantasy Leagues. There are 3 parts in the project: DeFi protocols, GameFi, and NFTs to create a web3 fantasy gaming reality. LeagueDAO enables a global community of fans to collectively play, build, and define the future of fantasy gaming. As a DAO project, LeagueDAO members are together driving decisions to shape the future of fantasy gaming, from IRL sports to esports and more.
WHAT WAS THE TASK?
This is not the first case about LeagueDAO. You can read how the Blaize team has developed a blockchain-based protocol for decentralized Nomo Fantasy Leagues on the Blaize website. So, letʼs refresh a little bit the main information about Nomo project. It is an open-source protocol for decentralized fantasy sports that combines IP, blockchain, the non-fungible ERC-721 tokens (“NFT”), and the ERC-20 tokens named $LEAG (the Nomo Tokens).
This time the task for the Blaize devs was to upgrade current contracts with new functionality and to create a new Fantasy NBA League for LeagueDAO’s Nomo protocol. This new league has mostly the same functionality, but there were changes in the players’ NFTs uniqueness. Thus, we needed to create several NFTs each representing a real-world athlete and their stats with different metadata. We achieved this because the initial architecture was very flexible, so there was no problem making any sets of NFTs with different variations or copies of the same player.
Look at the picture with the code below. It shows a simple smart-contract function of creating a new player. These images (card images) will be linked to the token. In addition, here we can see that the last argument of the function is the ID of some set. This ID refers to an array of parameters that we can assign to each player. Parameters are used to count player’s points in the game, but we can also add any data to implement the new functionality.
This system succeeded by choosing the Polygon blockchain because this blockchain has a low gas price. So we can store impressive, by blockchain standards, data and update them regularly. By the way, recording this amount of data would be very expensive.
THE DEVELOPMENT PROCESS
The Blaize squad for this project consisted of 3 Solidity devs, 2 back-end devs, 1 front-end dev, 1 QA, and 1 DevOps. After initial requirements collection, we started the development of the smart-contracts and back-end changes along with the app layout development. When contracts were ready, the back-end devs updated the existing Subgraph to parse data from contracts. Also, the back-end was changed: new endpoints for the front-end and new scheduled call to contracts. Front-end was connected to contracts and the back-end upon the readiness of necessary parts.
Since we need to store a lot of related data in order to display the status of contacts on the front-end, Subgraph as a data storage tool is very important for us. It allows the collection of new data from contracts as soon as a new block is created. As a result, it allows to constantly maintain the most up-to-date data used in the leaderboards, gamers’ stats and historical statistics. It also makes it possible to store these data in complex connections while keeping easy access to these data. This reduces the cost of future project tech support and platform reliability when you have an experienced developer on Subgraph (because the technology is as confusing and with “pranks” as it is useful).
HAVE IN MIND AN IDEA FOR YOUR OWN CRYPTO GAME? OUR EXPERIENCED TEAM CAN HELP YOU WITH DAPP DEVELOPMENT.
CHALLENGES WE CONFRONTED
We had already been working on LeagueDAO project for 6 months before we started to develop a new Fantasy Basketball League for LeagueDAO’s Nomo protocol. So, we hadn’t some unexpected developing challenges like creating an optimizing NFT structure or designing game contracts (Leagues) that will efficiently calculate points and rewards.
Nevertheless, we had another huge unexpected challenge that doesnʼt connect with development. It was the beginning of the war in our country, Ukraine. But despite Russia’s invasion, we were able to regroup and release the project with only one week’s delay.
As a final point, we managed to implement all requirements and launch a perfectly working blockchain-based app. Now it’s a stable GameFi sports platform and users can play Fantasy Basketball right now. That is just in time for release because now in May-June is a period of the NBA (National Basketball Association) playoff in the USA. So, it’s a convenient time for Nomo Fantasy Basketball League marketing.
So as a result of development, now there is a total supply of 5000 Fantasy Basketball Players Tokens that can be used to compete in the Nomo Fantasy Basketball League. When users stake their NFTs in the Nomo dApp, they are setting their lineups so they can generate points each week based on how the athletes represented by player token perform. Stats like Baskets, assists, and rebounds are converted into points. At the end of the week, rewards are distributed across the league according to how many points each player token scored.
We hope that there will be a continuation of cooperation between Blaize and LeagueDAO by expanding Nomo leagues to more sports!