Skip to content

Gas Optimization: No need to use SafeMath everywhere #225

@code423n4

Description

@code423n4

Handle

gzeon

Vulnerability details

Impact

For example, the following rounding operation is safe

https://github.com/code-423n4/2022-01-openleverage/blob/501e8f5c7ebaf1242572712626a77a3d65bdd3ad/openleverage-contracts/contracts/XOLE.sol#L249

        uint256 unlock_time = _unlock_time.div(WEEK).mul(WEEK);

to

        uint256 unlock_time = (_unlock_time/WEEK)*WEEK;

Metadata

Metadata

Assignees

No one assigned

    Labels

    G (Gas Optimization)bugSomething 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