Used to retrieve the historical reward rate of the pool so that it can be displayed to your users in your native workflow.
The pool reward rate can only ever be based on a rolling historical average (we can never predict the future rate). The data returned includes the average of the last week, last month, last 3 months, last 6 months and 'all time'.
It is up to you to choose the which historical rolling average to use, but most partners currently use the last week.
TIP: you need to convert the results to a percentage (%). For example:
'All Time' Gross Reward Rate returns: 26478817328005117
Convert to %
26478817328005117 / 10^18 =
.02647 (2.647%)
Using The Graph
Query
Example results
Used to retrieve the rewards of the given user based on their staked position
TIP: the result is in wei, you need to convert it to ETH. For example:
allTimeRewards = 46478817328005117
Convert to ETH
46478817328005117 / 10^18 = 0.046478817
ETH
allTimeRewards
= ((sharesBalance * totalUnderlyingSupply) / totalSupply) - adjustedTotalDeposited
Using The Graph
Query
Example results