Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Invalid

Redundant call to updateReserveInterests() in LendingPool

Summary

The deposit() and withdraw() functions in the LendingPool contract make redundant calls to updateReserveInterests().

Vulnerability Details

When a user calls deposit() or withdraw(), the following sequence occurs:

  1. The function first calls ReserveLibrary.updateReserveState(reserve, rateData), which internally calls updateReserveInterests() to update the reserve data.

  2. After that, deposit() or withdraw() calls the corresponding function in ReserveLibrary.

  3. However, inside ReserveLibrary.deposit() and ReserveLibrary.withdraw(), updateReserveInterests() is called again, making the first call redundant.

https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L227

This results in unnecessary duplicate function calls, without adding any benefit.

Impact

Unnecessary computations, reducing efficiency. This issue does not cause any critical failures.

Tools Used

Recommendations

Remove one of the redundant calls to updateReserveInterests().

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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