Core Contracts

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

Unnecessary updations of `Reserve Interests`

Summary

The updateReserveInterests is used to update interests rates of the protocol but there are some places where is called unnecessarily.

Vulnerability Details

Here are some instances where this happens :

-> While user deposited using deposit function it calls to ReserveLibrary.updateReserveState(reserve, rateData); which then calls to updateReserveInterests and then calls ReserveLibrary.deposit(reserve, rateData, amount, msg.sender); which later in the path calls updateReserveInterests. making updations two times even when not needed

-> same scenario happens in withdraw function.

-> The depositNFT function calls ReserveLibrary.updateReserveState before processing NFT deposits. However, NFT deposits are used solely as collateral and do not affect the liquidity or interest rate calculations tied to reserve assets.

Impact

The root cause is that the same update mechanism used . updating the reserve state in these context is redundant and potentially disruptive. can confuse off chain components based on the events because they are emitted like spamming

Recommendations

Remove the call to updateReserveInterests where they can be avoided.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 4 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.