Assessment reports>Filecoin Services Payments>Informational findings>Unused mapping ,hasCollectedFees, in Payments
Category: Coding Mistakes

Unused mapping hasCollectedFees in Payments

Informational Impact
Informational Severity
N/A Likelihood

Description

The hasCollectedFees mapping is declared but never read or written anywhere, so it is a dead state.

// Tracks whether a token has ever had fees collected, to prevent duplicates in feeTokens

mapping(address => bool) public hasCollectedFees;

Impact

There is no security impact since it is an unused state. However, unused code reduces readability and increases code size. Cleaning it up keeps the codebase simpler and easier to work with for future developers.

Recommendations

Remove the mapping and the related comment.

Remediation

This issue has been acknowledged by Filecoin Services, and a fix was implemented in commit e4446347.

Zellic © 2025Back to top ↑