Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Invalid

Wrong Naming Used in `IPerMarkets` & `PerMarketsStorage` Contracts

Github

  • https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/interfaces/IPerMarkets.sol#L11

  • https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/storage/PerMarketsStorage.sol#L15C10-L15C28

Summary

The provided smart contracts and interfaces use incorrect naming conventions for marketplace-related components. Specifically, the names IPerMarkets and PerMarketsStorage should be IPreMarkets and PreMarketsStorage, respectively. This naming inconsistency could lead to confusion and potential integration issues within the system.

Vulnerability Details

The interface is named IPerMarkets, but the context and functionality suggest it should be related to PreMarkets. The name IPreMarkets would be more appropriate to reflect the correct domain and usage.

The contract is named PerMarketsStorage, but the context suggests it is intended for PreMarkets. The name PreMarketsStorage would better represent its role and avoid misinterpretation.

Impact

The incorrect name IPerMarkets may mislead developers and auditors into assuming that the interface pertains to a different marketplace concept than intended. This misalignment can cause confusion during development and integration. Similar to the interface naming issue, the incorrect name PerMarketsStorage might lead to misunderstandings about the contract's purpose and association. This could affect code readability and maintainability.

Tools Used

Manual Review

Recommendations

Update the interface name from IPerMarkets to IPreMarkets to accurately reflect its role and avoid confusion. Update the contract name from PerMarketsStorage to PreMarketsStorage for consistency with the intended functionality. Also check variables and entities inside these contracts to be aligned with PreMarkets contract.

Updates

Lead Judging Commences

0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[invalid] finding-Typos

Typos are at most informational and does not highlight a direct smart contract vulnerability

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.