Omniscia Evergon Labs Audit
FixedDurationMarginCallFacetStorage Code Style Findings
FixedDurationMarginCallFacetStorage Code Style Findings
FDC-01C: Non-Standard Storage Slot Definition
| Type | Severity | Location |
|---|---|---|
| Standard Conformity | ![]() | FixedDurationMarginCallFacetStorage.sol:L24 |
Description:
The referenced declaration will define a storage slot for use by a facet of the system's main EIP-2535 Diamond, however, the way it is declared does not adhere to the latest standards.
Example:
24bytes32 internal constant STORAGE_SLOT = keccak256("Evergonlabs.Tmi-Tokenizer.storage.FixedDurationMarginCallFacetStorage");Recommendation:
We advise the EIP-7201 name-spaced layout approach to be adhered to similarly to OpenZeppelin and other relevant standard libraries, ensuring consistency among the ecosystem's widely utilized libraries and conforming to the latest standards.
Alleviation (71cda4ccfdcfa25fb96a4565f1f8143b350dd246):
The referenced slot definition has been updated to its standardized EIP-7201 representation, addressing this exhibit.
FDC-02C: Redundant Conditional Structure
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | ![]() | FixedDurationMarginCallFacetStorage.sol:L66-L70 |
Description:
The referenced if-else structure will yield true if its condition is false and false otherwise.
Example:
66if (currentTimestamp >= l.startingTimestamps[campaignId] && currentTimestamp <= l.endingTimestamps[campaignId]) {67 return false;68} else {69 return true;70}Recommendation:
We advise the condition to be yielded directly in its negated form, optimizing the code's gas cost.
Alleviation (71cda4ccfdcfa25fb96a4565f1f8143b350dd246):
The redundant conditional structure has been replaced by a direct return statement optimizing the code's legibility and gas cost.
