code-423n4 / 2023-01-opensea-findings

0 stars 0 forks source link

Gas Optimizations #85

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

See the markdown file with the details of this report here.

c4-judge commented 1 year ago

HickupHH3 marked the issue as grade-a

c4-judge commented 1 year ago

HickupHH3 marked the issue as grade-b

HickupHH3 commented 1 year ago

Downgraded because of failure to filter false positives. Examples:

[G‑04] Add unchecked {} for subtractions where the operands cannot underflow because of a previous require() or if-statement

Already unchecked.

if (nativeTokensRemaining > amount) {
    // Skip underflow check as nativeTokensRemaining > amount.
    unchecked {
        // Transfer remaining native tokens to the caller.
        _transferNativeTokens(
            payable(msg.sender),
            nativeTokensRemaining - amount
        );
    }
}

[G‑06] internal functions not called by the contract should be removed to save deployment gas

Referenced functions are called in higher order function

c4-judge commented 1 year ago

HickupHH3 marked the issue as grade-a

HickupHH3 commented 1 year ago

Moderation applied, bumped back up to grade A