Repository navigation
feat: add /provider-rewards endpoint - #29
Merged
Merged
Conversation
New /provider-rewards endpoint combines adjusted rewards from indexed relay data with LAVA/USD price (current or historical via CoinGecko) to return per-provider reward distributions with shares and USD values. Replaces gen_provider_rewards.py + lava-ops Job 2 orchestration. Removes superseded /adjusted-rewards, /lava/price, and historical ?timestamp= support from /supply/total. CoinGecko price gracefully degrades to null on failure.
nimrod-teich
force-pushed
the
feat/provider-rewards
branch
from
April 16, 2026 11:08
6bf2f29 to
56af600
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /provider-rewards?from=YYYY-MM-DD&to=YYYY-MM-DDendpoint that combines adjusted rewards + LAVA/USD price into a single response with per-provider reward shares and USD values. Replacesgen_provider_rewards.pyand the lava-ops Job 2 orchestration./adjusted-rewardsresponse — removed QoS breakdown fields (avgLatency,avgAvailability,avgSync,avgLatencyExc,avgAvailabilityExc,avgSyncExc,qosCus). Onlyrelays,cus, andadjustedRewardsremain.Response shape:
{ "meta": { "from", "to", "lavaUsdPrice", "totalAdjustedRewards" }, "data": [ { "provider", "moniker", "relays", "cus", "adjustedRewards", "rewardShare", "estimatedRewardsUsd" }, ... ] }Test plan
curl /provider-rewards?from=2025-03-17&to=2025-04-17