Closed code423n4 closed 2 years ago
Here is a mul after div https://github.com/code-423n4/2022-04-backed/blob/e8015d7c4b295af131f017e646ba1b99c8f608f0/contracts/NFTLoanFacilitator.sol#L382 Should be changed into
return (loanAmount * (block.timestamp - lastAccumulatedTimestamp) * (perAnumInterestRate * 1e18) / 365 days / 1e21 // SCALAR * 1e18 + accumulatedInterest;
the mul is first
The code have / 365 days in the bracket, which will take precedence of the multiplication of 2 brackets. Closing because submitted by contest judge.
/ 365 days
Low risk
Loss of precision
Here is a mul after div https://github.com/code-423n4/2022-04-backed/blob/e8015d7c4b295af131f017e646ba1b99c8f608f0/contracts/NFTLoanFacilitator.sol#L382 Should be changed into