Core Contracts

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

`amount` is burned rather than scaled amount

Summary

Inside the burn function of Rtoken contract , `amount` is scaled to

uint256 amountScaled = amount.rayMul(index);

but when is comes to burning the scaled amount function ends up burning the amount passed as argument resulting in invalid amounts to be burned.

Impact

As there is an ivalid amount burning resulting in daviations from the actual calculation and amount to be burned resulting in losses of funds situation is base upon index .

Example
-> if liquidity index is higher then token amount that would be burned should be greater than the amount and vice versa both parties can face loss in this situation

Recommendations

revise the burn statement and replace the amount parameter to amountScaled

_burn(from, amountScaled.toUint128());
Updates

Lead Judging Commences

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

RToken::burn incorrectly burns amount (asset units) instead of amountScaled (token units), breaking token economics and interest-accrual mechanism

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

RToken::burn incorrectly burns amount (asset units) instead of amountScaled (token units), breaking token economics and interest-accrual mechanism

Support

FAQs

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