Open pedrovalido opened 1 year ago
Add getLiqRatio and getLtv to ILendingProvider. After this, add a check in the BorrowingVault constructor to ensure the passed maxLtv and liqRatio are not violating this for any provider
function _checkMaxLtvAndLiqRatio(uint256 maxLtv_, uint256 liqRatio, ILendingProvider[] memory providers) internal pure { for(uint256 i; i<providers.length; i++) { if(providers[i].getLtv() < maxLtv || providers[i].getLiqRatio() < liqRatio) revert BaseVault__setter_invalidInput(); } }
Add getLiqRatio and getLtv to ILendingProvider. After this, add a check in the BorrowingVault constructor to ensure the passed maxLtv and liqRatio are not violating this for any provider