Function: computeMaxInterest(address, uint256 _principal, uint256 _lastFundingTimestamp)
This function computes the maximum interest amount to pay for the loan.
Inputs
<unnamed@0>Impact: Unused.
_principalControl: Full control.
Constraints: None.
Impact: The principal borrowed.
_lastFundingTimestampControl: Full control.
Constraints: Must be lower than the current
block.timestamp.Impact: The timestamp where the loan was last funded.
Branches and code coverage
Intended branches
Calculates the right maximum interest amount to pay for the loan.
Negative behavior
Revert if
_lastFundingTimestampis bigger thanblock.timestamp.Revert if
maxInterestToPayis lower than 0.