Skip to content

Conversation

@connormck333
Copy link
Contributor

With the current rewarding, depending on the total epoch emissions there may be a bone unaccounted for due to rounding. Currently, we write an unallocated reward for unaccounted for bones during poc rewarding. We do not write unallocated rewards for service providers because the full amount is rewarded. In total, this accounts for 94% of the total epoch emissions.

If the poc unallocated amount is less than 1, it will not be written. The problem is that when we calculate the reward amount for service providers, we round to 0, which could dismiss 0.8 of a bone. If we are dismissing 0.6 of a bone during poc rewarding, and dismissing 0.8 of a bone during service provider rewarding, we then have 1.4 bones that are unaccounted for.

Example:

Total epoch emissions 82191780821915

poc and dc rewards: 57534246575340
sp: 19726027397259

poc unallocated: 0.5
sp unallocated: 0.6 (both less than 0 so no unallocated reward written)

result: 77260273972599
94%: 77260273972600.1

Missing 1.1 bones

In this PR, I have moved the writing of unallocated rewards out of poc. Now we reward poc and service providers and calculate the total unallocated amount and write a combined (poc and service provider) unallocated reward.

# [patch.'https://github.com/helium/proto']
# helium-proto = { git = "https://www.github.com/helium/proto.git", branch = "dcyoung/radio-usage-stats-req-v2" }
[patch.'https://github.com/helium/proto']
helium-proto = { git = "https://www.github.com/helium/proto.git", branch = "connor/missing-bones-sp-rewards" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

@connormck333 connormck333 requested review from bbalser, kurotych, macpie and michaeldjeffrey and removed request for bbalser and michaeldjeffrey December 19, 2025 12:18
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.

2 participants