Omniscia Rari Capital Audit

CEtherImmutable Code Style Findings

CEtherImmutable Code Style Findings

CON-01C: Inexplicable Literals

TypeSeverityLocation
Code StyleInformationalCEtherImmutable.sol:L32

Description:

The linked segment appears to have been updated to conform to the new initialize signature style, however, the values passed in for the fee mantissas are zero inexplicably so.

Example:

contracts/CEtherImmutable.sol
21constructor(ComptrollerInterface comptroller_,
22 InterestRateModel interestRateModel_,
23 uint initialExchangeRateMantissa_,
24 string memory name_,
25 string memory symbol_,
26 uint8 decimals_,
27 address payable admin_) public {
28 // Creator of the contract is admin during initialization
29 admin = msg.sender;
30
31 // Initialize the market
32 initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_, 0, 0);
33
34 // Set the proper admin now that initialization is done
35 admin = admin_;
36}

Recommendation:

We advise appropriate documentation to accompany this statement explicitly stating that immutable CErc20 deployments are meant to possess no reserve factor and admin fee mantissas.The development team has acknowledged this exhibit but decided to not apply its remediation in the current version of the codebase citing time constraints.