Missing check zero address
The isNotFrozen does not validate if the provided asset address is a zero address. This oversight could potentially cause complications if a zero address is inputted into the functions utilizing this modifier.
Manual view
Adding a check for a zero address in this modifier would be a good idea to prevent potential issues and ensure the functions behave as expected in all scenarios. Here's how you could add such a check:
modifier isNotFrozen(address asset) {
require(asset != address(0), "Asset address cannot be 0");
if (s.asset[asset].frozen != F.Unfrozen) revert Errors.AssetIsFrozen();
_;
}
In this updated version of the modifier, the require statement will ensure that the asset address is not a zero address before proceeding with the rest of the checks.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.