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
  • Creating Feeds
  • Step 1: Getting all the casts
  • Step 2: Generating relevant Graphs to power feeds
  • Step 3: Filtering all casts
  • Step 4: Sorting and Time based filtering
  1. Integrations
  2. Farcaster

Feeds

PreviousPersonalized Recommended FramesNextFor You Feed

Last updated 1 year ago

A set of APIs to power Personalized For You feeds or Channel Feeds.

The For You feeds have a latency of around 1.3 seconds and channel feed have a latency of sub second.

Creating Feeds

Here is how our Feed endpoints generates relevant casts to populate the trending feed (for you/channel) for your application.

Here along with explaining some assumption that we have used to generate a very well curated feed we have also explained our all the ways the API will have configurations to customize the experience for the feed based on your (developers') own judgement.

Step 1: Getting all the casts

As of the first step in creating a feed, we take in all casts ever created on the Farcaster network for the last 5 days.

To understand the full extent of the what kind of data we deal with - its around 600,000+ new casts as of April 2024. When fetching these casts we also take into consideration all the actions on each of those casts like - Likes, Recasts, Replies.

At the end of this step we get a list of all casts with all engagement data in the past 5 days.

Step 2: Generating relevant Graphs to power feeds

In For You feeds, we create a personalized graph and rank a users neighbors. For the current For You API endpoints we default it to k=1 i.e. only map the graph for first degree neighbors. But there is an option to configure it to upto 5.

The wider the graph (higher k value) the higher is the latency.

In Channel feeds, we create a graph by ranking all the users in that channel based on their interactions. These graphs are generated based on engagement, learn more about it . At the end of this step we have a ranked list of users with a score based on their incoming engagement in a channel.

Step 3: Filtering all casts

We now have two lists, first includes all the casts and the second includes the ranked network graph. Next, we iterate through each of the casts from the first list and apply a score to it. This score is a multiplier assigned to each cast based on the networks interaction with the cast.

Example on how this step works for For You Feed:

Lets say Michelle who is a second degree neighbor to You, and has a personalized ranking score of 0.5. And there is a cast that Michelle interacted with (liked + recasted) then we give the cast a score of (0.5*1)+(0.5*5) giving the cast a score of 3 and we also square this so it becomes 9.

Now if Adam who is also in your graph has also interacted with the same cast then it gets added to the score 9 on that cast that was generated by Michelle interaction. Hence giving the cast a better score and making it rank higher on the feed.

We us sumofsquares i.e. square the scores and add it to amplify good casts, but this too can be controlled by changing it to rootmeansquare or sum based on the developers choice of amplification.

There are two main things to note here on this step

  1. We remove casts that don't have any score applied to it, removing all casts the relevant network hasn't interacted with.

  2. All casts that aren't parent casts are also removed. (i.e. we remove all replies from this) Making the feed only be populated by Parent casts.

This was done based on the feedback we got from the community and can/should be configurable by developers.

What we get at the end of this step is a score assigned to each cast based on the relevant networks interest in that cast.

Step 4: Sorting and Time based filtering

Now that we have all the casts and corresponding scores attached to them we bucket the casts based on 1 hour time slots and in that bucket we sort them based on the score we generated in the previous step.

What this leaves you with is a list of casts that is first sorted based on recency and then sorted based on relevancy to provide your users with the best feed possible.

And this is how the feeds are generated.

here