A critical vulnerability has been identified in the RToken contract's burn mechanism. The vulnerability stems from incorrect scaling calculations when burning tokens, leading to a severe asset inflation bug. This allows users to extract significantly more underlying assets than they should be entitled to, potentially leading to protocol insolvency.
File: contracts/core/tokens/RToken.sol
The vulnerability exists in the burn function where the scaling calculation for interest-bearing tokens is implemented incorrectly. The function uses rayMul instead of rayDiv when calculating the scaled amount, causing an inflation of assets when users burn their RTokens.
1. When a user burns RTokens, the amount should be divided by the current index to account for accrued interest
Current implementation multiplies the amount by the index instead
The contract then transfers the unscaled amount of underlying assets
This creates a mismatch between burned RTokens and transferred assets
Severity: Critical
The vulnerability has severe implications:
Asset Drainage: Users can extract more underlying assets than they should receive
Protocol Insolvency: The system becomes severely undercollateralized
User Losses: Other users holding RTokens may be unable to redeem their full value
Economic Impact: In the demonstrated PoC, a user burning 50 RTokens received 1050 underlying tokens, a 21x multiplication of value
Manual code review
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.