Skip to content

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

Description

@dougsillars

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions