Inspiration
GamesFi was inspired by the growing popularity of play-to-earn games and decentralized finance. In the first edition, we created a mobile app where users could enjoy mini-games and earn rewards to withdraw to Binance, Huobi, and Tron Network. For this edition, we wanted to take it a step further by incorporating web-based lottery and prediction games, enabling more opportunities for our users to earn rewards and interact with the platform. Initially, the platform was on Tron Chain but has since migrated to BitTorrent Chain for cheaper transactions
What it does
GamesFi now integrates web-based lottery and prediction games: GamesFi Lottery: A decentralized lottery system deployed on the BitTorrent Chain where players can buy tickets using the GSCORE token and win rewards based on a transparent draw mechanism. The lottery utilizes a six-bracket system with adjustable rewards and discounts for bulk ticket purchases. GamesFi Prediction: Users can predict the future prices of BTC/USD over short intervals using the GamesFiPrediction contract, which integrates Pyth Data Feed for real-time rates.
How we built it
Architecture: Designed a web-based system for lottery and prediction games that integrates seamlessly with the existing mobile app.
Lottery: https://link.excalidraw.com/readonly/Ww8mgkPju56CDa3sCsFn Prediction: https://link.excalidraw.com/readonly/WzmF9dtpAjBmMjx9StyY
Tech Stack: Backend: Node.js, Express.js Frontend: React.js Smart Contracts: Solidity (for GamesFiLottery and GamesFiPrediction mechanics)
Integration: GamesFiLottery Contract: Developed a custom smart contract for a lottery system, including ticket purchasing, random number generation using an external seed, and multi-bracket reward calculations. GamesFiPrediction Contract: Developed a prediction contract that uses Pyth Data Feed for real-time BTC/USD prices. Connected the platform with the BitTorrent Chain using Web3.js.
Challenges we ran into
Smart Contract Development: Developing and testing the smart contracts was challenging due to the complexity of integrating fair draws, multi-bracket rewards, and decentralized price feeds. Oracle Integration: Integrating the Pyth Data Feed required managing the timing and precision of real-time price updates for the prediction contract. Security: Implementing robust security measures for prediction and lottery systems was vital to maintain user trust.
Accomplishments that we're proud of
Custom Lottery & Prediction Contracts: Developed the custom GamesFiLottery contract to provide a fair and transparent lottery experience with a six-bracket reward system. Developed the GamesFiPrediction contract to provide a real-time prediction game using BTC/USD rates. Seamless Integration: Successfully integrated the web-based lottery and prediction platform with the existing mobile app. Scalability: Developed an architecture that allows GamesFi to scale effortlessly as more users join.
What we learned
Cross-platform Development: Enhanced my understanding of developing platforms that provide a seamless experience across both mobile and web. Smart Contract Best Practices: Gained deep insights into secure and efficient smart contract development. Oracle Integration: Learned how to securely and efficiently integrate real-time data feeds into prediction games.
What's next for Gamesfi
New Games: Introduce more games, including trivia and strategy-based games, with the same reward mechanics. Social Features: Implement leaderboards and social sharing to encourage community interaction. DAO Governance: Transition to a decentralized governance model where the community can decide the platform's future direction.
Log in or sign up for Devpost to join the conversation.