Apply credibility ramp linearly, not cubed#359
Merged
Conversation
anderdc
approved these changes
May 21, 2026
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.
Problem
The credibility ramp was being cubed along with the raw success rate in the emission formula.
success_rate()returned the productraw_rate × ramp, andcalculate_miner_rewardsthen raised that whole value toSUCCESS_EXPONENT(3) — so the effective term wasraw_rate³ × ramp³instead ofraw_rate³ × ramp.Impact (perfect raw rate, 6/10 closed swaps → ramp 0.6):
(1.0 × 0.6)³ = 0.216→ 21.6% of pool1.0³ × 0.6 = 0.6→ 60% of poolWorst for new miners:
1/1completed earned0.1³ = 0.001(≈0) instead of0.1. The intended linear on-ramp had become a near-cliff.Fix
success_rate()now returns the rawcompleted / closedratio (cubed in the reward).credibility_ramp()returns the linear ramp multiplier, applied once, uncubed.pool × crown_share × raw_rate³ × ramp × capacity × volume_factor.Tests
TestSuccessRateHelperinto raw-rate and ramp helper tests.1/1 → 0.1×pool,5/5 → 0.5×pool, recycle remainder). Full-ramp and timeout cases are numerically unchanged.