Skip to content

Incorrect calculation IndexingRewardEffectiveCut #325

@warfollowsme

Description

@warfollowsme

It looks like there’s a bug in the calculateIndexingRewardEffectiveCut method. delegatorCut is being set equal to indexingRewardCut, and then divided by delegatedStakeRatio. But indexingRewardCut is the portion of rewards that indexer takes, so delegatorCut should be 1 - indexingRewardCut.

let delegatorCut = BigDecimal.fromString('1') - 
BigInt.fromI32(indexer.indexingRewardCut).toBigDecimal() / BigDecimal.fromString('1000000')

same issues for others 'Effective' calculations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions