The incorrect accounting in RToken.sol will cause loss of protocol rewards for the owner as the calculateDustAmount() function does not account for funds deposited in the Curve vault.
In RToken.sol the calculateDustAmount() function only considers the balance in the RToken contract itself, ignoring funds deposited into the Curve vault through LendingPool.sol.
The LendingPool.sol#_rebalanceLiquidity() function moves excess funds to the Curve vault:
However, RToken.sol#calculateDustAmount() fails to include these vault deposits:
The protocol owner loses access to accrued protocol rewards that are stored in the Curve vault, as they are not included in the dust amount calculation.
Modify RToken.sol#calculateDustAmount() to include funds deposited in the Curve vault when calculating the total contract balance.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.