diff --git a/Cargo.lock b/Cargo.lock index 00ee05e4a..09fa5a293 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7199,9 +7199,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -7622,9 +7622,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -7650,9 +7650,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", diff --git a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderRewards.tsx b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderRewards.tsx index 9da35ff87..ed5e1c1e7 100644 --- a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderRewards.tsx +++ b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/NodeProviderRewards.tsx @@ -7,6 +7,7 @@ import { WidgetNumber } from './Widgets'; import { boxStyleWidget } from '../Styles'; import { ExportTable } from './ExportTable'; import { GridColDef, GridRowsProp } from '@mui/x-data-grid'; +import { NodeProvidersRewardExplanation } from './RewardsInfo'; export interface NodeProviderRewardsChartProps { provider: string; @@ -66,6 +67,9 @@ export const NodeProviderRewardsChart: React.FC = + + + Computation Log diff --git a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/RewardsInfo.tsx b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/RewardsInfo.tsx index fbacb63e6..c2b622f47 100644 --- a/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/RewardsInfo.tsx +++ b/rs/dre-canisters/trustworthy-node-metrics/src/trustworthy-node-metrics-frontend/src/components/RewardsInfo.tsx @@ -13,7 +13,7 @@ const NodeRewardExplanation = () => { How are rewards computed? - + Node Unassigned: @@ -62,7 +62,7 @@ const NodeRewardExplanation = () => { - + {/* Linear Reduction Function */} @@ -89,24 +89,59 @@ const NodeRewardExplanation = () => { - The reward multiplier for the assigned period is computed by subtracting the rewards reduction from 100%. + The reward multiplier in percentage is then computed for the rewarding period, by subtracting the rewards reduction from 100%. - - - {/* Total Rewards Calculation Placeholder */} - - - Compute Reward Multiplier: - - - The final reward multiplier is then the weighted average between the multiplier for days in which the node is assigned to a subnet and 100% for the days in which the node is unassigned. - - - + + ); +}; + +export const NodeProvidersRewardExplanation = () => { + return ( + + {/* Title Section */} + + + How are rewards computed? + + + + + Nodes not registered: + + + Nodes which are not registered in the period get no rewards (0%). + + + + Nodes Assigned: + + + Reward for a single node assigned to a subnet is calculated as follows: + + + + + + Nodes Unassigned: + + + When unassigned to a subnet, the reward calculation for a single node follows these steps: + + + + + + + Final Node Provider rewards: + + + The final node provider rewards is computed as the sum of the rewards of the individual machines + + ); };