HardhatFoundry
30,000 USDC
View results
Submission Details
Severity: low
Invalid

weird parameter passed in `onUninstall`

GitHub
https://github.com/Cyfrin/2024-07-biconomy/blob/9590f25cd63f7ad2c54feb618036984774f3879d/contracts/modules/validators/K1Validator.sol#L59-L62

Summary

The onUninstall function includes an unused parameter bytes calldata.

Impact

If calldata is meant to be used then it should be validated, otherwise any random calldata can be passed. Along with this if it is NOT used then the unused parameter adds unnecessary complexity to the function and may confuse developers.

Recommendation

Remove the unused parameter bytes calldata from the function signature if it is not needed. If it is needed, include logic to handle it appropriately.

Corrected function

/// @notice Called upon module uninstallation to remove the owner of the smart account
function onUninstall() external {
delete smartAccountOwners[msg.sender];
}

Alternatively, if the bytes calldata is meant to be used, you should implement the necessary logic to handle it within the function.

Updates

Lead Judging Commences

0xnevi Lead Judge
12 months ago
0xnevi Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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