Core Contracts

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

`RToken::transferFrom` makes inaccurate transfers

Summary

This is due to the _liquidityIndex variable

Vulnerability Details

_liquidityIndex is set to 1 RAY in the constructor of RToken. There is the updateLiquidityIndex function , which is ment to update the variable but it is only callable by the LendingPool, leaving the variable equal to 1 RAY practically forever. This makes it impossible for the transferFrom function to perform an accurate transfer, because the amount transferred should be denominated in underlying assets and then scaled by the active liquidity index

Impact

RToken::transferFrom performs inacurate transfers which may be an issue in the StabilityPool contract

Tools Used

Manual Review

Recommendations

fetch the liquidity index from LendingPool instead of relying to the _liquidityIndex variable

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RToken::updateLiquidityIndex() has onlyReservePool modifier but LendingPool never calls it, causing transferFrom() to use stale liquidity index values

Support

FAQs

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

Give us feedback!