Attribute Solana epoch rewards to stake and vote accounts

A balance change can combine a reward with deposits or withdrawals. Query the credited reward directly when preparing an epoch statement.

Specify the epoch and reward recipients

Replace the addresses with the stake account and vote account under review. Replace 500 with the completed epoch. An authority wallet that controls a stake account can have a different address from the account receiving the reward.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationReward",
  "params": [
    [
      "STAKE_ACCOUNT",
      "VOTE_ACCOUNT"
    ],
    {
      "epoch": 500,
      "commitment": "finalized"
    }
  ]
}

Reconcile the credit at its effective slot

Match each result to the input address by position. For an amount of 32000 and a postBalance of 100032000 lamports, the balance immediately before the credit was 100000000 lamports. Store the returned epoch and effectiveSlot with the credit so later balance changes cannot obscure it.

A null entry means the endpoint returned no reward data for that address and epoch. Keep it distinct from a recorded zero and check coverage and account role before closing the statement.

Documentation