1. Summary
The RToken::burn function returns the same amount twice instead of providing the actual scaled amount. Specifically, it returns:
where the third value is expected to be the interest-adjusted (scaled) amount. As a result, downstream components—particularly the ReserveLibrary—use incorrect data to update liquidity and recalculate interest rates, distorting the protocol’s entire interest model.
2. Technical Details
Current Implementation
The code calculates amountScaled but never returns it.
Expected Behavior
The protocol calls burn() expecting a tuple:
(uint256 burnedScaledAmount, uint256 newTotalSupply, uint256 amountUnderlying)
That last value (“amountUnderlying” in the calling code) is used to update interest rates and liquidity.
Effect on Rate Updates
In ReserveLibrary::withdraw, we see something like:
Because burn() returns the unscaled amount instead of amountScaled, the wrong value is subtracted from reserve.totalLiquidity.
Result: The protocol miscomputes utilization, leading to erroneous interest rates for future borrowers and lenders.
3. Impact
Incorrect Interest Rate Calculations: Under- or overestimating the withdrawn liquidity causes misaligned utilization, directly skewing the borrow and deposit rates.
Systemic Imbalances: Over time, these small inaccuracies can accumulate, leading to significant mispricing of loans and deposits.
4. Recommended Fix
Return the scaled amount in the third position so the protocol correctly tracks actual underlying outflows:
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.