diff --git a/client/src/components/Metrics/MetricsEpoch/MetricsEpochGridFundsUsage/MetricsEpochGridFundsUsage.tsx b/client/src/components/Metrics/MetricsEpoch/MetricsEpochGridFundsUsage/MetricsEpochGridFundsUsage.tsx index 24a4a17254..8bbb7b1ebe 100644 --- a/client/src/components/Metrics/MetricsEpoch/MetricsEpochGridFundsUsage/MetricsEpochGridFundsUsage.tsx +++ b/client/src/components/Metrics/MetricsEpoch/MetricsEpochGridFundsUsage/MetricsEpochGridFundsUsage.tsx @@ -35,7 +35,13 @@ const MetricsEpochGridFundsUsage: FC = ({ const projectCosts = epochInfo ? epochInfo.operationalCost : BigInt(0); const staking = epochInfo ? epochInfo.staking : BigInt(0); - const ppf = epochInfo ? epochInfo.ppf : BigInt(0); + // const ppf = epochInfo ? epochInfo.ppf : BigInt(0); + /** + * WORKAROUND + * Temporary ppf forced by backend changes. Correct formula above! + * TODO OCT-1567: https://linear.app/golemfoundation/issue/OCT-1567/restore-correct-ppf-formula-in-client + */ + const ppf = epoch === 3 && epochInfo ? epochInfo.ppf - epochInfo.individualRewards : BigInt(0); const communityFund = epochInfo ? epochInfo.communityFund : BigInt(0); const donatedToProjects = epochInfo @@ -48,7 +54,17 @@ const MetricsEpochGridFundsUsage: FC = ({ if (!epochInfo) { return BigInt(0); } + /** + * epochInfo.ppf includes epochInfo.individualRewards. + * Half of PPF goes to the users to manage. + * Half of PPR goes to "PPF" section. + */ if (epoch === 3) { + /** + * WORKAROUND + * Temporary ppf forced by backend changes. Correct formula above! + * TODO OCT-1567: https://linear.app/golemfoundation/issue/OCT-1567/restore-correct-ppf-formula-in-client + */ return ( ppf / 2n + epochInfo.individualRewards - totalUserDonationsWithPatronRewards - unusedRewards );