Skip to content

feat: top-K winner-takes-most merge prediction rewards#292

Open
bittoby wants to merge 2 commits intoentrius:testfrom
bittoby:feat/top-k-prediction-rewards
Open

feat: top-K winner-takes-most merge prediction rewards#292
bittoby wants to merge 2 commits intoentrius:testfrom
bittoby:feat/top-k-prediction-rewards

Conversation

@bittoby
Copy link
Contributor

@bittoby bittoby commented Mar 16, 2026

Summary

  • Replace proportional reward distribution across all positive-EMA miners with a top-3 winner-takes-most system (50%/35%/15% split of the 15% prediction emissions)
  • Add PREDICTIONS_TOP_K and PREDICTIONS_TOP_K_SHARES constants to configure the distribution
  • Ties broken by rounds (more settled issues = higher rank); unallocated shares when fewer than 3 eligible miners are not redistributed

Changes

  • gittensor/constants.py — added PREDICTIONS_TOP_K = 3 and PREDICTIONS_TOP_K_SHARES = [0.50, 0.35, 0.15]
  • gittensor/validator/forward.py — rewrote build_prediction_ema_rewards() to rank miners by (ema_score, rounds) descending and award only top-K with fixed shares
  • tests/validator/merge_predictions/test_merge_predictions.py — added 8 tests covering standard split, edge cases (fewer miners, ties, deregistered miners, empty EMA), and total reward cap
  • tests/validator/test_emission_shares.py — added guard-rail tests for top-K shares summing to 1.0 and length matching PREDICTIONS_TOP_K

Test plan

  • pytest tests/validator/test_emission_shares.py -v — constant guard-rails pass
  • pytest tests/validator/merge_predictions/test_merge_predictions.py -v — all 8 top-K reward distribution tests pass
  • Verify on testnet that only top-3 miners by EMA receive prediction rewards with correct share allocation

Closes #289

@bittoby
Copy link
Contributor Author

bittoby commented Mar 16, 2026

@anderdc Could you pls review this PR?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Merge Predictions Rewards

2 participants