Closed code423n4 closed 1 year ago
constant
immutable
external
public
payable
onlyOwner
src/Market.sol
Recommend changing from immutable to constant
IERC20 public constant dola = IERC20(0x865377367054516e17014CcdED1e7d814EDC9ce4);
src/Market.sol onlyGov:
src/DBR.sol onlyOperator:
Recommend changing to external since these functions are not called by internal methods
onlyGov
onlyOperator
Since these functions are only for developers, chances of accidentally sending ETH along are very low src/Market.sol onlyGov:
Recommend marking these functions payable to save some gas
0xean marked the issue as grade-c
Gas Optimizations:
[G-01] Use
constant
instead ofimmutable
[G-02] Use
external
instead ofpublic
[G-03] Use
payable
foronlyOwner
functionDetails:
[G-01] Use
constant
instead ofimmutable
for gas efficiencysrc/Market.sol
Recommend changing from immutable to
constant
[G-02] Use
external
instead ofpublic
src/Market.sol onlyGov:
https://github.com/code-423n4/2022-10-inverse/blob/main/src/Market.sol#L194
src/DBR.sol onlyOperator:
https://github.com/code-423n4/2022-10-inverse/blob/main/src/DBR.sol#L99
Recommend changing to
external
since these functions are not called by internal methods[G-03] Use
payable
foronlyGov
andonlyOperator
functionSince these functions are only for developers, chances of accidentally sending ETH along are very low src/Market.sol onlyGov:
src/DBR.sol onlyOperator:
Recommend marking these functions
payable
to save some gas