Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: low
Invalid

Precision loss danger in lendingVault.sol

Summary

This audit report provides an overview of the smart contract code in the LendingVault.sol contract on Ln 485.

Vulnerability Details

Location: LendingVault.sol, Line 489

Description: The function _calculateInterestRate in the LendingVault contract performs division followed by multiplication on the result of division. Solidity's integer division truncates, which can lead to precision loss

Impact

Performing division before multiplication in this context may result in a loss of precision, potentially affecting the accuracy of interest rate calculations.

Tools Used

Static analysis + manual inspection

Recommendations

Recommendation: Rearrange the code to perform the multiplication before the division to avoid precision loss.

Updates

Lead Judging Commences

hans Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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