RToken's balanceOf
function uses the global lending pool index instead of user-specific indices, allowing manipulation of token balances through index desynchronization.
balanceOf
uses ILendingPool(_reservePool).getNormalizedIncome()
instead of the stored _userState[account].index
.
As can be seen, the balanceOf
function uses the global liquidity index instead of user-specific indices, creating a fundamental mismatch between actual and reported token balances. This breaks the core accounting principle that user balances should reflect their specific deposit timing and interest accrual.
Worst-Case:
Users could extract excess tokens by timing transfers around index updates
Protocol could lose up to 100% of interest accrual through balance manipulation
System-wide accounting becomes unreliable, affecting all lending operations
This vulnerability mirrors the Compound Protocol's COMP distribution bug where incorrect index usage led to millions in excess token distributions. Both cases stem from index/accounting mismatches in DeFi protocols.
Balances may reflect the latest index instead of the user’s last updated index, leading to incorrect interest calculations.
vs
Use _userState[account].index
for scaling individual balances.
Using the global liquidity index in balanceOf is the intended and correct behavior for interest-bearing tokens.
Using the global liquidity index in balanceOf is the intended and correct behavior for interest-bearing tokens.
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.