LogoLogo
  • OpenRank
    • Ranking and Reputation
    • Use Cases
  • The Reputation Stack
    • Data
    • OpenRank Protocol
    • Apps and Clients
  • Integrations
    • Farcaster
      • Openrank Scores Onchain
      • Ranking Strategies on Farcaster
      • Global Profile Ranking
        • 🔵Top Profiles (based on Following)
        • 🔵Top Profiles (based on Engagement)
        • 🟢Profile Rank (based on Following)
        • 🟢Profile Rank (based on Engagement)
      • Channel User Rankings
        • 🔵Top Profiles in Channel
        • 🟢Profile Rank in Channel
      • Personalized Network
        • Direct Network
          • 🟢Get Direct Following
          • 🟢Get Direct Engagement
        • Extended Network
          • 🟢Personalized Following
          • 🟢Personalized Engagement
      • Frames
        • 🔵Top Frames
        • 🟢Personalized Recommended Frames
      • Feeds
        • For You Feed
          • 🔵For You
          • 🔵For You (by Authorship)
        • Channel Feed
          • 🔵Channel Trending Casts
      • Metadata
        • 🟢Get FIDs for Addresses
        • 🟢Get Handles For Addresses
        • 🟢Get Addresses for FIDs
        • 🟢Get Addresses for Handles
      • Ideas to Build using OpenRank APIs
      • Neynar x OpenRank Guides (WIP)
        • Build "For You" Feeds for your Client, using Neynar and OpenRank
        • Build "User Search" using Neynar and OpenRanks' Global Ranking API
        • Build "Suggested follow list" based on OpenRank and Neynar
        • Build Channel Trending Feeds for your Client using Neynar and OpenRank APIs
        • Build "Discover New Users Feed" using Neynar and OpenRanks Global Ranking API
        • Build Power Badges for your Client using Global & Personalized Ranking APIs by OpenRank
        • Build "Sort Replies" on a cast using Neynar and OpenRanks' Global Ranking API
    • Clanker OpenRank Scores
    • Lens Protocol
      • Ranking Strategies on Lens
      • Lens Profile APIs
      • Lens Content APIs
      • Lens Profile Insights
    • Metamask SPD
    • Onchain Graphs and Feeds
    • Upcoming Integrations
    • GitHub Developers & Repo Ranking
  • Reputation Algorithms
    • EigenTrust
    • Hubs and Authorities
    • Latent Semantic Analysis
  • OpenRank SDK
    • Introduction
    • Creating your first reputation graph
    • Publishing Rankings with OpenRank SDK
    • Guides
      • Tipping based User Rankings powered by OpenRank
    • Installation
    • SDK References
      • EigenTrust
        • Installation and Use
        • Examples for using EigenTrust
      • Hubs & Authorities
        • Installation and Use
        • Examples for using Hubs & Authorities (Coming soon)
      • Latent Semantic Analysis (Coming soon)
Powered by GitBook
LogoLogo

SOCIALS

  • Github
  • Farcaster

Copyright 2024

On this page
  • Overview:
  • Data Collection:
  • Running OpenRank
  • Publishing Rankings
  • Visualize these rankings
  1. OpenRank SDK
  2. Guides

Tipping based User Rankings powered by OpenRank

Create a user ranking based on tipping activity of $degen (or any token) using OpenRank.

PreviousGuidesNextInstallation

Last updated 9 months ago

This guide demonstrates how tipping communities can leverage their tipping data (both on-chain and off-chain) to create user rankings and reputation. We use the $degen community as an example to generate rankings of the most trusted/valued users based on tipping activity.

Overview:

This process involves:

  1. Data Collection: Determining local trust and seed trust.

  2. Processing: Running EigenTrust using OpenRank

  3. Publishing: Sharing the generated rankings.

For a detailed walk-through, you can access the Hex notebook directly .

Data Collection:

In this step, we will use Dune to source our Local trust (i,j,v) table and the pre trust table (i,v). If you are unsure of what these terms mean, you can learn more about eigentrust .

  1. Local Trust (i,j,v)

    We are using this to get all the tipping activity that has happened between users Here we have

    • i: Farcaster ID (FID) of the tipper

    • j: FID of the tip receiver

    • v: Tip amount

  2. Pretrust (Seed Peers) (i,v) We determine the pre-trust (seed peers) based on the users who have received the most tips. Here we have used:

    • i: FID of the most tipped user

    • v: Amount of tips received / total received sum

    Alternatively, all tippers can be used as seed peers with equal pre-trust scores. Access this pre-trust dataset for reference. You can view that pretrust .

Running OpenRank

The main steps here include:

  1. Local Trust Retrieval Store the local trust values (i, j, v) obtained in the data collection step into a variable, ensuring only records with tipping activity are included: l['v'] > 0.0 just makes sure only records with some tipping that has happened is taken into consideration.

  2. Pretrust Retrieval & Configuring Alpha Store the pre-trust data into a variable, ensuring trusted users have a trust score (v) greater than 0. The limit: function is added to make sure we only take the top 100 users into the pretrust.

  3. Running EigenTrust Here we first load alpha into EigenTrust and store the EigenTrust class in to a variable a a = EigenTrust(alpha=alpha) and then running the compute and storing it into the score variable score=a.run_eigentrust(localtrust, pretrust)

Publishing Rankings

a.publish_eigentrust(eigentrust_id, scores) uploads the rankings generated into a s3 bucket and makes it available to download via the published_url

Visualize these rankings

Utilize the rankings in a Dune query to add additional information such as usernames and enhance visualization. This allows for easier interpretation and validation of the rankings.

With the local trust and pre-trust data, we run the EigenTrust algorithm using the OpenRank SDK. Learn more about the eigentrust reference .

Note: The Hex notebook and the accompanying picture may appear complex because the notebook includes various pre-trust assumptions to visualize how rankings change with each assumption. For simplicity, we will use the top 100 tip receivers as our pre-trust set and set the alpha (strength of pre-trust) to 0.5. You can read more about these parameters .

With the scores variable containing the rankings, use the in the SDK to share the results:

here
here
publishing methods
here
here
dune query
here
LocalTrust - Input to OpenRank SDK
Pretrust
Running the OpenRank
Loading localtrust
Loading Pretrust
Running Eigentrust
Publishing rankings