Project Name: LuckyDapp
Project Track: DeFi
Team Name: LuckyDappTeam
Team Member(s): @WALLY
DevPost Project Link: LuckyDapp - Your luck starts here | Devpost
Project Goal:
To create a secure decentralized app that introduces a new level of trust and transparency in the DeFi and gaming spaces on the TRON ecosystem through reliable price data from oracles and verifiable randomness.
By leveraging ChainLink VRF and ChainLink Price Oracle, we aim to establish a platform where users can engage in a Prediction Market and a variety of exciting games & modes, all using real-time price data (DeFi) and providing provably fair outcomes ā an innovation currently lacking in the TRON space.
This project will empower users to participate with confidence, knowing that:
- all outcomes of the Prediction Market are reliable & the price data is real and trustworthy;
- all game results are generated in a trustless manner.
All of this fosters a vibrant community centered around fairness and transparency in both DeFi and gaming.
Project Value:
This project utilizes cutting-edge blockchain technologies to create a transparent, secure, and trustless environment for users to engage in a Prediction Market (DeFi) and a variety of games where they can try their luck.
Integrations:
-
Chainlink Data (Oracle):
This integration enables accesing real-time data directly from multiple trusted sources. By utilizing Chainlinkās decentralized oracles, we can ensure that users receive the most up-to-date and trustworthy critical information ā such as prices, statistics, etc. This creates a robust environment for delivering fair and engaging experiences. -
ChainLink VRF:
This integration provides verifiable randomness, ensuring that game outcomes are fair and trustworthy. By utilizing ChainLinkās VRF, we can guarantee that results are generated in a secure and tamper-proof manner. -
LayerZero:
A protocol designed to facilitate communication between different blockchains, aiming to enhance interoperability. Its main purpose is to enable seamless cross-chain transactions and interactions, allowing decentralized applications (dApps) to operate across multiple networks without friction.
In this project, LayerZero is used to bring Oracle Prices & VRF responses to the TRON chain from the chains where the ChainLink Oracle & VRF coordinator are deployed.
By utilizing LayerZero, the project demonstrates the valuable cross-chain interoperability between EVM-compatible networks and TRON, creating numerous opportunities for innovation within the TRON ecosystem. -
TronGrid API:
This powerful API is utilized to access blockchain data from the TRON network, including both mainnet and testnets. It facilitates the retrieval of smart contract historical data and real-time event listening, ensuring access to the most accurate and up-to-date information available from the blockchain for project development.
Through these strategic integrations, the project aims to create a robust and engaging environment for users in the TRON network, setting a new standard for trust and transparency in DeFi and gaming.
Project Info:
Features of LuckyDapp:
-
Cross-platform design: A responsive interface for easy access on both mobile devices and PCs.
-
Wallet integration: Connect your TronLink wallet easily for secure transactions and a smooth user experience.
-
$LUCKY Coin (TRC20): The token for participating in the Prediction Market (Bull or Bear), as well as in various games. It will offer utilities like staking and will be listed on DEXes following the mainnet launch.
-
Faucet: Claim $LUCKY tokens during the testnet phase to start using the platform, ensuring accessibility for everyone.
-
Price Oracles: The outcomes in the Bull or Bear prediction market are ensured by Chainlink Data Feeds, which aggregate data from multiple sources through a decentralized network of independent node operators. This decentralized approach guarantees that asset prices are fair and trustworthy for participants, providing a reliable foundation for all predictions.
-
Provable fairness with VRF: All relevant game outcomes are generated securely using ChainLinkās Verifiable Random Function (VRF), ensuring trust in results.
-
Variety of offerings: Engage in multiple exciting options designed for fairness:
-
DeFi Prediction Market: Participate in āBull or Bearā to bet on the future price movement of an asset ā will it go up (Bull) or down (Bear)? Correct predictions double your bet, with outcomes guaranteed by Price Oracles.
-
Games with VRF Outcomes: Enjoy games such as Ticket Lottery, Coin Flip, Roll Dice, and Wheel of Fortune, all with outcomes determined by ChainLink VRF to ensure fairness;
- Ticket Lottery: Buy tickets for a chance to win a prize pool;
- Coin Flip: Bet on a virtual coin toss; correct guesses double your wager;
- Roll Dice: Bet on the outcome of a virtual dice roll for a chance to win six times your bet;
- Wheel of Fortune: Spin the wheel for a chance to win various prizes;
-
1v1 Games: Challenge opponents in strategic games like āTic Tac Toeā, ensuring a competitive atmosphere.
-
-
Cross-chain capabilities with LayerZero: Facilitate seamless communication between the TRON network and other EVM-compatible chains, enhancing user experience and expanding possibilities.
-
Blockchain data access via TronGrid API: Utilize real-time data for smart contract interactions, ensuring accurate and up-to-date information.
-
User Experience:
Users can engage with LuckyDapp with confidence, participating in a fair and transparent environment that combines DeFi and gaming. The platform emphasizes community building around trust and accountability, allowing participants to enjoy the Bull or Bear prediction market alongside various games.
Each feature is designed to be intuitive, making it easy for newcomers to join while providing depth for experienced users. With real-time updates, comprehensive game histories, and an informative FAQ section, participants are supported every step of the way.
Join the LuckyDapp community and explore a unique blend of DeFi and gaming like never before!
Project Website: https://luckydapp.netlify.app
Project Test Instructions:
-
Open the website.
-
Connect your TronLink wallet
-
Switch to Shasta Testnet Chain
-
Go to the Faucet page to claim some $LUCKY tokens, which are used for participating in prediction market and games. On this page you can also find a link to obtain TRX coins on the TRON Shasta Testnet, which are necessary for paying transaction fees.
-
Bull or Bear: /
- Navigate to the DeFi page and select āBull or Bearā;
- Select a market from the available list [BTC, ETH, etc] to specify which asset you want to bet on;
- The round page will show a progress timeline, allowing you to see the current stage of the round and the steps that have been completed;
- You can bet only during the prediction window (after the round has started and the initial price has been set). During this time, youāll see a countdown timer and the settlement time, which indicates when the final price will be fetched. You will be presented with a question asking where the price will be at the settlement date compared to the initial price. You need to input your bet amount and make a prediction of either āBullā or āBear.ā
- Once the prediction window closes, the round enters the phase of awaiting settlement. During this period, you cannot make any further predictions. When the settlement time arrives, the final price will be determined. At this point, you will be able to see the outcome of your prediction and check if you were correct.
- If your prediction was right, you can claim your rewards.
- Additionally, there is a āRounds Historyā page that contains all past rounds, where users can open and view round details.
- An FAQ section is also included, providing helpful information about the game and its mechanics.
-
Ticket Lottery Game:
- Navigate to the Games page and select āTicket Lotteryā;
- When you open the Ticket Lottery page, it will load the details of the last round, which may be active (running) or in another status, such as ended and waiting for the VRF response.
- The round page will also show a progress timeline, allowing you to see the current stage of the round and the steps that have been completed;
- You can only buy tickets for an active round, and a countdown timer will indicate how much time is left to participate.
- Select the number of tickets you wish to purchase (note that a maximum number of tickets allowed for each round will be specified on the page) and complete your purchase using $LUCKY tokens.
- After buying your tickets, wait for the timer to expire.
- Once the timer expires, the round will move to the next stage. If no one joined the round, it will simply close, and a new round will start. If you are the only participant, the round will finalize, and you will automatically receive your funds back in $LUCKY tokens. However, if there are multiple participants, the round will enter the VRF requesting phase, which may take some time. After the random number is obtained, the winner will be chosen, and they will receive 100% of the round pool automatically. Rest assured that if there is a significant delay in receiving the VRF response, participants will be able to claim back their funds.
- Additionally, there is a āRounds Historyā page that contains all past rounds, where users can open and view round details.
- An FAQ section is also included, providing helpful information about the game and its mechanics.
-
Coin Flipš„®:
- Navigate to the Games page and select āCoin Flipā.
- Choose the amount of $LUCKY tokens you wish to wager.
- Pick either āHeadsā or āTailsā as your prediction for the coin flip outcome.
- After confirming the transaction, you will be redirected to the game page where you can see the status of the game. You will need to wait for some time to receive a response to the VRF request and see the result. Rest assured that if there is a significant delay in receiving the VRF response, you will be able to claim back your funds.
- If your prediction matches the outcome (āHeadsā or āTailsā), you will receive x2 amount of your bet to your wallet. If your prediction doesnāt match, you lose the amount wagered for that game.
- Additionally, there is a āMy gamesā page that contains all your past games.
-
Roll Dice : soon
-
Wheel of Fortune : soon
-
Tic Tac Toe : soon
Project Details:
-
Product demo video: https://www.youtube.com/watch?v=2ztfrP1ZVBc
-
Pitch deck: soon
-
Workflow diagram: soon
-
Dapp screenshots: [ OPEN SPOILER ]
Smart Contract links:
1. LuckyCoin ($LUCKY) TRC-20 token:
- Contract address: TUdkg7hvem1qa28oxF4oFXC5nHupSiizXk
- Explorer [ TRON Shasta Testnet ]: TRONSCAN | TRON BlockChain Explorer | ę³¢åŗåŗåé¾ęµč§åØ
2. BullOrBear Prediction Market [DeFi]:
- BTC market:
- TRON (main):
- Contract address: TKJU3iW6WZHrpch77W7V3ALeqKBqTjkVWd
- Explorer [ TRON Shasta Testnet ]: TRONSCAN | TRON BlockChain Explorer | ę³¢åŗåŗåé¾ęµč§åØ
- EVM (ChainLink price oracle):
- Contract address: 0xf8176f58D8c035D4398939F983ebBc53C763DCaD
- Explorer [ Arbitrum Sepolia Testnet ]: https://sepolia.arbiscan.io/address/0xf8176f58d8c035d4398939f983ebbc53c763dcad
- TRON (main):
3. Ticket Lottery:
- TRON (main):
- Contract address: TMtraLygVFxWCgo6C9rxMgUckwv4jH9wfz
- Explorer [ TRON Shasta Testnet ]: TRONSCAN | TRON BlockChain Explorer | ę³¢åŗåŗåé¾ęµč§åØ
- EVM (ChainLink VRF Consumer):
- Contract address: 0xA87e0c182bA97de7425A3248A4B3304aC146616E
- Explorer [ Arbitrum Sepolia Testnet ]: https://sepolia.arbiscan.io/address/0xa87e0c182ba97de7425a3248a4b3304ac146616e
Project Milestones:
-
Phase 1 (p.1): Research and analysis | Timeframe: August 12 ā August 18
- Formulate the concept of the Dapp
- Analyze and study VRF/random numbers in Web3, focusing on available providers like ChainLink, Gelato, and Supra.
- Select ChainLink as the best fit for our requirements and conduct tests on ChainLink VRF.
-
Phase 1 (p.2): Research and analysis | Timeframe: August 19 ā August 24
- Analyze and study Price Oracles in Web3, focusing on available providers;
- Select ChainLink Data Oracle as the most suitable data oracle for our requirements. Learn how to integrate and test.
-
Phase 2: Cross-Chain messaging research | Timeframe: August 25 ā September 1
- Research cross-chain messaging to integrate ChainLink Price Oracle & VRF into the TRON network, examining protocols like LayerZero and Wormhole.
- Choose LayerZero as the optimal protocol for our project, ensuring it supports TRON as both a source and destination chain.
- Study LayerZero documentation and test interoperability between the TRON testnet and other EVM testnets by sending test messages.
-
Phase 3: Development of core logic | Timeframe: September 2 ā September 7
- Develop logic for sending Price Oracle & VRF requests from TRON to the EVM chain where the ChainLink Oracle & VRF coordinator are deployed, using LayerZero.
- Create logic for returning the generated number from the EVM chain back to the TRON chain via LayerZero.
- Test and verify the smooth operation of Price Oracle & VRF request processing before integrating it into our project.
-
Phase 4: Token deployment and frontend development | Timeframe: September 8 ā September 15
- Create and deploy the TRC20 token, $LUCKY, for participating in various activities and making price predictions.
- Build the app frontend and integrate TronLink wallet connection.
- Create a Faucet page for users to claim free $LUCKY tokens for testing.
-
Phase 5: Prepare first version of āBull or Bearā prediction market [DeFi mode] | Timeframe: September 16 ā September 25
- Introduce Bull or Bear, a DeFi product that allows participants to predict price movements of specific assets.
- Create the logic for the first version of the Bull or Bear contract, implementing the core functionalities and integrating a ChainLink oracle to ensure the accuracy and reliability of predictions.
- Integrate $LUCKY token for making predictions.
- Create a progress timeline on the rounds page to track the current stage of each round.
- Develop a rounds history page to view all past rounds.
-
Phase 6: Ticket Lottery development | Timeframe: September 26 ā October 5
- Develop the Ticket Lottery as the first game mode, including interaction with the lottery contract (approve $LUCKY, buy tickets, etc.).
- Update Lottery contract to allow users to claim back $LUCKY tokens if the Price Oracle & VRF response exceeds the timeout.
- Create a progress timeline on the rounds page to track the current stage of each round.
- Develop a rounds history page to view all past rounds.
-
Phase 7: Backend integration and testing | Timeframe: October 6 ā October 9
- Run backend cron processes with wallet operators to manage round expirations, including Oracle Price & VRF requests, closing rounds without participants, finalizing rounds due to timeout, etc.
-
Phase 8: Add new VRF Games (In Progress) | Timeframe: October 9 ā Ongoing
- Develop additional games:
- Coin Flip;
- Roll Dice;
- Wheel of Fortune;
- Develop additional games:
-
Phase 9: Improve Prediction Market mode āBull or Bearā (In Progress) | Timeframe: October 9 ā Ongoing
- Introduce new types of markets for predictions, including fiat currencies .
- Continuously add more assets (crypto, fiat, etc.) for predictions by integrating more price feeds from Chainlink or integrating different oracles.
-
Phase 10: Allow users to play games and make predictions using tokens other than $LUCKY. (In Progress) | Timeframe: October 25 ā Ongoing
- TRC20 tokens:
- USDT;
- USDD;
- and more
- TRX (native token):
- TRC20 tokens:
-
Next steps: | Timeframe: October 9 ā Ongoing
- Update UI for improved user experience, ensuring seamless navigation across all features.
- Optimize smart contracts for efficiency.
- Introduce a leaderboard for top participants in each game / mode.
- Create a comprehensive statistics page to track various metrics, includind unique players across all modes and games etc.
- Create a āMy historyā section to allow users to view rounds they participated in for both the Prediction Market and VRF games.
- Transform the app and make the $LUCKY token cross-chain, allowing users from EVM chains to participate alongside users from TRON.
-
After mainnet launch:
- Collaborate with other projects to enhance ecosystem partnerships and expand user reach.
- etc.