Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 954 Bytes

056.md

File metadata and controls

29 lines (15 loc) · 954 Bytes

moneyversed

medium

Integer overflow in _interestRate function

Summary

The _interestRate function could be susceptible to integer overflow, leading to incorrect loan interest rates.

Vulnerability Detail

In the LenderCommitmentForwarder.sol contract, the _interestRate function could be prone to integer overflow, potentially causing incorrect calculations of loan interest rates.

Impact

Incorrect calculation of loan interest rates, leading to potential financial losses or incorrect loan terms for borrowers and lenders.

Code Snippet

https://github.com/sherlock-audit/2023-03-teller/blob/main/teller-protocol-v2/packages/contracts/contracts/LenderCommitmentForwarder.sol#L320

Tool used

Manual Review

Recommendation

Implement proper checks for integer overflow, such as using SafeMath from the OpenZeppelin library, to ensure that the calculations in the _interestRate function are accurate and free from overflow issues.