🎯 Inspiration / Project goal:
The goal of LuckyDapp is 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.
🌟 What it does
LuckyDapp is 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.
LuckyDapp has integrated ChainLink Price Oracle and ChainLink VRF (Verifiable Random Function). These integrations 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, ensuring fairness.
All of this fosters a vibrant community centered around fairness and transparency in both DeFi and gaming.
🔨 How we built it
LuckyDapp was developed through a structured approach involving several key phases:
▬ Research and analysis: The concepts of verifiable randomness and price oracles in the Web3 space were explored, ultimately selecting ChainLink as the provider due to its reliability and robust features.
▬ Cross-chain messaging: Protocols like LayerZero were investigated to facilitate cross-chain communication, enabling the integration of ChainLink's Price Oracle and VRF into the TRON network.
▬ Core logic development: Logic for sending requests to ChainLink and processing the responses back on the TRON chain was created, ensuring seamless interoperability.
▬ Token and frontend development: The $LUCKY token was deployed, and a responsive user interface was built to support both mobile and PC access, integrating wallet connections for secure transactions.
▬ Development: The "Bull or Bear" prediction market and various games were implemented, ensuring all outcomes are fair and backed by reliable data.
🛠️ Tech Stack:
💻 Frontend: React
🗄️ Backend: Express.js
⛓️ Blockchain:
- Chain: TRON Shasta Testnet
- Smart contract language: Solidity
- Oracles: ChainLink Price Oracle
- Randomness: ChainLink VRF (Verifiable Random Function)
- Cross-Chain Protocol: LayerZero
- Token standards: TRC20
- Wallet integration: TronLink
🔗 Key integrations and Technologies
LuckyDapp utilizes several innovative 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.
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.
👨💻 Challenges we ran into
🧠 Cross-chain integration: Navigating the complexities of cross-chain messaging posed significant challenges, particularly in ensuring smooth communication between TRON and EVM-compatible chains using LayerZero. Within this broader challenge, several sub-challenges emerged:
- Network configuration: Incorrect configurations of network endpoints resulted in communication breakdowns, necessitating thorough checks and adjustments to establish reliable connections.
- Message type logic: Implementing the logic for sending different message types through LayerZero added complexity. We needed to ensure our application could appropriately respond to various messages received from the destination chain, requiring detailed handling for each message type.
- Data encoding and decoding: The intricacies of encoding transaction data on the source chain and decoding it on the destination chain were challenging. We developed robust mechanisms to maintain data integrity and ensure accurate interpretation across chains.
🧠 Smart contracts logic: Creating effective logic for both the Prediction Market (Bull or Bear) and VRF-based games (such as the lottery) was particularly challenging. We needed to account for all possible cases and round statuses, ensuring users could claim refunds or recover their stakes in case of delays caused by cross-chain message returns. This added a crucial layer of trust and transparency, empowering users to engage confidently with the platform.
🧠 Data accuracy: Integrating price data from ChainLink's oracles required careful handling of data feeds to maintain accuracy in our "Bull or Bear" prediction market.
🏆 Accomplishments that we're proud of
▬ 🎉 Successful integration of ChainLink: We successfully integrated ChainLink VRF and Price Oracles, establishing a reliable foundation for fair outcomes in both our games and prediction markets.
▬ 🎉 Cross-chain functionality: Our implementation of LayerZero enabled seamless cross-chain interactions, showcasing our commitment to interoperability within the blockchain ecosystem.
▬ 🎉 Friendly UI: We developed a responsive and intuitive design that caters to both mobile and PC users, enhancing accessibility and engagement.
📚 What we learned
📚 Importance of research: Thorough research into available technologies and protocols was crucial in making informed decisions that shaped our platform's architecture.
- One key takeaway was the significance of Verifiable Random Functions (VRF) in the Web3 ecosystem. Our exploration of VRF highlighted its ability to generate secure and tamper-proof outcomes for games and predictions. This fosters a vibrant community and sets a new standard for fairness in DeFi and gaming. Integrating VRF was essential for building a transparent and trustworthy environment, emphasizing the need for reliable technologies that create engaging and fair user experiences.
- Additionally, integrating Price Oracles provided real-time, reliable price data, ensuring that our prediction market operates on trustworthy information. This integration was vital for establishing transparency and reinforcing user trust in our platform.
📚 Cross-chain challenges: We learned valuable lessons about the complexities of cross-chain integration, which will guide our future developments and enhancements.
Completed milestones & next steps:
✅ Phase 1 (p.1): Research and analysis
- ✔️ 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
- ✔️ 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
- ✔️ 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
- ✔️ 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
- ✔️ 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]
- ✔️ 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
- ✔️ 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
- ✔️ 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)
- Develop additional games:
- ⚙️Coin Flip
- ⚙️Roll Dice;
- ⚙️Wheel of Fortune;
🔜 Next steps:
- ➡️ 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.
🔜 After mainnet launch:
- ➡️ Collaborate with other projects to enhance ecosystem partnerships and expand user reach.
- ➡️ etc.

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