Skip to main content

Use cases

  1. Crowdfunding Platforms: Display top donors or fundraisers in real-time, showcasing their contributions and profiles. This recognizes donors and encourages more generous contributions through social proof and competition.
  2. Educational Apps: Create a leaderboard for top scorers or most active participants, motivating students to strive for higher rankings.
  3. Sales and Performance Dashboards: Create leaderboards that rank sales personnel or other employees based on their performance metrics.
  4. Environmental Apps: Create leaderboards that track and display user activities like recycling, volunteering hours or petition signatures. This can foster a competitive spirit that drives more significant contributions to the cause.
  5. Fitness and Wellness Apps: Track and display community progress in challenges such as step counts or completed workouts. Showing participant details alongside their stats can encourage a healthy competition and community support system.

Prerequisites

Before generating a leaderboard, ensure that at least one XP reward transaction has been made. We recommend using the Reward XP Integration Template to reward XP before using this template.
  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. Database Table
We’ve used Supabase as an example database, but you can use any database you like.
Have a table that associates a user with their web3 account. This example assumes a table called profiles with the fields:
  • user_id the user id associated with
  • name where the users display name is stored
  • photo_url where the users profile photo is stored
Disable Row Level Security (RLS) for testing purposes only. We highly recommend enabling RLS in any production environment to ensure data security and integrity.
Request
example

Get Started

1

Remix this template

Clone this template in BuildShip.
2

Supabase Node Inputs

Add your Supabase API Key and API URL to the Get Row and Create Row node inputs.
3

OPENFORMAT Node Inputs

Add your OPENFORMAT API Key into the Get Leaderboard node inputs.
4

Test Integration

To test the integration, click on Test and add the resultAmount, dappId and duration to the query of the request.

Node Inputs

Get Leaderboard

Get Row

Improve Leaderboard

Gotchas and Troubleshooting

Custom Name and Images

If you want to change the name or image that is returned when a user is not associated with an account address then you can edit the code within the Improve Leaderboard node. Simply change the text inside the quotations for name and photo_url. Custom Name and Images