Skip to main content

Nomination Pools

GraphQL Endpoint

https://platform.beta.enjin.io/graphql

Nomination pools live on the Relaychain — pass chain: RELAY on every query in this section. They let many small ENJ holders pool their stake under a single nominator, sharing rewards proportionally. To bond into a pool or unbond, see Nomination Pool Mutations.

GetNominationPool

Returns a single nomination pool by id.

query GetNominationPool {
GetNominationPool(network: ENJIN, chain: RELAY, id: 1) {
id
name
state
capacity
balance {
stash
reward
active
}
commission
apy
totalMembers
members {
publicKey
bonded
unrealisedEnj
}
}
}

Field notes:

  • state is one of OPEN, BLOCKED, DESTROYING, DESTROYED. You can only bond into OPEN pools.
  • capacity is the maximum bondable amount, in the smallest ENJ unit.
  • balance.stash / .active / .reward describe the pool's on-chain state — active is the currently-staked portion that earns rewards.
  • commission is a fraction in the range 0..1 (e.g. 0.05 means the pool operator takes 5%).
  • apy is a percentage (e.g. 22.6 means ~22.6% annualised).
  • members[].unrealisedEnj is the member's pending reward not yet claimed.

GetNominationPools

Returns a paginated list of pools. Pagination is offset-based (limit + page).

query GetNominationPools {
GetNominationPools(network: ENJIN, chain: RELAY, limit: 15, page: 1) {
id
name
state
commission
apy
totalMembers
balance {
active
}
}
}

GetAccountPools

Returns every pool a given address is a member of, with that account's per-pool bonded amount and unrealised rewards.

query GetAccountPools {
GetAccountPools(
network: ENJIN
chain: RELAY
address: "efStakerAddress"
) {
id
name
state
bonded
unrealisedEnj
totalUnbonding
apy
}
}

totalUnbonding is the amount the account has requested to unbond but hasn't yet withdrawn (Substrate nomination pools have an unbonding period before unbonded ENJ becomes spendable).