feat: replace uniqueness multiplier with binary pioneer reward mechanism#248
Open
eureka928 wants to merge 8 commits intoentrius:testfrom
Open
feat: replace uniqueness multiplier with binary pioneer reward mechanism#248eureka928 wants to merge 8 commits intoentrius:testfrom
eureka928 wants to merge 8 commits intoentrius:testfrom
Conversation
Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
…ntrius#238) Co-authored-by: bittoby <bittoby@users.noreply.github.com> Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
0e67136 to
7bf1901
Compare
ccfb48d to
faa7c7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the repository uniqueness multiplier with a binary pioneer reward that gives the first miner to land a quality merged PR on an untouched repo a substantial score bonus. All followers score at
1.0x, creating a sharp incentive to explore rather than pile on.Problem
Despite 1400+ repos across all tiers, contribution activity clusters on a small subset. The existing
repository_uniqueness_multipliergives a shared bonus that shrinks as miners pile on, but the reward differential isn't compelling enough to change behavior.Solution
A binary pioneer reward: exactly one winner per repo, decided by earliest eligible merge timestamp. The multiplier is a pure function with two constants:
How it works
token_score >= MIN_TOKEN_SCORE_FOR_BASE_SCORE, valid tier config, non-nullmerged_at).(merged_at, pr_number)— position 1 is the pioneer. The pioneer's specific PR gets the bonus; all other PRs (followers, later PRs from the same miner) get1.0x.Constants:
PIONEER_BASE_BONUS = 1.5,PIONEER_MULTI_REPO_DAMPING = 0.5Design decisions
MIN_TOKEN_SCORE_FOR_BASE_SCOREare excluded from pioneer ranking entirely. This prevents low-effort snipe merges from capturing pioneer status. If a low-quality PR merges first, the next quality contributor becomes the pioneer instead.pioneer=2.50(P)for pioneers andpioneer=1.00(F)for followers, making scoring transparent in validator output.Why
PIONEER_BASE_BONUS = 1.5(2.50x)?Strong enough to overcome the risk premium of exploring an unknown codebase. With multi-repo damping, pioneering 4 repos brings it to 1.75x — still meaningful but not exploitable. Game theory research (congestion games, Tullock contests) shows binary first-mover rewards are optimal for maximizing the number of distinct repos with at least one contributor.
Related Issues
Closes #240
Type of Change
Changes
gittensor/constants.pyPIONEER_BASE_BONUS = 1.5andPIONEER_MULTI_REPO_DAMPING = 0.5; removeUNIQUE_PR_BOOSTgittensor/classes.pyrepository_uniqueness_multiplierwithpioneer_multiplierandpioneer_rank; updatecalculate_final_earned_scorewith(P)/(F)taggittensor/validator/evaluation/scoring.pycalculate_pioneer_ranks(),count_pioneered_repos(),calculate_pioneer_multiplier(); updatefinalize_miner_scores(); removecalculate_uniqueness_multiplier()andcount_repository_contributors()gittensor/validator/storage/queries.pyrepository_uniqueness_multipliercolumn withpioneer_multiplierandpioneer_rankin INSERT/UPSERTgittensor/validator/storage/repository.pypioneer_multiplierandpioneer_ranktests/validator/conftest.pyPRBuilder.create()to acceptmerged_atanduidparameterstests/validator/test_pioneer_multiplier.pyDB migration
Evidence
Scenario A: Clustering Reality
Setup: 10 miners, 3 repos — 6 miners on repo-X, 3 on repo-Y, 1 on repo-Z. All PRs:
base_score=30.BEFORE (old uniqueness — all miners on same repo get same multiplier):
AFTER (binary pioneer — only rank 1 gets bonus):
Scenario B: Ideal Spread — 10 miners, 10 repos (1 each)
Scenario C: Land-grab vs Focused Pioneer
Scenario D: Tie-breaking (merge bot queue)
Two PRs merged at the exact same second by a merge bot:
Testing
Test coverage (18 tests, 5 classes)
TestCalculatePioneerMultiplierTestCalculatePioneerRanksTestQualityGateTestFinalizationTestPioneerIncentiveEvidenceTest results
Full stack confirmation
No orphaned columns, dead code, or untested logic.
Checklist