Core Contracts

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

before transferring R token update state should be called in lending pool

Summary

before transferring R token update state should be called in lending pool

Vulnerability Details

Following is from the R token contract

function transfer(address recipient, uint256 amount) public override(ERC20, IERC20) returns (bool) {
uint256 scaledAmount = amount.rayDiv(ILendingPool(_reservePool).getNormalizedIncome());
return super.transfer(recipient, scaledAmount);
}

So in order to correctly transfer the tokens getnormalized income should return the latest value for that we need to call the update state function on the lending pool contract which updates the liquidity index upto date.

Impact

Incorrect scaled amount

Tools Used

Recommendations

Call update state function before calculating the scaled amount.

Updates

Lead Judging Commences

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

LendingPool::getNormalizedIncome() and getNormalizedDebt() returns stale data without updating state first, causing RToken calculations to use outdated values

Support

FAQs

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