đFarScores & FarBoosts
Learn how to fetch the FarScores, FarBoosts, FarRank of a Farcaster member. In addition, you can also fetch a user's TVL and how much it impacts a member's FarBoosts.
Every Farcaster Member earns a FarScore based on their relative influence in the Farcaster network and each FarScore user can be increased by earning FarBoosts, which consequently can also increase a Farcaster Member's FarRank.
As of 3 October, 2024, FarScores do not factor in follows from users who have not been active on Farcaster in the previous 60 days, on a rolling basis.
Every 1 point on FarBoosts is earned by contributing 100,000 Moxie into your total locked value (TVL) into the Moxie protocol or providing 100,000 Moxie into the Liquidity Pool (Uniswap v2 & Aerodrome).
Additionally, you can also earn 1.2 point on FarBoosts by for every 100,000 Moxie worth of Fan Token is locked into the Moxie Staking contract for at least 3 months.
To learn more about FarScores & FarBoosts, click here.
Table Of Contents
Get The FarBoost Of A User Gained From TVL (TVL Boost)
Get The FarBoost Of A User Gained From Providing Liquidity to DEXs (Liquidity Boost)
Pre-requisites
An Airstack API key. To access this, you'll need to hold at least 1 /airstack Channel Fan Token.
Basic knowledge of GraphQL
Get Started
JavaScript/TypeScript/Python
If you are using JavaScript/TypeScript or Python, Install the Airstack SDK:
React
Node
Then, add the following snippets to your code:
Other Programming Languages
To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
Get The FarScores Of A User
You can get the FarScores of a user by using the Socials
API and inputting the user's FID in userId
input:
Try Demo
Code
Get The FarScores Of A User Without Any FarBoosts
You can get the original FarScores of a user without any FarBoosts by using the Socials
API and inputting the user's FID in userId
input to fetch the organicFarScore
field:
Try Demo
Code
Get The Percentage Of Increase Of User's FarScore From FarBoosts
You can get the percentage of increase from FarBoosts by using the Socials
API and inputting the user's FID in userId
input to fetch the farScore
and organicScore
field:
Try Demo
Code
To get the percentage of increase, simply divide farBoost
by farScore
and multiply it by 100%.
Get The FarRank Of A User
You can get the FarRank of a user by using the Socials
API and inputting the user's FID in userId
input:
Try Demo
Code
Get The FarBoost Of A User
You can get the FarBoost of a user by using the Socials
API and inputting the user's FID in userId
input to get all the boost variables:
Try Demo
Code
By adding up the LP boost, TVL boost, and power boost, you'll get the total Farboost of a user.
Get The FarBoost Of A User Gained From Providing Liquidity to DEXs (Also referred to as LP Boost)
You can get the Liquidity Boost, that is the FarBoost of a user gained from providing liquidity to DEXs, by using the Socials
API and inputting the user's FID in userId
input:
Try Demo
Code
Get The FarBoost Of A User Gained Only From TVL
You can get the TVL Boost, that is the FarBoost of a user gained only from TVL, by using the Socials
API and inputting the user's FID in userId
input:
Try Demo
Code
Get The FarBoost Of A User Gained From Locking Fan Tokens (Moxie Power Boost)
You can get the Moxie Power Boost by using the Socials
API and inputting the user's FID in userId
input:
Try Demo
Code
Get The Moxie Hero Multiplier Of A User
You can get the Moxie Hero Multiplier by using the Socials
API and inputting the user's FID in userId
input and first getting the Moxie Hero Boost:
Try Demo
Code
Once you get the Moxie Hero boost of the user, you can use the formula here to get the multiplier.
Get The TVL Of A User
You can get the TVL of a user in the Moxie protocol by using the Socials
API and inputting the user's FID in userId
input:
Try Demo
Code
The value returned in tvl
will be in wei. Therefore, you should divide the number by 10^18 to get the real value.
Get Top Farcaster Users Sorted By Their Total FarScores
You can get the top Farcaster users sorted by their total Farscores by using the FarScores
API and configure the API to sort by farScore
in descending order:
Try Demo
Code
Get Top Farcaster Users Sorted By Their Organic FarScores
You can get the top Farcaster users sorted by their organic Farscores by using the FarScores
API and configure the API to sort by organicScore
in descending order:
Try Demo
Code
Get Top Farcaster Users Sorted By Their TVL Boost
You can get the top Farcaster users sorted by their TVL boost by using the FarScores
API and configure the API to sort by tvlBoost
in descending order:
Try Demo
Code
Get Top Farcaster Users Sorted By Their Liquidity Boost
You can get the top Farcaster users sorted by their Liquidity Boost by using the FarScores
API and configure the API to sort by lpBoost
in descending order:
Try Demo
Code
Get Top Farcaster Users Sorted By Their Power Boost
You can get the top Farcaster users sorted by their Power Boost by using the FarScores
API and configure the API to sort by powerBoost
in descending order:
Try Demo
Code
Get All The Current Moxie Heroes
You can get the Farcaster users that are currently Moxie Heroes by using the FarScores
API and configure the API by setting the heroBoost
filter to greater than 0 to only fetch those with Hero boost:
Try Demo
Code
Developer Support
If you have any questions or need help regarding fetching FarScore & FarBoosts data, please join our Airstack's Telegram group.
More Resources
Last updated
Was this helpful?