DEV Community

Cover image for Learn and Earn: Learning Rewards Protocol
Block Experts
Block Experts

Posted on • Edited on

8 5 6 5 6

Learn and Earn: Learning Rewards Protocol

Learning Rewards Protocol is a tool that reward users with a fungible token called Growth upon completing the reading of articles. While this concept can extend to gaming, courses, and other activities, this submission focuses specifically on rewarding users for reading articles.

The project is a full DApp (decentralized application) and includes the following components:

  • DApp: A user interface for reading articles.
  • Backend: Manages users, articles, and token distribution.
  • Token Creation: I used bulksendtokens.xyz to create the Growth token (an Ethereum ERC20 token) for the protocol.

Let's dive in!

  • The user should be connected using a wallet (e.g., MetaMask, Rainbow, Phantom, or any supported wallet).
  • The user reads an article, ensuring they spend the required minimum time on it. Once this time elapses, they can claim their rewards.
  • To claim rewards, the user must sign a challenge using their wallet to verify ownership of the address.
  • An API call is then made to verify the signature and the time spent reading the article.
  • After verification, the rewards are distributed. The user can then view and check their tokens on Ethereum, as demonstrated in the demo below.

Demo

Repo

Learning Rewards Protocol

Welcome to the Learning Rewards Protocol repository! This project is a Next.js-based application designed to serve as a blog where users can read about crypto token growth, engage with educational content, and participate in earning rewards.

Features

  • Educational Content: A rich collection of blogs focused on cryptocurrency and token growth strategies.
  • Token Rewards: Readers can earn rewards in crypto tokens for engaging with and completing specific activities.
  • Interactive UI: Powered by Next.js for fast, scalable, and SEO-friendly performance.
  • Dynamic Content: Easily update and manage blogs and rewards structure.

Getting Started

Follow these steps to set up and run the project locally.

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/Learning-Rewards-Protocol.git
    Enter fullscreen mode Exit fullscreen mode
  2. Navigate to the project directory:

    cd Learning-Rewards-Protocol
    Enter fullscreen mode Exit fullscreen mode
  3. Install dependencies:

    npm install
    # or
    yarn install
    Enter fullscreen mode Exit fullscreen mode

Environment Variables

Create a .env.local file in the root directory…

🌟 Useful Tools for Blockchain Developers


Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (4)

Collapse
 
ansellmaximilian profile image
Ansell Maximilian

Cool idea!

Collapse
 
ettaousy profile image
Zouhair

I love the idea to help users read more and more and discover the world of crypto

Collapse
 
steph_john_40744dd profile image
Steph John

Great article!

Collapse
 
smart_dev_715cbdfe6df profile image
SMart Dev

Great comments about Copilot a got thing while using for almost 1year.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more