Inspiration

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:

  1. 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.
  2. 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!
  3. 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.)
  4. 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

  1. 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.
  2. 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.
  3. 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
Staking:0xf450d681a152D5bc4Ec96EE46680a1ebFe541815
Price Prediction:0xfbB789FA93FDbd0C3dee2684c856C370fe213c0e
Roulette:0x43F887809312B262fc3A492fd73EE0680b4Ae397

Challenges we ran into

  1. 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.
  2. 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.
  3. 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.
  4. 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~~

Built With

  • chainlink
  • datafeed
  • erc721a
  • hardhat
  • ipfs
  • keepers
  • midjourney
  • nft.storage
  • polygon
  • solidity
  • vrf
Share this project:

Updates

posted an update

Many thanks to Chainlink for hosting this hackathon, which gave us the opportunity to plan such a project in a short period of time. We will provide more games in the future, such as betting on sports events, the feature will need to use Chainlink's oracle. Although it is a decentralized service, compliance is what we need to do next!

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 email.

Our email: "rugpull.casino [@] gmail.com"

Log in or sign up for Devpost to join the conversation.