The Graph Protocol. How to calculate your rewards for delegation?

What you should know when delegate your GRT:

  • You pay a one-time fee equal 0,5% of all your stake for delegating and these tokens are burnt.
  • When delegating you get shares of Indexer’s pool. Quantity of shares received is determined by Delegation Exchange Rate, which is the ratio of the sum of total delegations and rewards to total delegations.
  • Delegator can withdraw its shares from the pool by call Undelegate method any time, but all undelegated assets will be locked for 28 days. This period is equal to the max lifetime of allocation, because the delegator’s withdrawal decision must not have an impact on the indexing process.

How to calculate the amount you can withdraw from the pool:

{
delegator (id: “Your Delegator Address (Lock Contract Address) only in lower case”) {
id
stakes {
personalExchangeRate
shareAmount
indexer {
id
delegationExchangeRate
delegatorShares
delegatedTokens
delegatorParameterCooldown
lastDelegationParameterUpdate
}
}
}
}

NB! Indexer can change its fee on delegator’s rewards (fee/rewards cut)!

  • the query pointed above using the parameters delegatorParameterCooldown and lastDelegationParameterUpdate (both are measured in block quantity)
  • on the network.thegraph.com: remaining Cooldown is indicated in the delegation menu.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store