20,000 USDC
View results
Submission Details
Severity: medium

when block.timestmap overflow it will cause loan will cause them to all revert

Summary

If 2106 happens block.timestmap will overflow to 0 which will cause all active loans to revert

Vulnerability Details

as we can see when 2106 happens and l.startTimestmap>0 it will revet and protocol will be in a stuck state for most of its functions since it relies on

function _calculateInterest(
uint256 timeElapsed = block.timestamp - l.startTimestamp;

Impact

cause all functions to revert that use _calculateInterest

Tools Used

Recommendations

add an if statement that changes the overflow to a value or have a different function that can be used when this happens

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.