code-423n4 / 2023-11-shellprotocol-findings

7 stars 7 forks source link

Gas Optimizations #321

Closed c4-bot-3 closed 8 months ago

c4-bot-3 commented 8 months ago

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

c4-pre-sort commented 8 months ago

raymondfam marked the issue as sufficient quality report

0xA5DF commented 8 months ago

G6 seems significant G8 seems invalid (there's only one read and one write of unwrapFeeDivisor)

G1 is false, actually increases cost:

// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;

contract A{
    function doSomething() public {

    }
}

contract ControlContract{

    function control(address x) public returns (uint256) {
        A(x).doSomething();
        A(x).doSomething();
    }

}

contract TestContract{

    function test(address x) public returns (uint256) {
        A a = A(x);
        a.doSomething();
        a.doSomething();
    }
}
c4-judge commented 8 months ago

0xA5DF marked the issue as grade-c