We have been thinking about how a GameFi project can strike a balance between “Game” and “Finance”. We have studied all the popular GameFi projects on the market, and found that the biggest problem is that the economic models of most projects are based on their custom ERC20 token. When no new users come in to buy these tokens to create liquidity, if the token price drops, it will turn into a downward spiral then the project will fail. In addition, the game is not fun is also a very important reason. We saw a few dice on Chainlink VRF's product page and it inspired us. Casino is an enduring game, if we use mainstream tokens such as ETH, BNB, MATIC to play games, and our custom ERC20 tokens as the basis of tokenomics. It seems to be able to solve the two common problems of the current GameFi project!
What it does
FOMO Casino is a GameFi project, it's a play-to-earn casino game build on Polygon. We balance "gaming" and "Finance", it will have a complete economic model to maintain long-term operation. We provide four features：
- Casino - In the first stage, we provide two games of price prediction and roulette. More games in development.
- Price Prediction - Users can predict the ups and downs of token prices in the future, and get rewards if they guess correctly. This is turn-based, executed every 10 minutes.
- Roulette - There are 37 numbers on the roulette wheel, and users can bet at will to win bonuses. This is turn-based, executed every 10 minutes.
- The game must be played with mainstream tokens (such as ETH, BNB, Matic) and project tokens. If the user loses, we will give back a part of the project tokens as a play-to-earn reward.
- We only support Polygon in the first stage, and will support Ethereum and BNBChain in the future.
- NFT Sale - An NFT blind box is a box that contains a unique random NFT or several token. There are five tiers, and each tier is allocated a different amount of the project ERC20 tokens. We let buying NFT become a game!
- Staking - When you stake the project ERC20 token, you also earn additional token on top of the casino revenue. (The feature of casino revenue rewards for staking user was not completed for this hackathon.)
- Lending - We provide the function of lend & borrow, users can pledge token to borrow game token. (Still under development, too late to publish in this hackathon)
Some features need to use our project token, you can contact us to get it.
Note: There was an error when recording the NFT reveal function of the Demo video. After checking, the call chainlink callbackGasLimit was insufficient. We have fixed it.
How we built it
- Price Prediction - We use Chainlink price feed to get token price, users can predict the ups and downs of tokens in the future. In addition, we use Chainlink Keepers to execute the next game round every 10 minutes.
- Roulette - We use the Chainlink VRF to spin wheel then get random numbers. In addition, we use Chainlink Keepers to execute the next game round every 10 minutes.
- NFT Sale - When user want to reveal the NFT blind box, user must get a random number from Chainlink VRF. All NFT images are generated by Midjourney AI, and store by NFT.storage.
Contract Address (Polygon's Mumbai Testnet)
FOMOC ERC20 Token：0xBF812198A319543b70f9aBaD76DC13347EDDb4Ce
FOMOC ERC721A NFT：0xd6B3Ea2D8D313E454C0e1d684Bd959e15Ee0412c
Challenges we ran into
- The calculation time of Chainlink VRF is very long and the cost is very high. We have studied it for a long time and decided to use a turn-based approach to solve this problem.
- The update time of most token prices on the Chainlink price feed is too long, we can only choose a tokens with a shorter update time in the prediction function.
- We have 10,000 NFTs. If each NFT can reveal the blind box independently, the cost will be very high. We're still figuring out a solution.
- Each NFT will distribute the project ERC20 token. We originally wanted to use the ERC1155 contract, but after a long evaluation, we found that the ERC20 token used in the ERC1155 contract is not a general liquid token, and finally decided to switch back to use ERC721A contract.
Accomplishments that we're proud of
The project has only a short period of time from conception, planning to development, and we are very proud that the team can achieve such a degree of completion in a short time.
What we learned
Chainlink provides a lot of functions, which are very helpful for the infrastructure construction of blockchain projects. And the community is huge, you can quickly get answers from the community when you got any problems. We are very happy to build our project through the Chainlink ecosystem!
What's next for FOMO Casino
We have planned a very complete roadmap and tokenomics, in addition to what was presented on the hackathon, there are many functions that are not listed. Due to limited time, the hackathon only completed part of the functions. We will continue to develop and optimize, and the complete version is expected to be launched in 2023 Q1. We plan to raise a seed round, and plan private sale and public sale of tokens in the future. If you are interested in our team, please stay tuned or contact us by letter. Let's simply enjoy the implementation we have now~~