DailyCheckIn
The Daily Login Reward System is an innovative decentralized application (dApp) designed to incentivize user engagement through a blockchain-based reward mechanism. Built with Solidity, the smart cont
Description
The Daily Login Reward System is a blockchain-based decentralized application (dApp) that rewards users for daily engagement. Its backbone is a Solidity smart contract deployed on the Ethereum network, featuring a straightforward yet robust design. The contract uses two key mappings: lastLogin tracks each user’s most recent claim timestamp, while userRewards records their accumulated rewards. Users can claim a fixed 1 ETH reward every 24 hours (86,400 seconds), enforced by a COOLDOWN_PERIOD constant. The claimReward() function updates these mappings and emits a RewardClaimed event, while getRewardBalance() and timeUntilNextReward() provide read-only access to a user’s status. Written for Solidity ^0.8.0, it avoids external dependencies, ensuring simplicity and security.
The frontend, built with HTML, CSS, and JavaScript, integrates Web3.js to connect to the Ethereum network via MetaMask. Hosted locally (e.g., via python -m http.server), it features a modern interface with a gradient background, animated buttons, and a dynamic cooldown progress bar. Users connect their wallets (like
Progress During Hackathon
0