Skip to content

Comment-code mismatch for _balanceIncentiveCurve_exponent threshold #89

@code423n4

Description

@code423n4

Handle

0xRajeev

Vulnerability details

Impact

The code comment says: “// The exponent has to be less than 5 in these versions of the contracts.” but the code immediately after the comment implements a check “< 6.” It is unclear if the comment is incorrect or the check is wrong. An incorrect check may have mathematical implications.

Proof of Concept

https://github.com/code-423n4/2021-08-floatcapital/blob/bd419abf68e775103df6e40d8f0e8d40156c2f81/contracts/contracts/Staker.sol#L276-L277

Tools Used

Manual Analysis

Recommended Mitigation Steps

Revisit comment and code to sync them by fixing the comment or the code whichever is incorrect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions