Moon Bay

Moon Bay is a cutting-edge Ethereum application that integrates advanced features to enhance user experience, security, and functionality. The application is built with a focus on transparency, user-friendliness, and seamless integration with Ethereum standards and tools. The project features daily token claims, chest rewards, NFT marketplace, auction house & more.

Check it out!

Next.js, Express.js, Hardhat.js, MongoDB, Agenda.js, Thirdweb SDK

Connection to Custom Solidity Contracts

The application integrates seamlessly with the ThirdWeb SDK, allowing for efficient and streamlined processes, from signing data to interacting with custom Solidity contracts.

Persistent Storage with MongoDB

Data persistence is achieved using MongoDB, ensuring that user data and transaction records are securely stored and easily retrievable.

EIP-712 Structured Data Signing

This feature allows users to sign typed data structures, enhancing the security of transactions and providing a clearer signing experience.

Daily token claims

Automated Token Distribution

Our system is built to automatically distribute tokens to users based on specific criteria, ensuring a smooth and hassle-free claiming process.

Claim Monitoring

With the integrated claim feed, users can easily track recent claims, ensuring transparency and trust.

Claim Restrictions

The system is designed to prevent users from claiming tokens if they've already done so within a specified timeframe, ensuring fair distribution.

Chest Rewards

Randomized Rewards

Our platform offers a unique reward mechanism where users have a chance to receive either BAY tokens or NFTs when they open a chest.

Event-Driven System

The application listens for specific events, such as a chest opening attempt, and then determines the reward based on predefined logic.

Real-time Notifications

Users are instantly notified of the rewards they receive, enhancing the user experience.

Live Auctions

Bidding

Users can bid on a live-auction that lasts 24 hours. UI is connected to a marketplace smart contract.

Buy Out

Users can choose to buyout the auction for a higher price.

Admin Dashboard

A dashboard allows the admin to list exhibit auctions that will reflect live on the site.

What I Learned

  • Signed Typed Data: Delved deep into the intricacies of signed typed data, understanding its importance in ensuring data integrity and security in decentralized applications.
  • Solidity Programming: Expanded my knowledge in blockchain development by learning Solidity, the primary language for writing smart contracts on the Ethereum platform.
  • Hardhat.js: Familiarized myself with Hardhat.js, a development environment that aids in the compilation, testing, and deployment of smart contracts.
  • Cron Jobs with Agenda.js: Gained hands-on experience with Agenda.js, a lightweight job scheduling library for Node.js. Utilized it to implement cron jobs, specifically for creating a cooldown mechanism for daily token claims, ensuring users can claim only once per day.
  • MongoDB and Transaction Management: Developed a robust system using MongoDB to store and manage transactions. Leveraged cron jobs to facilitate the tracking of completed, pending, and stale transactions, ensuring efficient and reliable transaction processing.
  • Problem Solving Skills: This project was a testament to my ability to tackle complex challenges head-on, think critically, and come up with effective solutions.

Challenges Overcomed

  1. Daily Claim System: One of the initial challenges was to build a system that allowed users to claim only once per day. My first approach was to implement a timer, but it proved to be ineffective. After some research and iterations, I successfully integrated cron jobs to handle this functionality, ensuring users could only claim once in a 24-hour window.
  2. User Verification for Chest Opening: Verifying that users had the right to open chests was another hurdle. I attempted to use signed typed data for this verification. However, a mismatch between the signed data on the server and what was sent to the contract from the client became a major roadblock. After hours of debugging, I discovered that a single space was the culprit behind the mismatch. Rectifying this minor yet crucial detail ensured seamless verification.