Learn how to fetch Farcaster Moxie Rewards earned by Farcaster users, channels, and the Farcaster network. In addition, learn how to sort by the earnings to get the top earners of Moxie.
The Moxie Protocol allows Farcaster Members to earn Everyday Rewards based on interactions with their casts. Developers also receive rewards for each unique FID that engages with their frames.
Rewards are distributed in MOXIE tokens based on the FarScore of the person engaging, with the following rates:
As of October 21, 2024, every Farcaster user has a daily smart allowance of MOXIE, which is determined by their engagement from the previous week. These allowances reset every Monday at 11 AM ET and will be communicated to the Farcaster users each Monday at the same time.
Additionally, each week a new set of Moxie Heroes is introduced, chosen based on diversity and quality of engagement. Heroes can either keep their superpowers or transfer them to another user. This week, Moxie Heroes receive a variable boost to their FarScore multiplying the MOXIE they distribute through each interaction during the week. Additional superpowers will be revealed in the upcoming weeks.
Learn more about Moxie Everyday Rewards, Daily Smart Allowances, and Moxie Heroes in the official Moxie whitepaper here.
Get The Split Details Of Moxie Earned By Certain User
You can use the FarcasterMoxieEarningStats to fetch the split details of the total Moxie earned by a certain user entity on Moxie protocol that shows how much is distributed to the caster, the caster's fans, channel fans, and the Farcaster network token holders.
To get the split details, simply provide the FID of the user in entityId:
{"data": {"FarcasterMoxieEarningStats": {"FarcasterMoxieEarningStat": [ {"splitDetails": [ {"castEarningsAmount":2420.289836734585,"frameDevEarningsAmount":0,"otherEarningsAmount":0,// Earnings split for the caster's fans"entityType":"CREATOR_FANS" }, {"castEarningsAmount":1080.3288640185472,"frameDevEarningsAmount":0,"otherEarningsAmount":0,// Earnings split for channel fans"entityType":"CHANNEL_FANS" }, {"castEarningsAmount":7390.685564552501,"frameDevEarningsAmount":0,"otherEarningsAmount":0,// Earnings split for the caster him/herself"entityType":"CREATOR" }, {"castEarningsAmount":1210.1449183672926,"frameDevEarningsAmount":0,"otherEarningsAmount":0,// Earnings split for the Farcaster network token holder"entityType":"NETWORK" } ] } ] } }}
Top Moxie Earning Entities Based On Highest Moxie Earnings
You can fetch the top entities w/ highest Moxie earnings by specifying order.allEarnings to DESC:
Try Demo
Code
queryMyQuery { FarcasterMoxieEarningStats( input: {timeframe: LIFETIME,blockchain: ALL,filter: {entityType: {_eq: USER} # alternatively can be CHANNEL }, # Order by All earning for sorting by total earnings in # descending orderorder: {allEarnings: DESC} } ) { FarcasterMoxieEarningStat { allEarningsAmount allEarningsAmountInWei castEarningsAmount castEarningsAmountInWei entityId entityType frameDevEarningsAmount frameDevEarningsAmountInWei otherEarningsAmount otherEarningsAmountInWei timeframe } }}
{"data": {"FarcasterMoxieEarningStats": {"FarcasterMoxieEarningStat": [ {"allEarningsAmount":10136643.391825985,"allEarningsAmountInWei":"10136643391825986000000000","castEarningsAmount":51821.7356651616,"castEarningsAmountInWei":"51821735665161600000000","entityId":"336022","entityType":"USER","frameDevEarningsAmount":0,"frameDevEarningsAmountInWei":"0","otherEarningsAmount":10084821.656160824,"otherEarningsAmountInWei":"10084821656160823000000000","timeframe":"LIFETIME" },// Other top Farcaster user with most Moxie earned ] } }}
Developer Support
If you have any questions or need help regarding fetching Moxie earnings data, please join our Airstack's Telegram group.