We can save the caller some gas by updating the order of two modifiers
Gas Impact for Caller
When depositing Collateral using depositCollateral three modifiers are used, ideally if there is an error that will revert in one of these modifiers we would like to save the caller gas.
If the caller is using an incorrect Collateral token, we should revert with this modifier first before checking to see that we have more than zero of the incorrect token
Manual Review
Move content of line 152 to line 151 and content from line 151 to line 152 in order to update the order of the Modifiers:
moreThanZero(amountCollateral)
isAllowedToken(tokenCollateralAddress)
isAllowedToken(tokenCollateralAddress)
moreThanZero(amountCollateral)
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.