Core Contracts

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

Incorrect DebtToken burn returned values order

Summary

In the LendingPool contract when repaying debt the amount burned and amount Scaled are returned in the incorrect order:
In the LendingPool::_repay function:

(uint256 amountScaled, uint256 newTotalSupply, uint256 amountBurned, uint256 balanceIncrease) =
IDebtToken(reserve.reserveDebtTokenAddress).burn(onBehalfOf, amount, reserve.usageIndex);

In the DebtToken::burn function:

return (amount, totalSupply(), amountScaled, balanceIncrease);

Basically in the LendingPools implementation the positions for amountScaled and amountBurned are swaped.

Impact

Incorrect values returned

Tools Used

Manual review

Recommendations

Fix order of returned values

Updates

Lead Judging Commences

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

DebtToken::burn returns items in the wrong order

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

DebtToken::burn returns items in the wrong order

Support

FAQs

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

Give us feedback!