Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha emission calculation error in feat/rao-2025-01 #1167

Open
dougsillars opened this issue Jan 17, 2025 · 0 comments
Open

Alpha emission calculation error in feat/rao-2025-01 #1167

dougsillars opened this issue Jan 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dougsillars
Copy link

Describe the bug

I am looking at how alpha is distributed to root&alpha, and there is an incorrect calculation made.

from alpha_out_emission:

Root alpha is calculated correctly
pending_alpha_emission calculated correctly

but is pending_alpha_emission incorrectly used to distribute alpha to subnet participants.
the 18% owner's cut is assessed against the pending_alpha_emission - excluding the stakeholder emissions to root.
(it's then turtles all the way down to miner & validator alpha distributions)

To Reproduce

I have the math here:
https://docs.google.com/spreadsheets/d/1E6lno666elcdX-tGQ08M8l6V4UVXOK-JlOlpNrbqFZo/edit?usp=sharing

Let's say that alpha_out_emission is 1.5
using our 18/41/41, I expected

  • SN owner: 0.27
  • miners: .615
  • valis: .615

Let's assume the root:alpha proportion is 50:50 (I have this all mathed out in the spreadsheet)

line 193
root_emission_in_alpha = .31 (thats 50% of the validator's emission)

line 196
pending_alpha_emission = alpha_out_emission - root_emission_in_alpha = 1.5 - .31 = 1.19

207 pending_alpha_emission is placed in PendingEmission
229 PendingEmission is placed into pending_emission

233 pending_emission is sent to drain_pending_emission
line 242
alpha_out = `pending_emission = 1.19

on line 251
owner_cut = alpha_out
0.18 = .215
*

Here is the issue. The owner_cut should be alpha_out_emission * 0.18 = 0.27
We have excluded the root portaion from the SN owner's cut

This error continues to propagate:
remaining_emission = alpha_out - owner_cut

which then distorts miner & validator alpha emissions.

Expected behavior

Here is the issue. The owner_cut should be alpha_out_emission * 0.18 = 0.27

This error continues to propagate:
remaining_emission = alpha_out - owner_cut

which then distorts miner & validator alpha emissions.

Screenshots

No response

Environment

feat/rao-2025-01

Additional context

No response

@dougsillars dougsillars added the bug Something isn't working label Jan 17, 2025
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

No branches or pull requests

1 participant