5 AM Clapp

Five AM Clapp is an application that helps users stay motivated for commitments such as waking up at 5 A.M.

5 AM Clapp

Created At

Road to Web3

Project Description

Waking up at 5 AM has many advantages, you can finally find extra time for your hobbies, business or general well-being. However, many of us struggle to find enough motivation/ discipline. Change it today! Stake your money with 5 AM Clapp, wake up to get it back, plus earn some extra MATIC tokens as rewards. Join our clapp today!

After going to the application's website, the user will have to connect the wallet (Polygon Mumbai Network), and then mint an NFT token as a part of a club membership subscription. Once the user is logged in and has minted membership NFT token, the user can stake a portion of MATIC tokens, stating that the user will wake up at 5 A.M. The application will send staked funds to the smart contract, and between 5:00 and 5:59, the user will be able to see a button "I woke up!" which will transfer staked funds back to the user. There will be a simple question to answer and a captcha (to ensure that the action is not made by any bot and that the user woke up). For each successful commitment, the user will get staked funds for a given day back, plus the user will be rewarded with 1 5AM token. Each time user gets at least 30 5AM tokens, the user will be able to claim a reward from the pool of the contract. In other words, the available funds that were frozen in the contract, that cannot be withdrawn, are transferred to the reward pool. The reward pool is always divided by all of the users that qualify for the reward.

How it's Made

The smart contract is written in Solidity, and related libraries are stored in the "contracts" folder of the root of the project. Hardhat library is used for the compiling process and deploying them to the blockchain. Contracts are deployed to the Polygon Mumbai network, via Alchemy blockchain node provider.

The frontend part is built with React, and the styling is completely custom where all of the styles are made with the help of the Styled-Components library. All of the functionalities of the smart contract, plus wallet connection is handled by the Ethers.js library on the frontend side.

background image mobile

Join the mailing list

Get the latest news and updates