Skip to content

The check for max rate 1000 ole should be inclusive #164

@code423n4

Description

@code423n4

Handle

Dravee

Vulnerability details

As per the comment, I believe this should be inclusive, as a "max" value is the maximum value that can be taken (That's at least the case in any data query/search. Try a MAX on values in Excel or in SQL):

File: FarmingPools.sol
158:         // max rate 1000 ole 1s
159:         require(distribution.rewardRate < 1e21, 'overflow');

Otherwise here, "max rate ole" would be 1e18 + 999.

Also, an inclusive check <= costs less gas than an exclusive one > which contains an extra non-equality check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1 (Low Risk)Assets are not at risk. State handling, function incorrect as to spec, issues with commentsbugSomething isn't workingsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasons

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions