Skip to content

Miner/validator split is hard coded in at least two places #1725

Open
@dougsillars

Description

@dougsillars

Describe the bug

There are at least two places in the run_coinbase code where the vali/miner split is hardcoded:

.saturating_mul(asfloat!(0.5)); // 50% to validators.

let root_alpha: U96F32 = root_proportion
                .saturating_mul(alpha_out_i) // Total alpha emission per block remaining.
                .saturating_mul(asfloat!(0.5)); // 50% to validators.

let pending_validator_alpha: u64 = if incentive_sum != 0 {

        let pending_validator_alpha: u64 = if incentive_sum != 0 {
            pending_alpha
                .saturating_add(pending_swapped)
                .saturating_div(2)
                .saturating_sub(pending_swapped)
  1. This should be a subnet dependent variable - that uses the *0.5 (or /2). There are discussions of how this might change in the future, and having it as a variable makes the code cleaner and easier to modify.
  2. The owner cut is a variable - should miner/vali be set at 41%?

To Reproduce

Links above!

Expected behavior

This should be a variable reference 😃

Screenshots

No response

Environment

This is just a code update. OS agnostic

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions