Omniscia Arcade XYZ Audit
RepaymentController Code Style Findings
RepaymentController Code Style Findings
RCR-01C: Redundant Conditional Evaluation
Type | Severity | Location |
---|---|---|
Gas Optimization | ![]() | RepaymentController.sol:L153 |
Description:
The referenced conditional evaluation is redundant as the ensuing if
conditional restricts the data.state
value to LoanLibrary\.LoanState\.Active
.
Example:
contracts/RepaymentController.sol
153if (data.state == LoanLibrary.LoanState.DUMMY_DO_NOT_USE) revert RC_CannotDereference(loanId);154if (data.state != LoanLibrary.LoanState.Active) revert RC_InvalidState(data.state);
Recommendation:
We advise the code to be omitted, optimizing the function's gas cost.
Alleviation (7a4e1dc948e94ded7385dbb74818bcf93ecc207c):
The Arcade XYZ team evaluated this exhibit and opted to retain the current behaviour of the codebase.