Skip to content

fix(miners): use API successMultiplier in score composite footer#116

Open
Yurii214 wants to merge 1 commit into
entrius:testfrom
Yurii214:fix/score-factors-success-multiplier
Open

fix(miners): use API successMultiplier in score composite footer#116
Yurii214 wants to merge 1 commit into
entrius:testfrom
Yurii214:fix/score-factors-success-multiplier

Conversation

@Yurii214

@Yurii214 Yurii214 commented Jun 9, 2026

Copy link
Copy Markdown

Summary

  • Use the API-provided successMultiplier when composing the miner score-factors footer total instead of recomputing (successRate30d × credibilityRamp)³ client-side.
  • Align the footer formula label with what is actually multiplied (success = successMultiplier from /score-factors).

Problem

ScoreFactorsStrip footer ("share of pool captured this round") multiplied crown, capacity, and volume factors against a client-derived (successRate30d × credibilityRamp)³ term.

The /miners/:hotkey/score-factors response already includes successMultiplier (the canonical success term computed server-side), but the UI never used it. This left the footer value vulnerable to drift from backend scoring logic and contradicted the stale inline formula note.

Changes

  • src/components/miners/ScoreFactorsStrip.tsx
    • composeMultiplier: sf.successMultiplier replaces (sf.successRate30d * sf.credibilityRamp) ** 3
    • Footer annotation updated to = crown × cap × vol × success

Why this is safe

  • Uses an existing typed field already returned by the same endpoint.
  • Keeps all card-level displays unchanged (Success rate and Credibility cards still render their own fields as before).
  • Narrows client logic and avoids duplicating backend scoring math.

Test plan

  • npm run lint
  • npm run build
  • Manual sanity check on /miners/:hotkey: footer value tracks crownShareWindow × capacityFactor × volumeFactor × successMultiplier (rounded display)

Made with Cursor

Stop recomputing (successRate30d × credibilityRamp)³ client-side; the
score-factors endpoint already returns the canonical successMultiplier.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jun 9, 2026
@Yurii214

Yurii214 commented Jun 9, 2026

Copy link
Copy Markdown
Author

Why this is safe

  • Single-field swap: composeMultiplier now uses successMultiplier from the same /score-factors payload that already feeds the five factor cards — no new API surface or client-side scoring logic.
  • Scoped change: One file, footer composite only. Success rate and Credibility cards still render successRate30d / credibilityRamp unchanged.
  • Fixes known drift: The removed client formula (successRate30d × credibilityRamp)³ contradicted the stale TODO and could disagree with server scoring (e.g. credibility timeout zeroing from feat(miners): show credibility auto-zeroed on excess timeouts #111).
  • Build verified: npm run lint and npm run build pass on this branch.

@anderdc @LandynDev — ready for review when you have a moment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants