Omniscia Rari Capital Audit

CErc20Immutable Code Style Findings

CErc20Immutable Code Style Findings

CEI-01C: Inexplicable Literals

TypeSeverityLocation
Code StyleInformationalCErc20Immutable.sol:L34

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

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.