Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: medium
Invalid

Unchecked External Calls - ZipVault.sol

Summary

The updateAssetAllowance function makes an external call to the approve function of the asset token contract without checking the return value.

Vulnerability Details

The updateAssetAllowance function calls the approve function of the asset token contract without checking the return value. If the approve function fails, the updateAssetAllowance function will not revert, and the caller may not be aware that the allowance update failed.

Impact

If the approve function fails, the caller may not be aware that the allowance update failed, leading to potential issues with asset management and user confusion.

Tools Used

Manual code review and analysis.

Recommendations

Use the require function to check the return value of the approve function and revert if it fails.

function updateAssetAllowance(uint256 amount) external onlyMarketMakingEngine {
require(IERC20(asset()).approve(msg.sender, amount), "Approval failed");
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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