threshold-network / staking-subgraphs

Threshold Network staking subgraphs
https://threshold.network
1 stars 1 forks source link

Fix operator bonded and confirmed timestamps #30

Closed manumonti closed 1 year ago

manumonti commented 1 year ago

Up to now, the field bondedTimestamp and confirmedTimestamp on SimplePREApplication subgraph entity contains the timestamps of the last event received. This can be a problem if a staker changes its operator since this timestamp will be taken for rewards calculation, so the time in which the previous operator was running will not be taken into account.

The fix consists of not overwriting these timestamps when a new bonded operator or confirmed operator event is received.