The function incorrectly burns the underlying asset amount (crvUSD) instead of the properly scaled RToken amount, potentially leading to significant economic vulnerabilities in the protocol.
In the following parts of the burn() function, it does not handle the conversion between RTokens (interest-bearing tokens) and the underlying asset (crvUSD). RTokens represent a claim on an increasing amount of the underlying asset due to accrued interest, which is tracked through the liquidity index. The current implementation ignores this relationship when burning tokens.
Incorrect burning of RTokens leads to wrong total supply
Mismatch between burned RTokens and transferred underlying assets
Broken relationship between RToken supply and underlying asset reserves
Over time, the cumulative effect of incorrect burns could lead to protocol insolvency
Manual Code Review
Use amountScaled to burn and correct the first return value:
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.