Reward Options
This page showcases the JSON representation of the "Reward Option" object and a class diagram, providing a clear visual representation of its structure.
A Reward Option
refers to the mechanism by which validators or stakers receive compensation for their participation in the consensus process.
There are multiple ways to participate in the PoS process and receive rewards, including delegating
or running a validator
.
Delegating allows to indirectly participate in the network by transferring their stake to a third-party validator.
Running a validator, on the other hand, involves setting up and maintaining the necessary infrastructure to validate transactions and participate in the consensus process directly.
You can query the different properties, including the connected inputAssets
(assets that are being used as input), outputAssets
(the asset that is being paid as a reward), connected Validators
using the Reward Option and metrics like the lockupPeriod
and more.
The information presented will help you understand the contents of the Reward Option
object.
- Class Diagram
- JSON
{
"RewardOption": {
"id": "ID!",
"inputAssets": {
"where": "AssetsWhere",
"order": "AssetsOrder",
"limit": "Int",
"offset": "Int",
"items": "[Asset!]"
},
"outputAssets": {
"where": "AssetsWhere",
"order": "AssetsOrder",
"limit": "Int",
"offset": "Int",
"items": "[Asset!]"
},
"validators": {
"where": "ValidatorsWhere",
"order": "ValidatorsOrder",
"limit": "Int",
"offset": "Int",
"items": "[Validator!]"
},
"providers": {
"where": "ProvidersWhere",
"order": "ProvidersOrder",
"limit": "Int",
"offset": "Int",
"items": "[Provider!]"
},
"metrics": {
"where": "MetricsWhere",
"order": "MetricsOrder",
"limit": "Int",
"offset": "Int",
"items": "[Metric!]"
},
"type": "ListItem",
"chain": "ListItem",
"isActive": "Boolean",
"rewardFormula": "String"
}
}
Sample query:
This query will return the first 10 Reward Options
that are of type solo-staking
or pos
and have ETH
as an input asset.
It will also return the first 10 metrics for each of the Reward Options
:
{
rewardOptions(
where: {
inputAsset: { symbols: ["ETH"] }
typeKeys: ["solo-staking", "pos"]
}
limit: 10
) {
metrics(limit: 10) {
metricKey
defaultValue
changePercentages
createdAt
}
}
}
You can also query rewardOptions with search
parameter like this:
{
rewardOptions(limit: 10,
where:{
providers: {search: "rund"}
}) {
id
providers(limit: 10) {
name
}
}
}