Core Contracts

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

USDC in pools lead to significant loss for protocol/lenders

Summary and Vulnerability Details

It is mentioned in the contest page that USDC is allowed in the pools. Thus when liquidations are closed, there is a check to ensure that the remaining debt is small. This check is as follows:
if(userDebt <= 1e6) continue close liquidation;
But this is a problem for tokens like USDC, which means that for every liquidation a loss of $1 is taken by the lenders/protocol.

function closeLiquidation() external nonReentrant whenNotPaused {
address userAddress = msg.sender;
if (!isUnderLiquidation[userAddress]) revert NotUnderLiquidation();
// update state
ReserveLibrary.updateReserveState(reserve, rateData);
if (block.timestamp > liquidationStartTime[userAddress] + liquidationGracePeriod) {
revert GracePeriodExpired();
}
UserData storage user = userData[userAddress];
uint256 userDebt = user.scaledDebtBalance.rayMul(reserve.usageIndex);
=> // DUST_THRESHOLD = 1e6
if (userDebt > DUST_THRESHOLD) revert DebtNotZero();

Impact

many such closed liquidations will add up, and the lenders may not get paid the proper interest they are owed.

Tools Used

manual review

Recommendations

reduce the DUST_THRESHOLD to a more acceptable value.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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