Skip to content

[G-2] ++i/i++ should be unchecked {++i}/unchecked{i++} when it is not possible for them to overflow, as is the case when used in for- and while-loops #19

@juniormp

Description

@juniormp

Comments

In Solidity, the unchecked keyword can be used to disable overflow and underflow checking for a particular operation or expression. This can improve the gas efficiency of the smart contract and simplify the code.

Instances

https://github.com/juniormp/audit-2023-04-rubicon/blob/511636d889742296a54392875a35e4c0c4727bb7/contracts/BathHouseV2.sol#L122

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions