LikeRegistry declares a Like struct that is never instantiated, stored, or referenced anywhere in the contract. It inflates the source code and ABI with no functional purpose.
The contract tracks likes through mapping(address => mapping(address => bool)) public likes on line 20, a simple boolean mapping. No function creates a Like instance, and no storage variable uses the Like type. The struct's timestamp field suggests the developer planned to track like history with timestamps but implemented a simpler boolean approach instead.
A search of the entire codebase confirms zero usage beyond the declaration:
Likelihood:
The dead struct is present in every deployment. It exists in the source code regardless of how the contract is used.
Impact:
No functional impact. The struct appears in the ABI, potentially confusing developers or integrators who expect it to be used for querying like history (including timestamps). It suggests incomplete feature implementation.
The struct exists only in the type system — no runtime state uses it. Likes are tracked purely via the boolean mapping. The test confirms the mapping is the actual storage mechanism:
Remove the unused struct to clean up the codebase. If like timestamps are a desired feature, the struct should be integrated into the storage and populated in likeUser().
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.