Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

L-4 No check to ensure maxLTV < liqRatio inside setMaxLtv() #561

Closed 0xdcota closed 1 year ago

0xdcota commented 1 year ago

Description

The setLiqRatio function checks that the passed liqRatio is greater than or equal to maxLTV, but no such check is performed inside the setMaxLTV function. Hence admins can unintentionally break this invariant.

Remediation to consider

Consider adding an explicit check to ensure that maxLTV is less than liqRatio.