When looking at AAVE ScaledBalanceTokenBase contract, we can see the following line:
scaledBalance
is effectively the amount of interest-bearing token (RToken).
But in our case, scaleBalance
is computed as follows:
This is problematic, because the balanceOf
function in RToken is meant to return the balance of underlying token, i.e, balance after multiplying the RToken amount by the index :
The impact is medium as it leads to incorrect computation of scaledBalance
. With the current design, there are no consequences because scaledBalance
is only used to compute balanceIncrease
which is never used.
In AAVE aToken implementation, balanceIncrease
is used for event emission, but this part has been forgotten in RAAC protocol.
Manual review.
Make sure to correctly compute scaledBalance
using super.balanceOf
just like AAVE aTokens implementation.
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.