Use cases

  1. Educational platforms & e-learning courses: Users can earn XP for completing lessons or passing quizzes. Leveling up can grant access to more advanced courses or special content, thus encouraging continued learning and engagement.
  2. Employee Engagement Programs: Employees earn XP by completing tasks, achieving targets etc. with levels indicating proficiency or eligibility for rewards.
  3. Customer Loyalty Programs: Customers earn XP through purchases, reviews, or referrals. Higher levels could offer greater discounts, exclusive offers, or first access to new products.
  4. Fitness Apps: Users might earn XP for workouts completed or PB’s achieved. Levels could unlock virtual rewards or access to more features.
  5. Community and Social Platforms: Users could earn XP for contributions like posting quality content or helping other users. Advancing levels might grant moderation privileges or other status indicators e.g. a Discord role.

Prerequisites

  1. Setup OPENFORMAT

    Before you can continue, please complete the following steps to obtain the necessary credentials:

    1. Go to the OPENFORMAT Dashboard
    2. Register for an account
    3. Generate an API Key
    4. Create a dApp
    5. Create a Badge (only if required)
  2. An app where you are rewarding on-chain XP

    You will need an app where your users have web3 accounts and are rewarded with XP. You can learn more about how to set this up here.

Get Started

1

Remix this template

Clone this template in BuildShip.

2

OPENFORMAT Node Inputs

Add your OPENFORMAT API Key into the Get User Profile node inputs.

3

Test Integration

To test the integration, click on Test and add the dappId and userId into the query of the request.

Node Inputs

Get User Profile

KeyDescription
API KeyYour OPENFORMAT API Key.
dApp IDThe ID for your OPENFORMAT dApp.

Level Calculator

KeyDescription
XP BalanceThe amount of XP the user has earned, which will come from the output of the Get User Profile node. (String - converted to a number in the node)
Level XP RequirementsAn array of the XP requirements for each level, you can set these values to anything you want and the array can be any length. The default value is [50,100,200,400,800,1600,3200,6400,12800,25600]. (Array of numbers)