Skip to content

Commit

Permalink
Merge pull request #993 from gobitfly/BEDS-659/fix_apr_value_scaling
Browse files Browse the repository at this point in the history
fix(dashboard): correctly scale EL APR values
  • Loading branch information
peterbitfly authored Oct 20, 2024
2 parents 6a354cc + 5524351 commit f13029c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/pkg/api/data_access/vdb_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,8 @@ func (d *DataAccessService) internal_getElClAPR(ctx context.Context, dashboardId
if err != nil {
return decimal.Zero, 0, decimal.Zero, 0, err
}
elIncomeFloat, _ := elIncome.Float64()
elAPR = ((elIncomeFloat / float64(aprDivisor)) / (float64(32e18) * float64(rewardsResultTable.ValidatorCount))) * 24.0 * 365.0 * 100.0
elIncomeFloat, _ := elIncome.Float64() // EL income is in ETH
elAPR = ((elIncomeFloat / float64(aprDivisor)) / (float64(32) * float64(rewardsResultTable.ValidatorCount))) * 24.0 * 365.0 * 100.0
if math.IsNaN(elAPR) {
elAPR = 0
}
Expand Down

0 comments on commit f13029c

Please sign in to comment.