Skip to content

nikhildhamdhere15/Study-Streak-Rewards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Study-Streak-RewardsHere’s a complete README.md draft for your Move contract:


📚 StudyStreak Smart Contract

Description

The StudyStreak smart contract helps users track and maintain their study streaks on the blockchain. It records:

  • The current streak of study sessions.
  • The longest streak ever achieved.
  • The last block in which the user studied (ensuring streak accuracy).

By storing streak data directly on-chain, the contract ensures transparency, immutability, and verifiable progress tracking.


Vision

The goal of the StudyStreak contract is to gamify learning and help users stay consistent in their study habits. By leveraging blockchain technology, we can:

  • Build a trustless and decentralized learning tracker.
  • Enable learners worldwide to showcase verifiable learning records.
  • Create a motivational system through rewards, NFTs, or tokens for maintaining streaks.

Future Scope

In future versions, the StudyStreak project can expand with:

  • Real-time block-based streak calculation using actual blockchain block height.
  • Reward systems for achieving specific streak milestones.
  • Integration with learning platforms to log streaks automatically.
  • NFT Badges to reward users for hitting streak milestones (e.g., 30 days, 100 days).
  • Leaderboard system for competitive learning.
  • Multi-chain compatibility for broader adoption.

Contract Details

  • Module Name: StudyStreak::StudyStreak
  • Contract Address: 0x03c34f6552d1594dbb8ca0463a41c6bb9f8077baf06056389b1ef0bb5d55bb06
  • Language: Move

Functions Overview

1. initialize_streak(user: &signer)

  • Purpose: Sets up a new streak tracker for the user.
  • Restrictions: Can only be initialized once per user.

2. log_study_session(user: &signer)

  • Purpose: Logs a study session, updates the current streak, and keeps track of the longest streak.

  • Logic:

    • Increments the current streak by 1.
    • Updates the longest streak if the new streak is longer.
    • Records the block number of the study session.

Screenshot 2025-08-14 132656

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages