The update of interest rates does not account for the real unbacked amount (can be bypassed if cap is 0)
miguelmtzinf opened this issue · comments
If there is unbacked
liquidity in the system and governance decides to "switch off" portals (setting a zero unbackedMintCap
), the calculation of the interest rates would be wrong since this function would pass 0 as unbacked
because of 0 unbackedMintCap
(when we could have non-zero unbacked
).
aave-v3-core/contracts/protocol/libraries/logic/ReserveLogic.sol
Lines 167 to 198 in f3e037b
Additionally, there is no check of the current unbacked
amount in IPoolConfigurator.setUnbackedMintCap
.
aave-v3-core/contracts/protocol/pool/PoolConfigurator.sol
Lines 416 to 426 in 32f0e72
Agree with fixing the first, but for now would leave the validation of the setter for a following iteration, because I think we should do a broader review of this type of cases (fairly sure there is more)
I didn't mean we should fix the setter, because it is working as intended. I will create a PR for the other.