The provided audit concerns optimizing gas usage by replacing a require()
statement with Custom Errors.
The require()
statement in the UnripeFacet::switchUnderlyingToken
function is currently used to check if the balance of the unripeToken
is zero. This check could potentially be optimized to use a Custom Error instead.
Gas optimization is the primary impact of this change. By using Custom Errors, gas costs could potentially be reduced.
Manual Review
The function should use Custom Errors as shown below:
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.