FARMERS LEAGUE / VERIFIED RANDOM FOOTBALLER
This project combines an NFT collection with a crypto fantasy football game.
I wanted to make it as resiliant as possible, so that means, keep it simple.
Inspiration
I was inspired by the NFT collections that generated and stored their art 100% on chain, such as the Crypto Punks, the Aavegotchis or the Luchadores. Like my inspirations, I decided to use a simple base design with some variations that would be randomly chosen and could combine to create thousands of possibilities and though ensure the uniqueness of each NFT. This kind of NFT collections really benefit from the smart contracts technology associated with the Chainlink VRF, to guarantee to each participants that the mint is fair and cannot be manipulated. Moreover, drawing in pixel art through the use of SVG code was really something fun to do. Although the limits in terms of size and gas usage make it really challenging.
For the game itself, I like to play to fantasy football games, but like most games I figured this would be far more interesting with a token, to create financial incentives, and really tradables players (NFT). I know some similar projects already exist, but I wanted to build something that could be really decentralized, with 100% of game mechanics put on-chain. For example, the most famous crypto fantasy football game is probably Sorare, but this game requires licences signed with IRL leagues that are owned by a company, and some of its game mechanics can work only on a dedicated ZK Roll Up, and couldn’t be maintained if the Sorare company decided to stop the game. So it is not really decentralized.
In addition to the financial aspect added by the token, I wanted the game to have a social aspect, meaning a game in which cooperation is essential. Assemble a good team is really difficult to do alone. That would require having at least 16 NFTs with complentary characteristics, so more likely owning hundreds of NFTs.
Tools to build
I have started my learning web3 journey a few months ago by watching the 16-hours code camp by Patrick Collins. So I used mainly the tools described in this boot camp :
- Solidity smart contracts
- Brownie framework and Python scripts
Considering the blockspace needed by this game contrats, I chose Polygon as target blockchain, which would be far more appropriate than Ethereum Mainnet.
The NFTs are stored on-chain as SVG images.
I created a Front End using React.js and Moralis SDK to be as efficient and fast as possible. That being said, my front end is still far from being a finished product.
Challenges faced
The most challenging difficulty I faced was the time. Building something that work in less than a month is a big challenge. I ran into technical issues several times in the process but with some researchs, the solution was always somewhere to be found. But all those researchs were really time consumers.
The good thing is I have lots of things I know I have to do to improve on my project:
- on the smart contracts : build a dao, build a contract to name the players and the teams. Then work on the security : run the auditing tools such as slither, fuzzing, etc.
- on the front end : finish coding the missing parts : transfer and loan, challenge, game sign up, game result. Then rethink completely the UI/UX which is 100% improvization today.
Conclusion
All things considered, I had lots of fun during this hackathon, I learned a ton of things, and I’m quite proud of my project. Considering this is my very first web3 project, I never thought I would be able to build something that works, but it does!
So thank you Chainlink! Thank you Polygon! Thank you Moralis!
Log in or sign up for Devpost to join the conversation.