livepeer / explorer

https://explorer.livepeer.org
9 stars 11 forks source link

Consolidate Data Sources for Accurate Display of 'Lifetime Rewards' in RCP Stake Movement #256

Open rickstaa opened 9 months ago

rickstaa commented 9 months ago

Issue Observed

In the Livepeer Explorer, when stakeholders move their stake, the bondingManager's pendingStake (see this YouTube video), there's an inconsistency in the display of "Lifetime Rewards." This inconsistency arises due to the current method of data retrieval: the principal stake information is fetched using the subgraph, while the pending stake and unbonded information are sourced from the RCP. Since these data sources update at different intervals, the "Lifetime Rewards" display becomes temporarily inaccurate. This discrepancy resolves itself once the RCP cache expires, but it can confuse the interim.

Proposed Solution

To address this, I propose integrating the pendingStake data into the subgraph. This change would allow us to use a singular data source for calculating the "Lifetime Rewards," ensuring consistent and accurate information display. Implementing this feature should eliminate the temporary discrepancies caused by the different update rates of the current data sources.

I've initiated a feature request for this improvement on our GitHub repository, which can be tracked here.

@adamsoffer and @0xcadams, although this is a low-priority issue, I'd appreciate your input on this proposal. Would this effectively resolve the issue and improve the accuracy of our data display?