Bytexplorers Mission #2: Creating Reputation Graphs with OpenRank
Compete to create the best graph datasets that will power feeds such as Optimism Governance Proposals, OnceUpon Recommended Mints, and Degen Tip Casts.
📹 Watch this OpenRank overview video (with hands-on code walkthrough)
Mission quests are partnerships with foundations across the crypto ecosystem to openly discuss and answer high-value research questions. In the last mission, we spent six weeks helping the Optimism NumbaNerds research all aspects of their 4th airdrop.
For mission #2, we’ll be creating reputation graphs that power feeds using OpenRank. The mission will run until August 18th, 2024.
Explorers can discuss their ideas and questions in the Openrank discord or mission central channel of our telegram. We’ll also host weekly office hours in the discord on Tuesday evenings (6pm EST) and Saturday afternoons (1pm EST).
Building with Graph Algorithms in Crypto
Learn about OpenRank and the eigentrust algorithm, and check out the example python notebook (with input graphs from dune queries)
Here’s an example using “hubs and authorities” in a slightly more advanced approach.
Openrank is a platform that computes different kinds of graph algorithms for you, given a set of input graphs. It specializes in peer to peer graphs, and are a perfect fit for crypto due to the nature of addresses in unifying identities and interactions onchain/offchain.
The eigentrust algorithm takes in an interaction graph and a set of trusted nodes inside that graph, and outputs a ranked score of all nodes. These two inputs are called “localtrust” and “pretrust” respectively:
localtrust: this is your measurement of interactions between two nodes, as node “i” signals some value to node “j”. This could be a token transfer, attestation, vote reply/like, etc.
pretrust: this is your "seed" selection of nodes who you think should be more trusted in the network.
In most interaction graphs, the action “value” is exponentially distributed. Think of voting power, transfer USD values, cast likes/recasts. To normalize trust across the graph, nodes that are close to the “pretrust” seed set will inherit half their trust value from the seeds.
These inputs go into an eigentrust model, which gives us a ranked value of all connected nodes. You can then weight the activity of those nodes to curate a feed, such as weighting interactions with contracts in the last seven days to create a “trending contracts” feed:
The easiest way to create these two inputs is by using Dune (if you’re using onchain data). In my example notebook that generated the feed above, I created a transfer token graph of all casters in the /base channel on farcaster for my localtrust graph, and then created a pretrust seed by ranking all casters by engagement on their casts.
There is a lot of creativity and flexibility in curating these two inputs, which we will aim to explore in the competition.
Competing to Create the Best Graph Inputs
Knowing python is not strictly necessary, you could give us your input graphs and we’ll help run the eigentrust algorithm for you (and upload the results back into Dune so you can test against feed queries).
Below are our three feeds that we want to power with openrank. We’ve listed a few ideas for generating pretrust and localtrust graphs that you can start building from. These are just suggestions, you can be as creative as you would like.
(submission) Optimism Token House: Recommend governance proposals using Agora feeds.
Pretrust Ideas: Top delegated to (OP only or many tokens), most active voters, top token holders, active token house or grant members in forums.
Localtrust Ideas: Delegate to, voted on proposal creator. Check out submissions to mission #1 to see example of delegation data. You can also use github repo data, put together by Open Source Observer.
Feed Query: Use the governance_optimism.agora_proposals table in Dune.
(submission) Trending Mints: Recommend top NFT mints by chain.
Pretrust Ideas: Top NFT traders, top minters, age of wallet, top creators of NFTs, first minters
Localtrust Ideas: You could use nft transfers, token transfers, interactions on zora, interactions on farcaster
Feed Query: Use the nft.transfers table in Dune (example query). See Zora mints example here too.
(submission) Degen Cast Tipping: Recommend top users and casts to tip.
Pretrust Ideas: Top DEGEN holders, top tippers, top tipped, number of unique tipper (or tipped) accounts, most influence on farcaster, power badge users. Some example user rankings in this dashboard.
Localtrust Ideas: tipping interactions, reply/recast/like interactions (filter for quality of engagement). Reference queries in this dashboard for DEGEN data.
Feed Query: Use the dune.neynar.dataset_farcaster_casts table to show the feed of recommended casts (group by fid if you want to recommend users).
Remember that the point of these graph generated feeds is to such that we can curate different types of feeds that fulfill different purposes. Creating a Zora focused feed based on first-minters seed will give us different recommendations than a generic NFT minting feed using a farcaster frame minter seed or a top NFT trader seed.
Think about the end feed you want to generate before you tackle the mission. You’ll likely also want to scope down on your feed at the start, for example I started with just /base casters in my example so that I only needed to compute 50k addresses of graph data.
There are four steps to create your own feed:
Create your localtrust and pretrust queries
Input your queries into the eigentrust algorithm using the sdk
Fetch your eigentrust results and plug it into a feed query, using the score for some weighted ranking of objects.
Again, you should reference the example python notebook to see these steps in depth. These are reference links you should be aware of:
Mission Participation, Rewards, and Guidelines
We’ve made the process and rewards simpler than the last mission.
Feed Races: We’ll be using jokerace, there will be one race to submit into per feed.
Submissions: Explorers will get a maximum of two submissions per feed race. Only one reward can be won per race. Your submission should be in the form of a jupyter notebook (github, google colab, hex, etc), and should include your input datasets, output graph, and an output feed example.
Rewards: For each feed category, the top submission by votes will earn $300 USDC. Second will get $200 USDC, and third will get $100 USDC.
Voting: Only the OpenRank team members will get votes, they each get 5000 votes per race. Criteria for voting are expanded on below.
You will need a Bytexplorer pass to earn rewards, you can still submit your work without a pass though. Work must be submitted by August 18th 2024.
Winning Criteria:
Novelty of localtrust and pretrust queries: There are lots of combinations of onchain and offchain interactions between addresses. We’re looking for the most creative ways you can combine these into an interaction graph.
Size/coverage of the output graph: It’s important to have well connected graphs, so that our feed is not missing large portions of activity. For example, if there are 10,000 casters in a farcaster channel then having at least 3,000 scores in the output of eigentrust will be ideal.
Subjective quality of the feed results: Different graph inputs will give us different kinds of feeds. You should provide rationale on why this feed is useful and different than just a simple ranked feed based on value/count.
Well explained rationale: Clearly written logic explaining your choice of graph inputs, ranking method in the feed, and use case(s) for the feed. This is the most important part of your submission.
Explorers can discuss their ideas and questions in the Openrank discord or mission central channel of our telegram. We’ll also host weekly office hours in the discord on Tuesday evenings (6pm EST) and Saturday afternoons (1pm EST).