Search code examples
nearprotocol

How the validator rewards get persisted on NEAR protocol?


I am trying to get an understanding of validator rewards. I haven't seen any transactions related to rewards get issued, and I don't understand how the reward is persisted otherwise (it seems to be fine to keep that info in memory during the epoch, but it is unclear what happens beyond that point).

How does one track the rewards? Is changes API expected to expose the "intermediate" rewards?


Solution

  • Rewards are added to validator accounts automatically at the beginning of an epoch. The corresponding state change is a ValidatorAccountUpdate.