TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: low
Invalid

`mint` silently returns, causing potential integration issue

Summary

The TempleGold::mint will not revert if the mintAmount doesn't meet the requirement to distribute, instead it simply returns. The people who is calling can not tell if the mint is actually working as intended. This may cause issues in future integration.

Vulnerability Details

In TempleGold::mint, the minted amount mintAmount is checked against canDistribute, if the requirement doesn't meet, the function will simply return instead of reverting.

/// @dev no op silently
@=> if (!_canDistribute(mintAmount)) { return; }

Thus, the caller can not directly tell if the mint is actually working as intended. This may cause issues in future integration.

This could cause issues in future integration when the caller relies on the success distribution to perform proceeding operations.

Impact

This could cause issues in future integration when the caller relies on the success distribution to perform proceeding operations.

Tools Used

Manual

Recommendations

To mitigate this issue, it is recommended to return false when the _canDistribute fails.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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