The _accrueInterest function uses a simple interest formula to compute the accrued debt, instead of a compounding formula.
Impact
This means the actual borrow rate and interest for suppliers depend on how often updates are made.
This difference should be negligible in highly active markets, but it could lead to a lower borrow rate in low-activity markets.
Recommendation
Ensure that the lending pairs is accrued regularly, or switch to a compound interest formula (which has a higher gas cost due to exponentiation, but can be approximated, see Aave).
Handle
cmichel
Vulnerability details
The
_accrueInterest
function uses a simple interest formula to compute the accrued debt, instead of a compounding formula.Impact
This means the actual borrow rate and interest for suppliers depend on how often updates are made. This difference should be negligible in highly active markets, but it could lead to a lower borrow rate in low-activity markets.
Recommendation
Ensure that the lending pairs is accrued regularly, or switch to a compound interest formula (which has a higher gas cost due to exponentiation, but can be approximated, see Aave).