Closed 0xdcota closed 1 year ago
The comment on L122 of the borrowing vault mentions
L122
* - Must check `maxLTV` Must < `liqRatio`.
However, one can set liqRatio = maxLTV using setLiqRatio
liqRatio = maxLTV
setLiqRatio
function setLiqRatio(uint256 liqRatio_) external onlyTimelock { if (liqRatio_ < maxLtv || liqRatio_ == 0) { revert BaseVault__setter_invalidInput(); } liqRatio = liqRatio_; emit LiqRatioChanged(liqRatio); }
Consider adding equality to the concerned check.
From if (liqRatio_ < maxLtv || liqRatio_ == 0)
if (liqRatio_ < maxLtv || liqRatio_ == 0)
To if (liqRatio_ <= maxLtv || liqRatio_ == 0)
if (liqRatio_ <= maxLtv || liqRatio_ == 0)
Description
The comment on
L122
of the borrowing vault mentionsHowever, one can set
liqRatio = maxLTV
usingsetLiqRatio
Remediation to consider
Consider adding equality to the concerned check.
From
if (liqRatio_ < maxLtv || liqRatio_ == 0)
To
if (liqRatio_ <= maxLtv || liqRatio_ == 0)