The DebtToken::burn
function returns the values amount
,totalSupply()
, amountScaled
, and balanceIncrease
sequentially.
However, in the LendingPool::_Repay
function, which calls DebtToken::burn
, the outputs are stored in variables named amountScaled
, newTotalSupply
, amountBurned
, and balanceIncrease
.
As a result, the actual value of amount
is stored in the variable amountScaled
, while the actual value of amountScaled
is stored in amountBurned
.
This discrepancy ultimately leads to incorrect transfer here.
Incorrect transfer amount
Manual review
Sweep the amountScaled
and amountBurned
in the LendingPool::_repay
function.
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.