If we pass wrong token address on those functions they will revert in the operation of s_collateralDeposited[from][tokenCollateralAddress] -= amountCollateral;
which will underflow the balance of the token address(0), which is a bad place to capture this error. The catch in the modifier will also save gas for the msg.sender.
Also there is a possibility for unpredictable behavior when we hit
Bad traceability on the actual error.
Manual Review
Use isAllowedToken(address)
on "liquidate" and "redeemCollateral" functions:
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.