In the RToken.sol
contract, the calculateDustAmount
function incorrectly scales the contract's underlying asset balance by dividing it by the normalized income, leading to an underreported dust amount.
The issue occurs in the calculateDustAmount
function:
The function incorrectly scales down the contract's actual balance by dividing it by the normalized income. The underlying asset balance represents real tokens and should not be scaled, as it's already in the correct denomination.
This impacts functions that rely on dust calculation:
transferAccruedDust
The impact is High because it causes the dust amount to be incorrectly reported as lower than actual
Manual code review
Remove the scaling operation from the contractBalance
calculation in calculateDustAmount()
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.