Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Valid

Repayment Logic Mismatch in LendingPool

Summary:

_repay() in LendingPool clamps amount to actualRepayAmount but still calls DebtToken.burn(...) with the original amount, relying on the DebtToken to clamp again.

Vulnerability Details:

uint256 actualRepayAmount = (amount > userScaledDebt) ? userScaledDebt : amount;
( uint256 amountScaled, ... ) = debtToken.burn(onBehalfOf, amount, reserve.usageIndex);

Mismatch can create confusion or dust leftover, as the final burn amount is decided internally by DebtToken.

Impact:

Not exploitable in typical scenarios, but could lead to partial reverts or leftover debt if misused.

Tools Used:

  • Manual code reading

  • Tracing repay flow (LendingPool, DebtToken)

Recommendations:

  • Pass the properly capped actualRepayAmount to debtToken.burn(...) for clarity and to avoid partial dust.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::_repay emits Repay event with capped actualRepayAmount instead of the real amountScaled value that was transferred, causing misleading event data

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::_repay emits Repay event with capped actualRepayAmount instead of the real amountScaled value that was transferred, causing misleading event data

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.