Historical Rewards

In StakeKit, we manage and validate historical rewards, specifically the collected amount of a certain token from exposure to a yield opportunity. This process is applied to integrations where we understand it makes sense and adds value.

Realized vs. Unrealized Rewards

To clearly differentiate between types of rewards, we separate them into two categories: Realized Rewards and Unrealized Rewards.

  • Realized Rewards: These are rewards that have already been delivered to the relevant address. They have been distributed or claimed on-chain and are reflected in the address’s available balance or as a staked balance if reinvested through a pool distribution event. Since they are no longer tied to open positions, realized rewards generally do not appear in yield balances unless they have been reinvested. For auto-compounding yields, this process occurs automatically, with realized rewards being recorded as historical rewards and effectively contributing to the staked position within the yield balances.
  • Unrealized Rewards: These represent rewards that have yet to be claimed or distributed. Unrealized rewards are still linked to open positions and therefore show up in yield balances. They will only be included in the historical rewards once they have been claimed and processed.

Data Collection

StakeKit supports a variety of integrations across different blockchains. Even within the same blockchain, protocols can have vastly different workflows, and the way rewards are processed and collected may differ.

To handle this complexity, we employ specialized data collection mechanisms tailored to each integration. This data collection may involve a combination of the following mechanisms (but not restricted to):

  • Blockchain indexers (or multiple)
  • Requests to external providers
  • Calculations based on the protocol's interaction and specifications

Given that some data collection processes depend on external sources or require time to consume, small delays are expected in certain scenarios.

Requesting Historical Rewards

For each supported integration, there is a specific endpoint that provides historical reward data, which is split into the following categories:

  • Last 24 hours (last24H): The total amount of rewards collected in the past 24 hours, formatted in the token's amount.
  • Last 7 days (last7D): The total amount of rewards collected in the last 7 days, formatted in the token's amount.
  • Last 30 days (last30D): The total amount of rewards collected in the past 30 days, formatted in the token's amount.
  • Last year (lastYear): The total amount of rewards collected in the past 365 days, formatted in the token's amount.
  • Total (total): The all-time total amount of rewards collected, for which we have data.

Endpoint to request this will be (see Api Reference for more details)

curl --request POST \
  --url https://api.stakek.it/v1/yields/tron-trx-native-staking/rewards-summary \
  --header 'Content-Type: application/json' \
  --header 'authorization: Bearer INSERT_YOUR_TOKEN' \
  --data '{
  "addresses": {
		"address": "TCNi7GMbimJEDiZUKYnXTAuvc7vd1NMSXf"
	}
}'

This will return the following response:

{
	"rewards": {
		"total": "30.097723",
		"last24H": "20.097723",
		"last7D": "0.097723",
		"last30D": "10.097723",
		"lastYear": "0.097723"
	},
	"token": {
		"name": "Tron",
		"symbol": "TRX",
		"network": "tron",
		"decimals": 6,
		"coinGeckoId": "tron",
		"logoURI": "https://assets.stakek.it/tokens/trx.svg"
	}
}