Skip to content

[Bug] Mining Calculator uses hardcoded average multiplier (1.5x) causing ~8-10% underreporting of earnings #7728

Description

@IcanBENCHurCAT

Component

Other (Mining Earnings Calculator)

What happened?

The mining calculator at mining-calculator/index.html uses a hardcoded average multiplier of 1.5x to estimate network weight in two critical code paths:

  1. Preset miner count mode (line ~579): const avgMultiplier = 1.5; // Conservative average
  2. Sensitivity table (line ~627): const avgMultiplier = 1.5;

The actual average multiplier of DEFAULT_NETWORK is 1.3625x (total weight 10.9 / 8 miners).

DEFAULT_NETWORK composition:

Hardware Multiplier Count Weight
POWER8 2.0x 1 2.0
G3 1.8x 1 1.8
Pentium 4 1.5x 1 1.5
Core 2 Duo 1.3x 1 1.3
Apple Silicon 1.15x 2 2.3
Modern x86 1.0x 2 2.0
Total 8 10.9

Actual average: 10.9 / 8 = 1.3625x

Expected behavior

The calculator should use the actual average multiplier from DEFAULT_NETWORK (1.3625x) or compute it dynamically, so the displayed earnings match the actual calculated earnings.

Steps to reproduce

  1. Navigate to mining-calculator/index.html in browser
  2. Select hardware: 2.5x (POWER8)
  3. Select network mode: "Preset miner count" → 50
  4. Observe daily earnings shown
  5. Compare with actual calculation:
    • Actual: 2.5 / (50 * 1.3625 + 2.5) * 1.5 * 144 = 7.65 RTC/day
    • Displayed: 2.5 / (50 * 1.5 + 2.5) * 1.5 * 144 = 6.97 RTC/day
    • Underreported by 8.9%

Severity

Medium — 10 RTC (Incorrect calculation — earnings consistently 8-10% lower than reality)

Fix

Replace const avgMultiplier = 1.5 with computed actual average:

const avgMultiplier = DEFAULT_NETWORK.reduce((sum, item) => sum + item.multiplier * item.count, 0) / DEFAULT_NETWORK.reduce((sum, item) => sum + item.count, 0); // = 1.3625

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions