Omniscia Evergon Labs Audit

FixedDurationMarginCallFacet Code Style Findings

FixedDurationMarginCallFacet Code Style Findings

FDM-01C: Misleading Function Names

Description:

The FixedDurationMarginCallFacet::checkMarginCallPeriod and its FixedDurationMarginCallFacetStorage counterpart are misleadingly named as they will indicate whether the LendingOracleFacetStorage::setPrice function should continue.

Example:

packages/contracts/contracts/subInternalFacets/marginCallPhaseFacets/marginCallTimeFacets/fixedDurationTime/FixedDurationMarginCallFacet.sol
47// This function should be called by oracle facet, to check if margin call failed
48// Lending Oracle Facet Hook!
49function checkMarginCallPeriod(uint256 campaignId) external view onlyInternalDelegateCall returns (bool) {
50 return FixedDurationMarginCallFacetStorage.layout().checkMarginCallPeriod(campaignId);
51}

Recommendation:

We advise them to be renamed, specifically to a name such as didMarginCallFail or a similar function to properly illustrate what the yielded value represents.

Alleviation (71cda4ccfdcfa25fb96a4565f1f8143b350dd246):

The function name was updated to indicate that it evaluates whether a margin call has expired, addressing this exhibit.