Rewards
Reward rate of the pool
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:
26478817328005117Convert to %
26478817328005117 / 10^18 =.02647 (2.647%)
Using The Graph
Query
{
erc20(id:"INTEGRATION_CONTRACT_ADDRESS") {
address
summaries {
allTime {
period
entryCount
totalGrossRewards
totalNetRewards
grossRewardRate
netRewardRate
}
sixMonths {
period
entryCount
totalGrossRewards
totalNetRewards
grossRewardRate
netRewardRate
}
threeMonths {
period
entryCount
totalGrossRewards
totalNetRewards
grossRewardRate
netRewardRate
}
oneMonth {
period
entryCount
totalGrossRewards
totalNetRewards
grossRewardRate
netRewardRate
}
oneWeek {
period
entryCount
totalGrossRewards
totalNetRewards
grossRewardRate
netRewardRate
}
}
}
}Example results
Rewards for a given user
TIP: the result is in wei, you need to convert it to ETH. For example:
allTimeRewards =
46478817328005117Convert to ETH
46478817328005117 / 10^18 = 0.046478817ETH
allTimeRewards = ((sharesBalance * totalUnderlyingSupply) / totalSupply) - adjustedTotalDeposited
Using The Graph
Query
Example results
Last updated
Was this helpful?

